Skip to content

Commit 38a066c

Browse files
committed
add compact theme
1 parent 16d6b65 commit 38a066c

File tree

6 files changed

+77
-5
lines changed

6 files changed

+77
-5
lines changed

_locales/en/messages.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@
309309
"message": "Simple",
310310
"description": "Simple theme"
311311
},
312+
"theme_compact": {
313+
"message": "Compact",
314+
"description": "Compact theme"
315+
},
312316
"theme_high_contrast": {
313317
"message": "High Contrast",
314318
"description": "High Contrast theme"

sass/_ui.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,25 @@ $themes: (
8080
grey-search: #b1b1b3,
8181
blue-menu: #f4fcff,
8282
),
83+
compact: (
84+
black-1: black,
85+
black-transparent: rgba(0, 0, 0, 0.5),
86+
white-1: white,
87+
white-transparent: rgba(255, 255, 255, 0.5),
88+
grey-1: grey,
89+
grey-2: #ccc,
90+
grey-3: #eee,
91+
grey-background: #fff,
92+
blue-1: #08c,
93+
yellow-1: #fff1ba,
94+
yellow-2: #fff4cc,
95+
red-1: #dd4b39,
96+
red-2: #eea59c,
97+
black-search: #2a2a2e,
98+
white-search: #f9f9fa,
99+
grey-search: #b1b1b3,
100+
blue-menu: #f4fcff,
101+
),
83102
);
84103

85104
$theme-map: null;

sass/popup.scss

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,8 +1078,9 @@ svg {
10781078
}
10791079
}
10801080

1081-
// Simple overrides
1082-
.theme-simple {
1081+
// Simple & Compact overrides
1082+
.theme-simple,
1083+
.theme-compact {
10831084
.header {
10841085
border-bottom: white 1px solid !important;
10851086

@@ -1146,6 +1147,43 @@ svg {
11461147
}
11471148
}
11481149

1150+
// Compact overrides
1151+
.theme-compact {
1152+
#codes {
1153+
&:not(.edit) {
1154+
.entry {
1155+
padding: 0 10px;
1156+
margin: 0 0 0 10px;
1157+
}
1158+
}
1159+
}
1160+
1161+
.entry {
1162+
.sector {
1163+
bottom: 0;
1164+
}
1165+
1166+
.showqr,
1167+
.pin {
1168+
top: 0;
1169+
}
1170+
1171+
.code {
1172+
font-size: 32px;
1173+
margin-top: -5px;
1174+
letter-spacing: 0.5rem;
1175+
}
1176+
}
1177+
1178+
a.entry {
1179+
border-bottom: #eee 1px solid !important;
1180+
}
1181+
1182+
.issuer.account {
1183+
display: none;
1184+
}
1185+
}
1186+
11491187
// Accessibility overrides
11501188
.theme-accessibility {
11511189
select {

src/components/Popup.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
v-cloak
44
v-bind:class="{
55
'theme-normal':
6-
theme !== 'accessibility' && theme !== 'dark' && theme !== 'simple',
6+
theme !== 'accessibility' &&
7+
theme !== 'dark' &&
8+
theme !== 'simple' &&
9+
theme !== 'compact',
710
'theme-accessibility': theme === 'accessibility',
811
'theme-dark': theme === 'dark',
912
'theme-simple': theme === 'simple',
13+
'theme-compact': theme === 'compact',
1014
hideoutline,
1115
}"
1216
v-on:mousedown="hideoutline = true"

src/components/Popup/EntryComponent.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@
3838
>
3939
<IconRedo />
4040
</div>
41-
<div class="issuer">{{ entry.issuer.split("::")[0] }}</div>
41+
<div class="issuer">
42+
{{
43+
entry.issuer.split("::")[0] +
44+
(theme === "compact" ? ` (${entry.account})` : "")
45+
}}
46+
</div>
4247
<div class="issuerEdit">
4348
<input
4449
v-bind:placeholder="i18n.issuer"
@@ -55,7 +60,7 @@
5560
}"
5661
v-html="style.isEditing ? showBulls(entry) : showCode(entry.code)"
5762
></div>
58-
<div class="issuer">{{ entry.account }}</div>
63+
<div class="issuer account">{{ entry.account }}</div>
5964
<div class="issuerEdit">
6065
<input
6166
v-bind:placeholder="i18n.accountName"
@@ -101,6 +106,7 @@ const computedPrototype = [
101106
"encryption",
102107
]),
103108
mapState("style", ["style"]),
109+
mapState("menu", ["theme"]),
104110
];
105111
106112
let computed = {};

src/components/Popup/PreferencesPage.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<option value="normal">{{ i18n.theme_light }}</option>
99
<option value="dark">{{ i18n.theme_dark }}</option>
1010
<option value="simple">{{ i18n.theme_simple }}</option>
11+
<option value="compact">{{ i18n.theme_compact }}</option>
1112
<option value="accessibility">{{ i18n.theme_high_contrast }}</option>
1213
</a-select-input>
1314
<a-select-input

0 commit comments

Comments
 (0)