File-type icon colors with Plain/Multi setting (multi default)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jokin
2026-07-12 01:31:10 +02:00
co-authored by Claude Fable 5
parent 2f4bc63ac8
commit 44f077380f
8 changed files with 161 additions and 7 deletions
+8 -2
View File
@@ -13,8 +13,10 @@ import type { FileEntry, SavedConnection } from '@shared/types';
import { ConnectionsService } from '../connections.service';
import { DialogsService } from '../dialogs.service';
import { FileActionsService } from '../file-actions.service';
import { fileGlyph, fileIconClass } from '../file-icons';
import { formatDate, formatSize } from '../format';
import { PanelsService, type Side, type SortKey } from '../panels.service';
import { SettingsService } from '../settings.service';
import { TransfersService } from '../transfers.service';
@Component({
@@ -31,6 +33,7 @@ export class FilePanel {
readonly transfers = inject(TransfersService);
readonly connections = inject(ConnectionsService);
readonly dialogs = inject(DialogsService);
private readonly settings = inject(SettingsService);
readonly panel = computed(() => this.panels.get(this.side()));
readonly isActive = computed(() => this.panels.activeSide() === this.side());
readonly isRemote = computed(() => this.panel().sessionId() !== 'local');
@@ -92,8 +95,11 @@ export class FilePanel {
}
iconFor(entry: FileEntry): string {
if (entry.name === '..') return 'mynaArrowUp';
return entry.type === 'dir' ? 'mynaFolder' : 'mynaFile';
return fileGlyph(entry, this.settings.iconColors() === 'multi');
}
iconClass(entry: FileEntry): string {
return fileIconClass(entry, this.settings.iconColors() === 'multi');
}
isSelected(entry: FileEntry): boolean {