Files
gniza4linux/tui/gniza.tcss
shuki e6aa828111 Toggle SSH key/password fields by auth method and add key file browser
Show only the SSH key path input (with Browse button) when auth method
is "key", and only the password input when auth method is "password".
Adds a FilePicker widget for browsing SSH key files, defaulting to
~/.ssh directory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 02:53:31 +02:00

288 lines
3.6 KiB
Plaintext

/* gniza TUI theme */
Screen {
background: $surface;
}
#screen-title {
text-style: bold;
color: #00cc00;
padding: 1 0;
text-align: center;
}
/* Main menu */
#main-layout {
width: 100%;
height: 1fr;
align: center middle;
}
#logo {
width: auto;
min-width: 40;
height: auto;
padding: 1 3;
content-align: center middle;
}
#menu-list {
width: 1fr;
max-width: 35;
height: 20;
margin: 1 2 0 2;
}
/* Data tables */
DataTable {
height: 12;
margin: 1 0;
}
/* Form screens */
#target-edit,
#remote-edit,
#settings-screen,
#schedule-screen,
#backup-screen,
#restore-screen,
#retention-screen,
#snapshots-screen,
#targets-screen,
#remotes-screen,
#logs-screen {
padding: 1 2;
overflow-y: auto;
}
Input {
margin: 0 0 1 0;
}
Select {
margin: 0 0 1 0;
}
/* Browse row */
#restore-dest-row {
height: auto;
margin: 0 0 1 0;
}
#restore-dest-row Input {
width: 1fr;
}
#restore-dest-row Button {
width: auto;
min-width: 12;
margin: 0 0 0 1;
}
/* Button rows */
#backup-buttons,
#restore-buttons,
#ret-buttons,
#targets-buttons,
#remotes-buttons,
#logs-buttons,
#sched-buttons,
#te-buttons,
#re-buttons,
#set-buttons {
height: auto;
margin: 1 0;
}
#backup-buttons Button,
#restore-buttons Button,
#ret-buttons Button,
#targets-buttons Button,
#remotes-buttons Button,
#logs-buttons Button,
#sched-buttons Button,
#te-buttons Button,
#re-buttons Button,
#set-buttons Button {
margin: 0 1 0 0;
}
/* Dialogs */
#confirm-dialog {
width: 60;
height: auto;
padding: 2;
background: $panel;
border: thick $accent;
}
#cd-title {
text-style: bold;
color: #00cc00;
margin: 0 0 1 0;
}
#cd-message {
margin: 0 0 1 0;
}
#cd-buttons {
height: auto;
align: center middle;
}
#cd-buttons Button {
margin: 0 1 0 0;
}
/* Folder picker */
#folder-picker {
width: 70;
height: 30;
padding: 1;
background: $panel;
border: thick $accent;
}
#fp-title {
text-style: bold;
color: #00cc00;
margin: 0 0 1 0;
}
#fp-tree {
height: 1fr;
}
#fp-new-row {
height: auto;
margin: 1 0 0 0;
}
#fp-new-row Input {
width: 1fr;
}
#fp-new-row Button {
width: auto;
min-width: 16;
margin: 0 0 0 1;
}
#fp-buttons {
height: auto;
margin: 1 0 0 0;
}
#fp-buttons Button {
margin: 0 1 0 0;
}
/* Operation log */
#op-log {
width: 80%;
height: 80%;
padding: 1;
background: $panel;
border: thick $accent;
}
#ol-title {
text-style: bold;
color: #00cc00;
margin: 0 0 1 0;
}
#ol-log {
height: 1fr;
border: round $accent;
}
#ol-close {
margin: 1 0 0 0;
}
/* Log viewer */
#log-viewer {
height: 1fr;
min-height: 8;
border: round $accent;
margin: 1 0;
}
/* Wizard */
#wizard {
width: 60;
padding: 2;
}
#wizard Button {
width: 100%;
margin: 0 0 1 0;
}
#wizard-welcome {
margin: 0 0 1 0;
}
/* Switch row */
#te-switch-row {
height: auto;
align: left middle;
margin: 0 0 1 0;
}
Switch {
margin: 0 1;
}
.section-label {
text-style: bold;
color: #00cc00;
margin: 1 0 0 0;
}
/* SSH key browse row */
#re-key-row {
height: auto;
margin: 0 0 1 0;
}
#re-key-row Input {
width: 1fr;
}
#re-key-row Button {
width: auto;
min-width: 12;
margin: 0 0 0 1;
}
/* File picker */
#file-picker {
width: 70;
height: 30;
padding: 1;
background: $panel;
border: thick $accent;
}
#fip-title {
text-style: bold;
color: #00cc00;
margin: 0 0 1 0;
}
#fip-tree {
height: 1fr;
}
#fip-buttons {
height: auto;
margin: 1 0 0 0;
}
#fip-buttons Button {
margin: 0 1 0 0;
}