Rename the darker tone to AMOLED; file icons are always colored
- Tone: the "darker" option is labelled "AMOLED" in all 7 locales — it is the true-black AMOLED palette. The persisted value stays "darker", so no settings migration. - File icons: the Plain/Multi option is gone and the per-category glyphs + colors are always on. Removed the iconColors setting (type, default, signal, setter, options row, strings) and the plain branch in file-icons.ts. A stale "iconColors" key in settings.json is carried harmlessly and dropped on the next save. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// File-list glyphs + per-category colors ("Multi" icon mode). Category colors
|
||||
// File-list glyphs + per-category colors. Category colors
|
||||
// are fixed tokens (never follow the accent) so a folder is always folder-blue.
|
||||
// Only the icon glyph is colored; row text stays neutral. Docs and unknown
|
||||
// files stay muted on purpose — sparing color is what keeps it scannable.
|
||||
@@ -8,7 +8,6 @@ type Category = 'image' | 'audio' | 'video' | 'archive' | 'code' | 'doc';
|
||||
|
||||
// Class strings are literals so the Tailwind scanner picks them up.
|
||||
const MUTED = 'shrink-0 text-muted-foreground';
|
||||
const PRIMARY = 'shrink-0 text-primary';
|
||||
const FOLDER = 'shrink-0 text-icon-folder';
|
||||
const LINK = 'shrink-0 text-icon-link';
|
||||
|
||||
@@ -85,18 +84,15 @@ export function fileKindKey(entry: FileEntry): string {
|
||||
return category ? KIND_KEYS[category] : 'file';
|
||||
}
|
||||
|
||||
export function fileGlyph(entry: FileEntry, multi: boolean): string {
|
||||
export function fileGlyph(entry: FileEntry): string {
|
||||
if (entry.name === '..') return 'mynaArrowUp';
|
||||
if (entry.type === 'dir') return 'mynaFolder';
|
||||
if (!multi) return 'mynaFile';
|
||||
if (entry.type === 'symlink') return 'mynaLink';
|
||||
const category = categoryOf(entry.name);
|
||||
return category ? CATEGORIES[category].glyph : 'mynaFile';
|
||||
}
|
||||
|
||||
export function fileIconClass(entry: FileEntry, multi: boolean): string {
|
||||
// plain mode: exactly the pre-color look ('..' has type 'dir' -> primary)
|
||||
if (!multi) return entry.type === 'dir' ? PRIMARY : MUTED;
|
||||
export function fileIconClass(entry: FileEntry): string {
|
||||
if (entry.name === '..') return MUTED;
|
||||
if (entry.type === 'dir') return FOLDER;
|
||||
if (entry.type === 'symlink') return LINK;
|
||||
|
||||
@@ -10,7 +10,6 @@ export class SettingsService {
|
||||
readonly theme = signal<AppSettings['theme']>(DEFAULT_SETTINGS.theme);
|
||||
readonly darkTone = signal<AppSettings['darkTone']>(DEFAULT_SETTINGS.darkTone);
|
||||
readonly accent = signal<AppSettings['accent']>(DEFAULT_SETTINGS.accent);
|
||||
readonly iconColors = signal<AppSettings['iconColors']>(DEFAULT_SETTINGS.iconColors);
|
||||
readonly columns = signal<ColumnKey[]>(DEFAULT_SETTINGS.columns);
|
||||
readonly speedUnit = signal<AppSettings['speedUnit']>(DEFAULT_SETTINGS.speedUnit);
|
||||
readonly uiScale = signal<number>(DEFAULT_SETTINGS.uiScale);
|
||||
@@ -53,7 +52,6 @@ export class SettingsService {
|
||||
this.theme.set(settings.theme);
|
||||
this.darkTone.set(settings.darkTone);
|
||||
this.accent.set(settings.accent);
|
||||
this.iconColors.set(settings.iconColors);
|
||||
this.columns.set(settings.columns);
|
||||
this.speedUnit.set(settings.speedUnit);
|
||||
this.uiScale.set(settings.uiScale);
|
||||
@@ -93,12 +91,6 @@ export class SettingsService {
|
||||
void this.persist();
|
||||
}
|
||||
|
||||
setIconColors(mode: AppSettings['iconColors']): void {
|
||||
// no apply step — the file panels read the signal reactively
|
||||
this.iconColors.set(mode);
|
||||
void this.persist();
|
||||
}
|
||||
|
||||
toggleColumn(key: ColumnKey): void {
|
||||
this.columns.update((list) =>
|
||||
list.includes(key) ? list.filter((c) => c !== key) : [...list, key],
|
||||
@@ -193,7 +185,6 @@ export class SettingsService {
|
||||
theme: this.theme(),
|
||||
darkTone: this.darkTone(),
|
||||
accent: this.accent(),
|
||||
iconColors: this.iconColors(),
|
||||
columns: this.columns(),
|
||||
speedUnit: this.speedUnit(),
|
||||
uiScale: this.uiScale(),
|
||||
|
||||
Reference in New Issue
Block a user