Files
gniza4linux/tui/gniza.tcss
shuki 8a83812584 Add background jobs system with Running Tasks screen
Backup and restore operations now run as background jobs instead of
blocking modal screens. Users can navigate away and check progress
from a dedicated Running Tasks screen. OperationLog supports attaching
to running jobs with live output polling.

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

363 lines
4.7 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,
#schedule-edit,
#settings-screen,
#schedule-screen,
#backup-screen,
#restore-screen,
#retention-screen,
#snapshots-screen,
#targets-screen,
#remotes-screen,
#running-tasks-screen,
#logs-screen {
padding: 1 2;
overflow-y: auto;
}
Input {
margin: 0 0 1 0;
}
Select {
margin: 0 0 1 0;
}
SelectionList {
height: auto;
max-height: 8;
margin: 0 0 1 0;
}
/* MySQL restore toggle */
#restore-mysql-row {
height: 3;
align: left middle;
margin: 0 0 1 0;
}
#restore-mysql-row Static {
width: auto;
height: 3;
content-align: left middle;
}
#restore-mysql-row Switch {
height: 3;
margin: 0 1;
}
/* 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,
#rt-buttons,
#logs-buttons,
#snapshots-buttons,
#sched-buttons,
#sched-edit-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,
#rt-buttons Button,
#logs-buttons Button,
#snapshots-buttons Button,
#sched-buttons Button,
#sched-edit-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-footer {
height: auto;
margin: 1 0 0 0;
}
#ol-spinner {
width: auto;
min-width: 20;
height: 3;
margin: 0 0 0 1;
content-align: left middle;
color: #00cc00;
}
#ol-log {
height: 1fr;
border: round $accent;
}
#ol-close {
margin: 0;
}
/* Snapshot browser */
#snapshot-browser {
width: 80%;
height: 80%;
padding: 1;
background: $panel;
border: thick $accent;
}
#sb-title {
text-style: bold;
color: #00cc00;
margin: 0 0 1 0;
}
#sb-tree {
height: 1fr;
border: round $accent;
}
#sb-buttons {
height: auto;
margin: 1 0 0 0;
}
#sb-buttons Button {
margin: 0 1 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;
}