topside-arch 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -12
- package/contrib/aur/.SRCINFO +20 -0
- package/contrib/aur/PKGBUILD +3 -3
- package/contrib/aur/topside-arch.install +9 -6
- package/dist/cli/commands.js +63 -11
- package/dist/cli/main.js +3 -3
- package/dist/daemon/session-state.js +7 -1
- package/dist/dms/setup.js +20 -9
- package/dist/hosts/hosts.js +2 -2
- package/dist/sekaipop/setup.js +63 -6
- package/dist/service/unit.js +77 -0
- package/dist/shared/qml-lib.js +2 -1
- package/package.json +1 -1
- package/shell/core/BoardDetail.qml +42 -2
- package/shell/core/BoardList.qml +67 -81
- package/shell/core/BoardNotice.qml +9 -7
- package/shell/core/FlapText.qml +21 -6
- package/shell/core/SessionRow.qml +41 -4
- package/shell/core/TicketDetail.qml +76 -7
- package/shell/core/TicketList.qml +133 -55
- package/shell/core/TopsideClient.qml +3 -0
- package/shell/core/board.js +8 -14
- package/shell/core/hiding.js +39 -0
- package/shell/core/ticket.js +39 -0
- package/shell/dms-plugin/TopsideWidget.qml +28 -46
- package/shell/pill.qml +1 -1
- package/shell/sekaipop-plugin/Bar.qml +1 -2
- package/shell/sekaipop-plugin/Card.qml +35 -30
- package/shell/sekaipop-plugin/Floating.qml +9 -18
- package/shell/sekaipop-plugin/ListWindow.qml +15 -15
- package/shell/sekaipop-plugin/Service.qml +29 -25
- package/shell/sekaipop-plugin/StyledCard.qml +23 -8
- package/shell/sekaipop-plugin/place.js +28 -0
- package/shell/sekaipop-plugin/plugin.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import QtQuick
|
|
2
2
|
import QtQuick.Layouts
|
|
3
3
|
import "core" as Topside
|
|
4
|
+
import "core/hiding.js" as Hiding
|
|
4
5
|
|
|
5
6
|
// Topside's card on SekaiPop, drawn in Topside's theme: the logotype
|
|
6
7
|
// header, then a completion card, the questions and requests, and the
|
|
@@ -10,6 +11,23 @@ import "core" as Topside
|
|
|
10
11
|
Item {
|
|
11
12
|
id: root
|
|
12
13
|
required property var service
|
|
14
|
+
// Hiding asks first (VIA-PARITY §29): a hide asked from a row, not yet
|
|
15
|
+
// confirmed, { folder, text, sessionId }. It recounts on every snapshot
|
|
16
|
+
// and goes with its session, Keep, or the card closing.
|
|
17
|
+
property var hideAsk: null
|
|
18
|
+
readonly property var hideRule: hideAsk ? Hiding.question(hideAsk, hideAsk.sessionId, service.listed) : null
|
|
19
|
+
onVisibleChanged: hideAsk = null
|
|
20
|
+
// The popup's card is built once and kept, so its own `visible` never
|
|
21
|
+
// changes when SekaiPop closes the popup; the service says so instead.
|
|
22
|
+
Connections {
|
|
23
|
+
target: root.service
|
|
24
|
+
function onPopupOpenChanged() {
|
|
25
|
+
if (!root.service.popupOpen) root.hideAsk = null;
|
|
26
|
+
}
|
|
27
|
+
function onFloatingOpenChanged() {
|
|
28
|
+
if (!root.service.floatingOpen) root.hideAsk = null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
13
31
|
readonly property var client: service.client
|
|
14
32
|
// The shell's icon font, for the header keys.
|
|
15
33
|
property string iconFont: ""
|
|
@@ -113,6 +131,11 @@ Item {
|
|
|
113
131
|
Layout.fillWidth: true
|
|
114
132
|
}
|
|
115
133
|
|
|
134
|
+
HeaderKey {
|
|
135
|
+
text: root.service.sounds ? "volume_up" : "volume_off"
|
|
136
|
+
onClicked: root.service.toggleSounds()
|
|
137
|
+
}
|
|
138
|
+
|
|
116
139
|
HeaderKey {
|
|
117
140
|
text: "settings"
|
|
118
141
|
onClicked: root.service.openSettings()
|
|
@@ -187,11 +210,20 @@ Item {
|
|
|
187
210
|
required property var modelData
|
|
188
211
|
session: modelData
|
|
189
212
|
canHide: true
|
|
213
|
+
hideQuestion: root.hideRule && root.hideRule.sessionId === modelData.id ? Hiding.questionText(root.hideRule, "session") : ""
|
|
214
|
+
hideCount: root.hideRule ? root.hideRule.caught.length : 0
|
|
215
|
+
willHide: root.hideRule !== null && root.hideRule.caught.indexOf(modelData.id) >= 0
|
|
190
216
|
Layout.fillWidth: true
|
|
191
217
|
onActivated: root.client.jump(modelData.id)
|
|
192
218
|
onHoveredChanged: if (hovered) root.service.hoveredSession = modelData.id; else if (root.service.hoveredSession === modelData.id) root.service.hoveredSession = ""
|
|
193
|
-
onHideFolder: root.
|
|
194
|
-
onHidePrompt: root.
|
|
219
|
+
onHideFolder: root.hideAsk = { folder: true, text: modelData.cwd || "", sessionId: modelData.id }
|
|
220
|
+
onHidePrompt: root.hideAsk = { folder: false, text: modelData.title || "", sessionId: modelData.id }
|
|
221
|
+
onHideKept: root.hideAsk = null
|
|
222
|
+
onHideConfirmed: {
|
|
223
|
+
const q = root.hideRule;
|
|
224
|
+
root.hideAsk = null;
|
|
225
|
+
if (q) root.service.hide(q.folder ? "hiddenFolders" : "hiddenPrompts", q.text);
|
|
226
|
+
}
|
|
195
227
|
}
|
|
196
228
|
}
|
|
197
229
|
}
|
|
@@ -212,33 +244,6 @@ Item {
|
|
|
212
244
|
}
|
|
213
245
|
}
|
|
214
246
|
|
|
215
|
-
// Undo for the last hide, for 6 s.
|
|
216
|
-
Rectangle {
|
|
217
|
-
visible: root.service.undo !== null
|
|
218
|
-
Layout.fillWidth: true
|
|
219
|
-
implicitHeight: 32
|
|
220
|
-
radius: Topside.Theme.buttonRadius
|
|
221
|
-
color: Topside.Theme.bgRaised
|
|
222
|
-
RowLayout {
|
|
223
|
-
anchors.fill: parent
|
|
224
|
-
anchors.leftMargin: 12
|
|
225
|
-
anchors.rightMargin: 6
|
|
226
|
-
Text {
|
|
227
|
-
text: root.service.undo ? root.service.undo.label : ""
|
|
228
|
-
color: Topside.Theme.fgDim
|
|
229
|
-
font.family: Topside.Theme.font
|
|
230
|
-
font.pixelSize: Topside.Theme.content
|
|
231
|
-
elide: Text.ElideRight
|
|
232
|
-
Layout.fillWidth: true
|
|
233
|
-
}
|
|
234
|
-
Topside.CardButton {
|
|
235
|
-
label: "Undo"
|
|
236
|
-
implicitHeight: 24
|
|
237
|
-
onClicked: root.service.undoHide()
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
247
|
Text {
|
|
243
248
|
visible: root.client.jumpError !== ""
|
|
244
249
|
text: root.client.jumpError
|
|
@@ -277,7 +282,7 @@ Item {
|
|
|
277
282
|
|
|
278
283
|
Text {
|
|
279
284
|
visible: root.client.sessions.length === 0
|
|
280
|
-
text: root.client.connected ? "No sessions yet. Start
|
|
285
|
+
text: root.client.connected ? "No sessions yet. Start claude, codex, pi or omp in a terminal." : "Topside is off."
|
|
281
286
|
color: Topside.Theme.fgDim
|
|
282
287
|
font.family: Topside.Theme.font
|
|
283
288
|
font.pixelSize: Topside.Theme.s(13)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import QtQuick
|
|
2
2
|
import Quickshell
|
|
3
3
|
import Quickshell.Wayland
|
|
4
|
+
import "place.js" as Place
|
|
4
5
|
|
|
5
6
|
// Topside's own window for the cards that open by themselves on SekaiPop: a
|
|
6
7
|
// request, a question, a finished turn, a reminder. SekaiPop's popup would
|
|
@@ -24,34 +25,24 @@ PanelWindow {
|
|
|
24
25
|
implicitWidth: card.implicitWidth
|
|
25
26
|
implicitHeight: card.implicitHeight
|
|
26
27
|
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
// on that monitor (Game Mode hides it), at the top centre. The entry's spot
|
|
30
|
-
// is in its bar window, which spans its edge of the screen. It's measured when
|
|
31
|
-
// the card opens, so it reads the service's flag, never this window's own
|
|
28
|
+
// Placed as the list is (place.js). The entry's spot is measured when the
|
|
29
|
+
// card opens, so it reads the service's flag, never this window's own
|
|
32
30
|
// `visible`: that made a binding loop, Qt stopped the evaluation, and the
|
|
33
31
|
// card sat in the top left corner (CR-20261118-001).
|
|
34
32
|
readonly property string edge: entry ? entry.edge : "top"
|
|
35
33
|
readonly property var spot: {
|
|
36
|
-
if (!entry || !entry.item || !entry.item.visible || !service.floatingOpen) return
|
|
34
|
+
if (!entry || !entry.item || !entry.item.visible || !service.floatingOpen) return null;
|
|
37
35
|
const a = entry.item.mapToItem(null, 0, 0);
|
|
38
36
|
const b = entry.item.mapToItem(null, entry.item.width, entry.item.height);
|
|
39
|
-
|
|
40
|
-
return { x: a.x, y: a.y, w: b.x - a.x, h: b.y - a.y, winW: win ? win.width : 0, winH: win ? win.height : 0 };
|
|
37
|
+
return { x: a.x, y: a.y, w: b.x - a.x, h: b.y - a.y };
|
|
41
38
|
}
|
|
42
39
|
readonly property int gap: 10
|
|
43
40
|
readonly property real screenWidth: screen ? screen.width : 1920
|
|
44
41
|
|
|
45
|
-
anchors.top:
|
|
46
|
-
anchors.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
margins.top: edge === "top" ? spot.y + spot.h + gap : edge === "bottom" ? 0 : Math.max(gap, spot.y)
|
|
50
|
-
margins.bottom: edge === "bottom" ? spot.winH - spot.y + gap : 0
|
|
51
|
-
margins.left: edge === "left" ? spot.x + spot.w + gap
|
|
52
|
-
: edge === "right" ? 0
|
|
53
|
-
: Math.max(gap, Math.min(screenWidth - card.implicitWidth - gap, (spot.w > 0 ? spot.x + spot.w / 2 : screenWidth / 2) - card.implicitWidth / 2))
|
|
54
|
-
margins.right: edge === "right" ? spot.winW - spot.x + gap : 0
|
|
42
|
+
anchors.top: true
|
|
43
|
+
anchors.left: true
|
|
44
|
+
margins.top: Place.top(edge, spot, gap, 0)
|
|
45
|
+
margins.left: Place.left(edge, spot, screenWidth, card.implicitWidth, gap)
|
|
55
46
|
|
|
56
47
|
// The classic card or the board or ticket, as Settings > Style says.
|
|
57
48
|
Loader {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import QtQuick
|
|
2
2
|
import Quickshell
|
|
3
3
|
import Quickshell.Wayland
|
|
4
|
+
import "core/board.js" as Board
|
|
5
|
+
import "place.js" as Place
|
|
4
6
|
|
|
5
7
|
// The list in Topside's own window, for Style: Board (the departures) and
|
|
6
8
|
// Ticket (the kitchen rail): the screen dims, and under the bar entry, with
|
|
@@ -47,7 +49,7 @@ PanelWindow {
|
|
|
47
49
|
const b = entry.item.mapToItem(null, entry.item.width, entry.item.height);
|
|
48
50
|
return { x: a.x, y: a.y, w: b.x - a.x, h: b.y - a.y };
|
|
49
51
|
}
|
|
50
|
-
readonly property int gap:
|
|
52
|
+
readonly property int gap: 10
|
|
51
53
|
|
|
52
54
|
Item {
|
|
53
55
|
id: area
|
|
@@ -76,14 +78,9 @@ PanelWindow {
|
|
|
76
78
|
id: holder
|
|
77
79
|
width: card.implicitWidth
|
|
78
80
|
height: card.implicitHeight
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
(window.spot ? window.spot.x + window.spot.w / 2 : area.width / 2) - width / 2))
|
|
83
|
-
// Below the bar entry on a top bar, even one that keeps no zone.
|
|
84
|
-
y: window.edge === "bottom" ? area.height - window.gap - height
|
|
85
|
-
: window.edge === "top" && window.spot ? Math.max(window.gap, window.spot.y + window.spot.h + window.gap - area.startsAt)
|
|
86
|
-
: window.gap
|
|
81
|
+
// Placed as the floating card is (place.js).
|
|
82
|
+
x: Place.left(window.edge, window.spot, area.width, width, window.gap)
|
|
83
|
+
y: Place.top(window.edge, window.spot, window.gap, area.startsAt)
|
|
87
84
|
transform: Translate {
|
|
88
85
|
y: -(holder.y + holder.height + 20) * (1 - window.drop)
|
|
89
86
|
}
|
|
@@ -94,10 +91,8 @@ PanelWindow {
|
|
|
94
91
|
service: window.service
|
|
95
92
|
iconFont: window.service.iconFont
|
|
96
93
|
floating: false
|
|
97
|
-
listWidth: Math.min(window.service.style === "
|
|
98
|
-
|
|
99
|
-
// only known from its height: measure from the top gap instead.
|
|
100
|
-
maxHeight: Math.floor(area.height * 0.85) - (window.edge === "bottom" ? window.gap : holder.y)
|
|
94
|
+
listWidth: Math.min(window.service.style === "kitchen" ? 900 : window.service.boardWidth(window.screen ? window.screen.width : 1920), area.width - 2 * window.gap)
|
|
95
|
+
maxHeight: Board.listRoom(area.height, holder.y)
|
|
101
96
|
onCloseRequested: window.service.closeList()
|
|
102
97
|
}
|
|
103
98
|
}
|
|
@@ -109,11 +104,16 @@ PanelWindow {
|
|
|
109
104
|
focus: true
|
|
110
105
|
Keys.onPressed: event => {
|
|
111
106
|
if (event.key === Qt.Key_Escape) {
|
|
107
|
+
// An open hide question goes first; the list stays.
|
|
108
|
+
if (card.cancelHide()) {
|
|
109
|
+
event.accepted = true;
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
112
|
window.service.closeList();
|
|
113
113
|
event.accepted = true;
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
|
-
event.accepted = window.service.handleKey(event, card.firstQuestion());
|
|
116
|
+
event.accepted = window.service.handleKey(event, card.firstQuestion(), (id, decision) => card.stampKey(id, decision));
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
@@ -124,7 +124,7 @@ PanelWindow {
|
|
|
124
124
|
ParallelAnimation {
|
|
125
125
|
id: lower
|
|
126
126
|
// The rail doesn't drop: it's there, and its tickets swing in.
|
|
127
|
-
NumberAnimation { target: window; property: "drop"; to: 1; duration: window.service.style === "
|
|
127
|
+
NumberAnimation { target: window; property: "drop"; to: 1; duration: window.service.style === "kitchen" ? 0 : 500; easing.type: Easing.OutBack; easing.overshoot: 1.3 }
|
|
128
128
|
NumberAnimation { target: window; property: "shown"; to: 1; duration: 300 }
|
|
129
129
|
}
|
|
130
130
|
SequentialAnimation {
|
|
@@ -37,9 +37,14 @@ Scope {
|
|
|
37
37
|
// "Match SekaiPop" (ShellLook.qml, set up by Bar.qml): the cards take the
|
|
38
38
|
// shell's surfaces, outline, shape and font, and its light or dark mode.
|
|
39
39
|
readonly property bool matchShell: (settings.look ?? "shell") === "shell"
|
|
40
|
-
// Style: "board", the departure board (the default), "
|
|
41
|
-
// tickets (both StyledCard.qml), or "classic", Topside's cards
|
|
42
|
-
|
|
40
|
+
// Style: "board", the departure board (the default), "kitchen", the order
|
|
41
|
+
// tickets and the rail (both StyledCard.qml), or "classic", Topside's cards
|
|
42
|
+
// (Card.qml). Kitchen was called Ticket, stored as "ticket": it still reads,
|
|
43
|
+
// and is saved again under its new name so the settings form shows it picked.
|
|
44
|
+
readonly property string style: settings.style === "classic" ? "classic"
|
|
45
|
+
: settings.style === "kitchen" || settings.style === "ticket" ? "kitchen" : "board"
|
|
46
|
+
readonly property string storedStyle: settings.style ?? ""
|
|
47
|
+
onStoredStyleChanged: if (storedStyle === "ticket") root.host.setSetting("style", "kitchen")
|
|
43
48
|
readonly property bool styled: style !== "classic"
|
|
44
49
|
// Popup.qml closes itself on this (only it can put the popup away).
|
|
45
50
|
signal closeWanted()
|
|
@@ -186,6 +191,11 @@ Scope {
|
|
|
186
191
|
root.preview(name);
|
|
187
192
|
}
|
|
188
193
|
|
|
194
|
+
// The speaker in every header flips the Sounds switch.
|
|
195
|
+
function toggleSounds() {
|
|
196
|
+
root.host.setSetting("sounds", !root.sounds);
|
|
197
|
+
}
|
|
198
|
+
|
|
189
199
|
// Plays a sound whatever the switch says, so a pick can be heard.
|
|
190
200
|
function preview(name) {
|
|
191
201
|
player.command = ["canberra-gtk-play", "-i", name];
|
|
@@ -264,39 +274,30 @@ Scope {
|
|
|
264
274
|
Binding { target: daemon; property: "hiddenFolders"; value: root.hiddenFolders }
|
|
265
275
|
Binding { target: daemon; property: "hiddenPrompts"; value: root.hiddenPrompts }
|
|
266
276
|
|
|
267
|
-
//
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
id: undoTimer
|
|
271
|
-
interval: 6000
|
|
272
|
-
onTriggered: root.undo = null
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
function hide(key, entry, label) {
|
|
277
|
+
// A hide the user confirmed (the surfaces ask first, VIA-PARITY §29).
|
|
278
|
+
// There's no Undo: Settings lists every entry with a way to remove it.
|
|
279
|
+
function hide(key, entry) {
|
|
276
280
|
if (entry === "") return;
|
|
277
281
|
const list = key === "hiddenFolders" ? root.hiddenFolders : root.hiddenPrompts;
|
|
278
282
|
root.host.setSetting(key, Hiding.added(list, entry).join("\n"));
|
|
279
|
-
root.undo = { key: key, entry: entry, label: label };
|
|
280
|
-
undoTimer.restart();
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
function undoHide() {
|
|
284
|
-
if (!root.undo) return;
|
|
285
|
-
const list = root.undo.key === "hiddenFolders" ? root.hiddenFolders : root.hiddenPrompts;
|
|
286
|
-
root.host.setSetting(root.undo.key, Hiding.removed(list, root.undo.entry).join("\n"));
|
|
287
|
-
root.undo = null;
|
|
288
283
|
}
|
|
289
284
|
|
|
290
285
|
// ⌃Y ⌃N ⌃A answer the first request card, ⌃1…⌃9 pick an option of the
|
|
291
286
|
// first question, ⌃J jumps: the open card's session, else the row under
|
|
292
287
|
// the pointer, else the newest. Escape is the shell's: it closes the
|
|
293
288
|
// popup and never answers anything.
|
|
294
|
-
|
|
289
|
+
// `stamper(approvalId, decision)`, when given, presses a Kitchen ticket's
|
|
290
|
+
// stamp for the request it shows (slam and tear first, as a click) and
|
|
291
|
+
// says whether it did; otherwise the answer goes at once.
|
|
292
|
+
function handleKey(event, questionCard, stamper) {
|
|
295
293
|
if (!(event.modifiers & Qt.ControlModifier)) return false;
|
|
296
294
|
const approval = daemon.questions.length === 0 ? daemon.approvals[0] : null;
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
295
|
+
const decide = d => {
|
|
296
|
+
if (!(stamper && stamper(approval.id, d))) daemon.decide(approval.id, d);
|
|
297
|
+
};
|
|
298
|
+
if (approval && event.key === Qt.Key_Y) decide("allow");
|
|
299
|
+
else if (approval && event.key === Qt.Key_N) decide("deny");
|
|
300
|
+
else if (approval && event.key === Qt.Key_A && approval.always) decide("always");
|
|
300
301
|
else if (questionCard && event.key >= Qt.Key_1 && event.key <= Qt.Key_9) {
|
|
301
302
|
const options = daemon.questions[0].questions[0].options;
|
|
302
303
|
const option = options[event.key - Qt.Key_1];
|
|
@@ -342,6 +343,9 @@ Scope {
|
|
|
342
343
|
// app you were in).
|
|
343
344
|
askBeforeJump: true
|
|
344
345
|
onJumpAsked: sessionId => {
|
|
346
|
+
// One jump at a time: a second ask inside the 150 ms would replace
|
|
347
|
+
// the first target.
|
|
348
|
+
if (jumpLater.running) return;
|
|
345
349
|
const held = root.listOpen || root.popupOpen;
|
|
346
350
|
root.closeWanted();
|
|
347
351
|
root.closeFloating();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import QtQuick
|
|
2
2
|
import "core" as Topside
|
|
3
3
|
import "core/board.js" as Board
|
|
4
|
+
import "core/hiding.js" as Hiding
|
|
4
5
|
|
|
5
6
|
// Topside on SekaiPop in a style of its own (Settings > Style: Board or
|
|
6
7
|
// Ticket): what Card.qml is for the classic style. In Topside's own window
|
|
@@ -23,7 +24,7 @@ Item {
|
|
|
23
24
|
property real listWidth: 480
|
|
24
25
|
signal closeRequested()
|
|
25
26
|
|
|
26
|
-
readonly property bool ticket: service.style === "
|
|
27
|
+
readonly property bool ticket: service.style === "kitchen"
|
|
27
28
|
readonly property var pending: Board.pending(client.approvals, client.questions)
|
|
28
29
|
|
|
29
30
|
// The item that takes ⌃1…⌃9 like the classic question card.
|
|
@@ -44,7 +45,11 @@ Item {
|
|
|
44
45
|
if (root.floating && root.service.floatingOpen) {
|
|
45
46
|
if (root.ticket) {
|
|
46
47
|
if (content.item) content.item.reprint();
|
|
47
|
-
} else
|
|
48
|
+
} else {
|
|
49
|
+
lower.restart();
|
|
50
|
+
// Every flap riffles as the board comes down.
|
|
51
|
+
if (content.item) content.item.riffleSerial++;
|
|
52
|
+
}
|
|
48
53
|
}
|
|
49
54
|
}
|
|
50
55
|
}
|
|
@@ -64,6 +69,14 @@ Item {
|
|
|
64
69
|
scroller.contentY = 0;
|
|
65
70
|
if (content.item && typeof content.item.reset === "function") content.item.reset();
|
|
66
71
|
}
|
|
72
|
+
// Esc on the list: drops an open hide question. True when there was one.
|
|
73
|
+
function cancelHide() {
|
|
74
|
+
return content.item && typeof content.item.cancelHide === "function" ? content.item.cancelHide() : false;
|
|
75
|
+
}
|
|
76
|
+
// ⌃Y ⌃N ⌃A in Kitchen: the ticket's stamp, when one shows that request.
|
|
77
|
+
function stampKey(approvalId, decision) {
|
|
78
|
+
return ticket && content.item && typeof content.item.stampKey === "function" ? content.item.stampKey(approvalId, decision) : false;
|
|
79
|
+
}
|
|
67
80
|
|
|
68
81
|
Flickable {
|
|
69
82
|
id: scroller
|
|
@@ -121,10 +134,10 @@ Item {
|
|
|
121
134
|
|
|
122
135
|
// The two lists take the same wiring.
|
|
123
136
|
function hideFolder(session) {
|
|
124
|
-
root.service.hide("hiddenFolders", session.cwd
|
|
137
|
+
root.service.hide("hiddenFolders", session.cwd || "");
|
|
125
138
|
}
|
|
126
139
|
function hidePrompt(session) {
|
|
127
|
-
root.service.hide("hiddenPrompts",
|
|
140
|
+
root.service.hide("hiddenPrompts", Hiding.promptRule(session.title));
|
|
128
141
|
}
|
|
129
142
|
function quit() {
|
|
130
143
|
root.closeRequested();
|
|
@@ -142,14 +155,15 @@ Item {
|
|
|
142
155
|
usageAgent: root.service.usageAgent
|
|
143
156
|
spend: root.client.spend[root.service.usageSession] || null
|
|
144
157
|
shortcuts: true
|
|
145
|
-
undoLabel: root.service.undo ? root.service.undo.label : ""
|
|
146
158
|
iconFont: root.iconFont
|
|
147
159
|
onMoreRequested: all => root.service.showAll = all
|
|
148
160
|
onHovered: id => root.service.hoveredSession = id
|
|
149
161
|
onHideFolder: session => root.hideFolder(session)
|
|
150
162
|
onHidePrompt: session => root.hidePrompt(session)
|
|
151
|
-
onUndoRequested: root.service.undoHide()
|
|
152
163
|
onSettingsRequested: root.service.openSettings()
|
|
164
|
+
soundSwitch: true
|
|
165
|
+
soundsOn: root.service.sounds
|
|
166
|
+
onSoundsToggled: root.service.toggleSounds()
|
|
153
167
|
onQuitRequested: root.quit()
|
|
154
168
|
onStartRequested: root.service.controlDaemon("start")
|
|
155
169
|
}
|
|
@@ -165,13 +179,14 @@ Item {
|
|
|
165
179
|
usageAgent: root.service.usageAgent
|
|
166
180
|
spend: root.client.spend[root.service.usageSession] || null
|
|
167
181
|
shortcuts: true
|
|
168
|
-
undoLabel: root.service.undo ? root.service.undo.label : ""
|
|
169
182
|
iconFont: root.iconFont
|
|
170
183
|
onHovered: id => root.service.hoveredSession = id
|
|
171
184
|
onHideFolder: session => root.hideFolder(session)
|
|
172
185
|
onHidePrompt: session => root.hidePrompt(session)
|
|
173
|
-
onUndoRequested: root.service.undoHide()
|
|
174
186
|
onSettingsRequested: root.service.openSettings()
|
|
187
|
+
soundSwitch: true
|
|
188
|
+
soundsOn: root.service.sounds
|
|
189
|
+
onSoundsToggled: root.service.toggleSounds()
|
|
175
190
|
onQuitRequested: root.quit()
|
|
176
191
|
onStartRequested: root.service.controlDaemon("start")
|
|
177
192
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.pragma library
|
|
2
|
+
|
|
3
|
+
// Where Topside's own windows on SekaiPop sit, the floating card
|
|
4
|
+
// (Floating.qml) and the list (ListWindow.qml), so they can't drift apart
|
|
5
|
+
// again (CR-20261120-002, CR-20261120-003). On a top bar: under the entry
|
|
6
|
+
// and centred on it. On any other bar, or with no entry shown (Game Mode
|
|
7
|
+
// hides it): the top centre, `gap` from the top. A side or bottom bar's
|
|
8
|
+
// entry can sit anywhere along its edge, and a card placed by it ran off the
|
|
9
|
+
// screen. Always kept on the screen.
|
|
10
|
+
//
|
|
11
|
+
// `spot` is the entry's { x, y, w, h } in its bar window, which spans its
|
|
12
|
+
// edge of the screen; null, or an empty one, when it isn't shown.
|
|
13
|
+
|
|
14
|
+
function byEntry(edge, spot) {
|
|
15
|
+
return edge === "top" && spot !== null && spot !== undefined && spot.w > 0 && spot.h > 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// The window's left edge in an area `areaWidth` wide.
|
|
19
|
+
function left(edge, spot, areaWidth, width, gap) {
|
|
20
|
+
var centre = byEntry(edge, spot) ? spot.x + spot.w / 2 : areaWidth / 2;
|
|
21
|
+
return Math.max(gap, Math.min(areaWidth - width - gap, centre - width / 2));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// The window's top, in an area that starts `startsAt` below the screen's
|
|
25
|
+
// top (the bar's zone, for a window that keeps out of it).
|
|
26
|
+
function top(edge, spot, gap, startsAt) {
|
|
27
|
+
return byEntry(edge, spot) ? Math.max(gap, spot.y + spot.h + gap - startsAt) : gap;
|
|
28
|
+
}
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
"hiddenPrompts": { "label": "Hidden prompts", "description": "One per line. Sessions whose first prompt contains one are hidden.", "multiline": true, "group": "Hidden sessions" },
|
|
73
73
|
"style": {
|
|
74
74
|
"label": "Style",
|
|
75
|
-
"description": "Board: a split-flap departure board lowers with each request, and the list is the departures.
|
|
75
|
+
"description": "Board: a split-flap departure board lowers with each request, and the list is the departures. Kitchen: each request prints as an order ticket you stamp, and the list is the kitchen rail. Classic: Topside's cards.",
|
|
76
76
|
"group": "Appearance",
|
|
77
|
-
"choices": [{ "value": "board", "label": "Board" }, { "value": "
|
|
77
|
+
"choices": [{ "value": "board", "label": "Board" }, { "value": "kitchen", "label": "Kitchen" }, { "value": "classic", "label": "Classic" }]
|
|
78
78
|
},
|
|
79
79
|
"look": {
|
|
80
80
|
"label": "Look",
|