mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 23:25: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
@@ -8,6 +8,7 @@
|
|||||||
- Plugins can say how they show in the mobile app
|
- Plugins can say how they show in the mobile app
|
||||||
- The plugin list tells the mobile app which plugin API each plugin needs, so the app can say when it or a plugin needs an update
|
- The plugin list tells the mobile app which plugin API each plugin needs, so the app can say when it or a plugin needs an update
|
||||||
- Hosts can have a color and an icon, which sync to the desktop and mobile apps
|
- Hosts can have a color and an icon, which sync to the desktop and mobile apps
|
||||||
|
- A sidebar setting to turn off alternating row colors
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|||||||
@@ -87,6 +87,8 @@ export interface HostSidebarDisplayPreferences extends HostRowFields {
|
|||||||
openOnDoubleClick: boolean;
|
openOnDoubleClick: boolean;
|
||||||
/** When false, nested folders hide the parent-path breadcrumb before their name. */
|
/** When false, nested folders hide the parent-path breadcrumb before their name. */
|
||||||
showFolderPaths: boolean;
|
showFolderPaths: boolean;
|
||||||
|
/** When false, rows keep one background instead of alternating. */
|
||||||
|
stripedRows: boolean;
|
||||||
hostClickBehavior: HostClickBehavior;
|
hostClickBehavior: HostClickBehavior;
|
||||||
/** When true, the sidebar closes after a host is opened from it. */
|
/** When true, the sidebar closes after a host is opened from it. */
|
||||||
closeOnOpen: boolean;
|
closeOnOpen: boolean;
|
||||||
@@ -164,6 +166,7 @@ export function defaultHostSidebarPreferences(): HostSidebarPreferences {
|
|||||||
statusColorScheme: "accent",
|
statusColorScheme: "accent",
|
||||||
openOnDoubleClick: false,
|
openOnDoubleClick: false,
|
||||||
showFolderPaths: true,
|
showFolderPaths: true,
|
||||||
|
stripedRows: true,
|
||||||
hostClickBehavior: "newTab",
|
hostClickBehavior: "newTab",
|
||||||
closeOnOpen: false,
|
closeOnOpen: false,
|
||||||
barActions: {},
|
barActions: {},
|
||||||
@@ -272,6 +275,10 @@ export function sanitizeHostSidebarPreferences(
|
|||||||
typeof displayObj.showFolderPaths === "boolean"
|
typeof displayObj.showFolderPaths === "boolean"
|
||||||
? displayObj.showFolderPaths
|
? displayObj.showFolderPaths
|
||||||
: defaults.display.showFolderPaths,
|
: defaults.display.showFolderPaths,
|
||||||
|
stripedRows:
|
||||||
|
typeof displayObj.stripedRows === "boolean"
|
||||||
|
? displayObj.stripedRows
|
||||||
|
: defaults.display.stripedRows,
|
||||||
hostClickBehavior: HOST_CLICK_BEHAVIORS.includes(
|
hostClickBehavior: HOST_CLICK_BEHAVIORS.includes(
|
||||||
displayObj.hostClickBehavior as HostClickBehavior,
|
displayObj.hostClickBehavior as HostClickBehavior,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -590,6 +590,8 @@
|
|||||||
"closeOnOpenDesc": "Close the sidebar after you open a host from it",
|
"closeOnOpenDesc": "Close the sidebar after you open a host from it",
|
||||||
"showFolderPaths": "Show folder paths",
|
"showFolderPaths": "Show folder paths",
|
||||||
"showFolderPathsDesc": "Show the parent folder path above nested subfolder names. Subfolders stay indented either way.",
|
"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",
|
"rowDetailsTitle": "Row details",
|
||||||
"rowDetailsDesc": "Choose what shows on each host.",
|
"rowDetailsDesc": "Choose what shows on each host.",
|
||||||
"showAddress": "Address",
|
"showAddress": "Address",
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ describe("defaultHostSidebarPreferences", () => {
|
|||||||
statusColorScheme: "accent",
|
statusColorScheme: "accent",
|
||||||
openOnDoubleClick: false,
|
openOnDoubleClick: false,
|
||||||
showFolderPaths: true,
|
showFolderPaths: true,
|
||||||
|
stripedRows: true,
|
||||||
hostClickBehavior: "newTab",
|
hostClickBehavior: "newTab",
|
||||||
closeOnOpen: false,
|
closeOnOpen: false,
|
||||||
barActions: {},
|
barActions: {},
|
||||||
@@ -74,6 +75,7 @@ describe("sanitizeHostSidebarPreferences", () => {
|
|||||||
statusColorScheme: "status",
|
statusColorScheme: "status",
|
||||||
openOnDoubleClick: true,
|
openOnDoubleClick: true,
|
||||||
showFolderPaths: false,
|
showFolderPaths: false,
|
||||||
|
stripedRows: true,
|
||||||
hostClickBehavior: "focusExistingDoubleClickNew",
|
hostClickBehavior: "focusExistingDoubleClickNew",
|
||||||
closeOnOpen: true,
|
closeOnOpen: true,
|
||||||
barActions: { maintenance: true },
|
barActions: { maintenance: true },
|
||||||
|
|||||||
Reference in new issue
Block a user