Configurable list columns via header right-click
Native checkable menu on the column headers toggles Size, Modified, Kind, Rights, Owner and Group (persisted, both panels). Owner/group come from the ls-style SFTP longname remotely and cached uid/gid lookups locally (POSIX; undefined on Windows). All columns sort. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type {
|
||||
AppSettings,
|
||||
ColumnKey,
|
||||
ConnectionConfig,
|
||||
ConnectionsFile,
|
||||
EntryType,
|
||||
@@ -134,6 +135,8 @@ export type AppRPC = {
|
||||
response: Result;
|
||||
};
|
||||
moveToTrash: { params: { path: string }; response: Result };
|
||||
/** Native column-picker menu (right-click on the list headers). */
|
||||
showColumnsMenu: { params: { visible: ColumnKey[] }; response: Result };
|
||||
// editor windows
|
||||
/** Main window only: open (or focus) a native editor window. */
|
||||
openEditor: { params: EditorOpenContext; response: Result };
|
||||
|
||||
@@ -7,8 +7,13 @@ export interface FileEntry {
|
||||
size: number; // bytes
|
||||
mtime: number; // epoch milliseconds
|
||||
mode: number; // permission bits only (masked & 0o7777)
|
||||
owner?: string; // resolved name when the provider knows it
|
||||
group?: string;
|
||||
}
|
||||
|
||||
/** Optional file-list columns (Name is always shown). */
|
||||
export type ColumnKey = "size" | "mtime" | "kind" | "rights" | "owner" | "group";
|
||||
|
||||
/** Every RPC response uses this envelope; errors never cross the bridge as exceptions. */
|
||||
export type Result<T = object> = ({ ok: true } & T) | { ok: false; error: string };
|
||||
|
||||
@@ -75,6 +80,8 @@ export interface AppSettings {
|
||||
accent: AccentTone;
|
||||
/** File-list icons: plain neutral glyphs, or per-category glyphs and colors. */
|
||||
iconColors: "plain" | "multi";
|
||||
/** Visible optional file-list columns (both panels; Name always shows). */
|
||||
columns: ColumnKey[];
|
||||
speedUnit: "MBps" | "Mbps";
|
||||
/** Size of the panel interface: file list, path bar, header controls. */
|
||||
textSize: "compact" | "default" | "large";
|
||||
@@ -95,6 +102,7 @@ export const DEFAULT_SETTINGS: AppSettings = {
|
||||
darkTone: "dark",
|
||||
accent: "blue",
|
||||
iconColors: "multi",
|
||||
columns: ["size", "mtime"],
|
||||
speedUnit: "MBps",
|
||||
textSize: "default",
|
||||
transferMode: "single",
|
||||
|
||||
Reference in New Issue
Block a user