diff options
Diffstat (limited to 'desktop/modules/deckit')
| -rw-r--r-- | desktop/modules/deckit/DeckItControlModule.qml | 63 | ||||
| -rw-r--r-- | desktop/modules/deckit/DeckItGeneralPage.qml | 2 | ||||
| -rw-r--r-- | desktop/modules/deckit/DeckItModule.qml | 2 | ||||
| -rw-r--r-- | desktop/modules/deckit/README.md | 10 |
4 files changed, 7 insertions, 70 deletions
diff --git a/desktop/modules/deckit/DeckItControlModule.qml b/desktop/modules/deckit/DeckItControlModule.qml deleted file mode 100644 index 311de1c..0000000 --- a/desktop/modules/deckit/DeckItControlModule.qml +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2026 Danilo M. <danix@danix.xyz> -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2 as -// published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - - -import QtQuick -import "../.." - -// deck-it's runtime controls in the drawer: its state, Start, Stop and -// Restart. Its settings stay in the settings window's deck-it pages. -Module { - name: "deckit-run" - label: "deck-it" - // nf-md-tablet, as on the Server page. - icon: "" - - page: Component { - Page { - title: "deck-it" - Column { - width: parent.width - spacing: 12 - // `deck-it status` polls only while this page is open. - Component.onCompleted: DeckIt.watchers++ - Component.onDestruction: DeckIt.watchers-- - - Text { - width: parent.width - wrapMode: Text.Wrap - text: ({ start: "Starting…", stop: "Stopping…", restart: "Restarting…" })[DeckIt.busy] - ?? DeckIt.summary - color: DeckIt.healthy ? Theme.green : DeckIt.running ? Theme.yellow : Theme.red - font { family: Theme.fontFamily; pixelSize: Theme.fontSize } - } - Row { - spacing: 8 - Button { - text: "Start" - enabled: !DeckIt.busy && !!DeckIt.status && !DeckIt.running - onClicked: DeckIt.control("start") - } - Button { - text: "Stop" - enabled: !DeckIt.busy && DeckIt.running - onClicked: DeckIt.control("stop") - } - Button { - text: "Restart" - enabled: !DeckIt.busy && DeckIt.running - onClicked: DeckIt.control("restart") - } - } - } - } - } -} diff --git a/desktop/modules/deckit/DeckItGeneralPage.qml b/desktop/modules/deckit/DeckItGeneralPage.qml index 7bcfe71..934912a 100644 --- a/desktop/modules/deckit/DeckItGeneralPage.qml +++ b/desktop/modules/deckit/DeckItGeneralPage.qml @@ -25,7 +25,7 @@ Column { readonly property var st: DeckIt.store function def(section, key) { return col.st.fallback(section, key); } - Small { text: DeckIt.path + ", only the keys that differ from deck-it's defaults. Saved changes apply when deck-it restarts (the drawer's deck-it tile)." } + Small { text: DeckIt.path + ", only the keys that differ from deck-it's defaults. Saved changes apply when deck-it restarts (the drawer's Services)." } Small { visible: DeckIt.defaultsError !== ""; color: Theme.red; text: DeckIt.defaultsError } Component.onCompleted: DeckIt.watchers++ Component.onDestruction: DeckIt.watchers-- diff --git a/desktop/modules/deckit/DeckItModule.qml b/desktop/modules/deckit/DeckItModule.qml index a47e7da..1a20170 100644 --- a/desktop/modules/deckit/DeckItModule.qml +++ b/desktop/modules/deckit/DeckItModule.qml @@ -15,7 +15,7 @@ import "../.." import "../qtmaildir" // deck-it, the tablet dashboard: Server, the first of its four pages, with -// its state in the header; Start, Stop and Restart are the drawer's deck-it tile. See README.md. +// its state in the header; Start, Stop and Restart are in the drawer's Services. See README.md. Module { id: mod name: "deckit" diff --git a/desktop/modules/deckit/README.md b/desktop/modules/deckit/README.md index b3bd39b..59e5d4e 100644 --- a/desktop/modules/deckit/README.md +++ b/desktop/modules/deckit/README.md @@ -2,8 +2,8 @@ Four settings pages, in their own deck-it sidebar group, for deck-it (the tablet dashboard, its own repo): whether it starts at login, and its -`~/.config/deck-it/config.toml`. Running it is the drawer's: a deck-it tile -(`DeckItControlModule`) with its state, Start, Stop and Restart. +`~/.config/deck-it/config.toml`. Running it is the drawer's: its row on the +Services page (`modules/services`) has its state, Start, Stop and Restart. - Server (`DeckItModule`, `DeckItGeneralPage`): the config path, Start (start at login, Wi-Fi address), Display, Tabs (the tablet's tabs) and @@ -42,11 +42,11 @@ Launchers are desktop ids (`[launch] apps`), added from the installed apps the way the Autostart page picks one, minus terminal apps. Up and Remove edit the list; the order is the button order on the tablet. -deck-it reads its config once at start, so a save applies on the drawer -tile's Restart, which runs `deck-it stop` and then the login command; Start +deck-it reads its config once at start, so a save applies on the +Services row's Restart, which runs `deck-it stop` and then the login command; Start runs the login command, Stop `deck-it stop`. -While the Server page or the drawer's deck-it page is open it polls `deck-it +While the Server page or the drawer's Services page is open it polls `deck-it status` (JSON: server, display, waiting, tablet, extend) every 2s and shows one line: green when the server runs with a tablet tunnelled (and the display streams, if enabled), yellow while starting or waiting for the tablet, red |
