mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 07:05:24 +00:00
feat: sidebar preference for alternating rows (#1712)
This commit is contained in:
1 parent
523fdf2e81
commit
d330f4a64c
4 files changed
+12
No files matched your search
@@ -87,6 +87,8 @@ export interface HostSidebarDisplayPreferences extends HostRowFields {
|
||||
openOnDoubleClick: boolean;
|
||||
/** When false, nested folders hide the parent-path breadcrumb before their name. */
|
||||
showFolderPaths: boolean;
|
||||
/** When false, rows keep one background instead of alternating. */
|
||||
stripedRows: boolean;
|
||||
hostClickBehavior: HostClickBehavior;
|
||||
/** When true, the sidebar closes after a host is opened from it. */
|
||||
closeOnOpen: boolean;
|
||||
@@ -164,6 +166,7 @@ export function defaultHostSidebarPreferences(): HostSidebarPreferences {
|
||||
statusColorScheme: "accent",
|
||||
openOnDoubleClick: false,
|
||||
showFolderPaths: true,
|
||||
stripedRows: true,
|
||||
hostClickBehavior: "newTab",
|
||||
closeOnOpen: false,
|
||||
barActions: {},
|
||||
@@ -272,6 +275,10 @@ export function sanitizeHostSidebarPreferences(
|
||||
typeof displayObj.showFolderPaths === "boolean"
|
||||
? displayObj.showFolderPaths
|
||||
: defaults.display.showFolderPaths,
|
||||
stripedRows:
|
||||
typeof displayObj.stripedRows === "boolean"
|
||||
? displayObj.stripedRows
|
||||
: defaults.display.stripedRows,
|
||||
hostClickBehavior: HOST_CLICK_BEHAVIORS.includes(
|
||||
displayObj.hostClickBehavior as HostClickBehavior,
|
||||
)
|
||||
|
||||
@@ -590,6 +590,8 @@
|
||||
"closeOnOpenDesc": "Close the sidebar after you open a host from it",
|
||||
"showFolderPaths": "Show folder paths",
|
||||
"showFolderPathsDesc": "Show the parent folder path above nested subfolder names. Subfolders stay indented either way.",
|
||||
"stripedRows": "Alternating row colors",
|
||||
"stripedRowsDesc": "Shade every other row in the host and login lists",
|
||||
"rowDetailsTitle": "Row details",
|
||||
"rowDetailsDesc": "Choose what shows on each host.",
|
||||
"showAddress": "Address",
|
||||
|
||||
@@ -27,6 +27,7 @@ describe("defaultHostSidebarPreferences", () => {
|
||||
statusColorScheme: "accent",
|
||||
openOnDoubleClick: false,
|
||||
showFolderPaths: true,
|
||||
stripedRows: true,
|
||||
hostClickBehavior: "newTab",
|
||||
closeOnOpen: false,
|
||||
barActions: {},
|
||||
@@ -74,6 +75,7 @@ describe("sanitizeHostSidebarPreferences", () => {
|
||||
statusColorScheme: "status",
|
||||
openOnDoubleClick: true,
|
||||
showFolderPaths: false,
|
||||
stripedRows: true,
|
||||
hostClickBehavior: "focusExistingDoubleClickNew",
|
||||
closeOnOpen: true,
|
||||
barActions: { maintenance: true },
|
||||
|
||||
Reference in new issue
Block a user