Files
claude-mode/omarchy/smoido.claude-mode/DeleteStage.qml
T
smoidoandClaude Opus 5 bb01418ce0 Split the bar panel into one QML file per stage
Panel.qml keeps the state, the CLI calls and the stage switch (889 lines,
was 2360); each stage is its own file taking the panel as a required
property. The omarchy installer copies every QML/JS file and clears stale
ones. tests/static.sh filters qmllint on [syntax], not the word error.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 02:12:49 +03:00

58 lines
1.8 KiB
QML

import QtQuick
import qs.Commons
import qs.Ui
// DeleteStage.qml - Delete: confirmed, and says so when it leaves a provider empty.
//
// One stage of the claude-mode panel. Panel.qml hands itself in as `panel`
// and owns all the state and actions; this file only draws them.
Column {
id: stage
required property var panel
width: parent.width
visible: stage.panel.stage === "presetDelete"
spacing: Style.space(7)
readonly property bool lastOne: stage.panel.stage === "presetDelete"
&& stage.panel.presetsOf(stage.panel.editProvider).length <= 1
Text {
width: parent.width
text: "Delete '" + stage.panel.editPreset + "'?"
color: Color.popups.text
elide: Text.ElideRight
font.family: stage.panel.uiFont
font.pixelSize: Style.space(13)
font.bold: true
}
Text {
width: parent.width
text: "The preset file is removed, and there is no undo from here. Its key stays in the vault."
color: Color.muted
wrapMode: Text.WordWrap
font.family: stage.panel.uiFont
font.pixelSize: Style.space(10)
}
Text {
width: parent.width
visible: parent.lastOne
text: "It is the only " + stage.panel.pTitle(stage.panel.editProvider) + " preset, so "
+ stage.panel.pTitle(stage.panel.editProvider) + " will have nothing to switch to until you create another."
color: stage.panel.urgentColor
wrapMode: Text.WordWrap
font.family: stage.panel.uiFont
font.pixelSize: Style.space(10)
}
Flow {
width: parent.width
spacing: Style.space(7)
PillButton { fontFamily: stage.panel.uiFont; label: "Delete it"; primary: true; onTriggered: stage.panel.deletePreset() }
PillButton { fontFamily: stage.panel.uiFont; label: "Back"; onTriggered: { stage.panel.lastError = ""; stage.panel.stage = "preset" } }
}
}