Skip to content

Commit 895fb86

Browse files
committed
fix: grouping and alignment bug
1 parent 7b7f4a7 commit 895fb86

File tree

8 files changed

+200
-197
lines changed

8 files changed

+200
-197
lines changed

src/components/settingsPage.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ function listItems($list, items, callback, options = {}) {
254254
const $setting = Ref();
255255
const $settingName = Ref();
256256
const $tail = Ref();
257+
const isCheckboxItem =
258+
item.checkbox !== undefined || typeof item.value === "boolean";
257259
/**@type {HTMLDivElement} */
258260
const $item = (
259261
<div
@@ -277,9 +279,13 @@ function listItems($list, items, callback, options = {}) {
277279

278280
let $checkbox, $valueText;
279281
let $trailingValueText;
280-
const subtitle = getSubtitleText(item, useInfoAsDescription);
282+
const subtitle = isCheckboxItem
283+
? item.info
284+
: getSubtitleText(item, useInfoAsDescription);
281285
const showInfoAsSubtitle =
282-
useInfoAsDescription || (item.value === undefined && item.info);
286+
isCheckboxItem ||
287+
useInfoAsDescription ||
288+
(item.value === undefined && item.info);
283289
const searchGroup =
284290
item.searchGroup || item.category || options.defaultSearchGroup;
285291
const hasSubtitle =
@@ -295,10 +301,12 @@ function listItems($list, items, callback, options = {}) {
295301

296302
let subtitleRendered = false;
297303

298-
if (item.checkbox !== undefined || typeof item.value === "boolean") {
304+
if (isCheckboxItem) {
299305
$checkbox = Checkbox("", item.checkbox || item.value);
300306
$tail.el.appendChild($checkbox);
301-
} else if (subtitle !== undefined) {
307+
}
308+
309+
if (hasSubtitle) {
302310
$valueText = <small className="value"></small>;
303311
setValueText(
304312
$valueText,

src/components/settingsPage.scss

Lines changed: 27 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,21 @@ wc-page.main-settings-page {
2121
}
2222

2323
.settings-search-summary {
24-
padding: 0.15rem 1rem;
25-
font-size: 0.82rem;
26-
font-weight: 700;
27-
line-height: 1.25;
28-
text-transform: uppercase;
29-
letter-spacing: 0.06em;
24+
padding: 0.2rem 1rem;
25+
font-size: 0.84rem;
26+
font-weight: 600;
27+
line-height: 1.35;
3028
color: var(--secondary-text-color);
31-
color: color-mix(in srgb, var(--secondary-text-color), transparent 24%);
29+
color: color-mix(in srgb, var(--secondary-text-color), transparent 18%);
3230
}
3331

3432
.settings-section-label {
35-
padding: 0.5rem 1rem 0.55rem;
36-
font-size: 0.78rem;
37-
font-weight: 700;
38-
line-height: 1.25;
39-
text-transform: uppercase;
40-
letter-spacing: 0.06em;
41-
color: var(--active-color);
42-
color: color-mix(in srgb, var(--active-color), transparent 30%);
33+
padding: 0.5rem 1rem 0.45rem;
34+
font-size: 0.84rem;
35+
font-weight: 600;
36+
line-height: 1.3;
37+
color: var(--popup-text-color);
38+
color: color-mix(in srgb, var(--popup-text-color), transparent 22%);
4339
}
4440

4541
.settings-section-card {
@@ -184,25 +180,21 @@ wc-page.detail-settings-page {
184180
}
185181

186182
.settings-search-summary {
187-
padding: 0.15rem 1rem;
188-
font-size: 0.82rem;
189-
font-weight: 700;
190-
line-height: 1.25;
191-
text-transform: uppercase;
192-
letter-spacing: 0.06em;
183+
padding: 0.2rem 1rem;
184+
font-size: 0.84rem;
185+
font-weight: 600;
186+
line-height: 1.35;
193187
color: var(--secondary-text-color);
194-
color: color-mix(in srgb, var(--secondary-text-color), transparent 24%);
188+
color: color-mix(in srgb, var(--secondary-text-color), transparent 18%);
195189
}
196190

197191
.settings-section-label {
198-
padding: 0.5rem 1rem 0.55rem;
199-
font-size: 0.78rem;
200-
font-weight: 700;
201-
line-height: 1.25;
202-
text-transform: uppercase;
203-
letter-spacing: 0.06em;
204-
color: var(--active-color);
205-
color: color-mix(in srgb, var(--active-color), transparent 30%);
192+
padding: 0.5rem 1rem 0.45rem;
193+
font-size: 0.84rem;
194+
font-weight: 600;
195+
line-height: 1.3;
196+
color: var(--popup-text-color);
197+
color: color-mix(in srgb, var(--popup-text-color), transparent 22%);
206198
}
207199

208200
.settings-section-card {
@@ -316,13 +308,13 @@ wc-page.detail-settings-page {
316308
padding-right: 0.6rem;
317309
}
318310

319-
.detail-settings-list > .list-item.has-subtitle.has-tail-value > .container,
320-
.settings-section-card > .list-item.has-subtitle.has-tail-value > .container {
311+
.detail-settings-list > .list-item.has-subtitle.has-tail-select > .container,
312+
.settings-section-card > .list-item.has-subtitle.has-tail-select > .container {
321313
padding-right: 0.95rem;
322314
}
323315

324-
.detail-settings-list > .list-item.has-subtitle.has-tail-value > .setting-tail,
325-
.settings-section-card > .list-item.has-subtitle.has-tail-value > .setting-tail {
316+
.detail-settings-list > .list-item.has-subtitle.has-tail-select > .setting-tail,
317+
.settings-section-card > .list-item.has-subtitle.has-tail-select > .setting-tail {
326318
align-self: flex-start;
327319
margin-top: 0.16rem;
328320
margin-left: 1.3rem;
@@ -424,6 +416,7 @@ wc-page.detail-settings-page {
424416
height: 1.2rem;
425417
margin-left: 0.1rem;
426418
font-size: 1.1rem;
419+
line-height: 1;
427420
}
428421

429422
.input-checkbox {

src/settings/appSettings.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,29 +150,29 @@ export default function otherSettings() {
150150
key: "fontManager",
151151
text: strings["fonts"],
152152
info: "Install or remove app fonts",
153-
category: "Personalization",
153+
category: "Fonts",
154154
chevron: true,
155155
},
156156
{
157157
key: "rememberFiles",
158158
text: strings["remember opened files"],
159159
checkbox: values.rememberFiles,
160160
info: "Restore the files you had open last time",
161-
category: "Workspace",
161+
category: "Files & sessions",
162162
},
163163
{
164164
key: "rememberFolders",
165165
text: strings["remember opened folders"],
166166
checkbox: values.rememberFolders,
167167
info: "Restore folders from the previous session",
168-
category: "Workspace",
168+
category: "Files & sessions",
169169
},
170170
{
171171
key: "retryRemoteFsAfterFail",
172172
text: strings["retry ftp/sftp when fail"],
173173
checkbox: values.retryRemoteFsAfterFail,
174174
info: "Retry remote file operations after a failed transfer",
175-
category: "Workspace",
175+
category: "Files & sessions",
176176
},
177177
{
178178
key: "excludeFolders",
@@ -188,7 +188,7 @@ export default function otherSettings() {
188188
},
189189
},
190190
info: "Folders and patterns to skip while searching or scanning",
191-
category: "Workspace",
191+
category: "Files & sessions",
192192
},
193193
{
194194
key: "defaultFileEncoding",
@@ -204,7 +204,7 @@ export default function otherSettings() {
204204
}),
205205
],
206206
info: "Default encoding when opening or creating files",
207-
category: "Workspace",
207+
category: "Files & sessions",
208208
},
209209
{
210210
key: "keybindings",

0 commit comments

Comments
 (0)