aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/assistant/Card.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-12-04 11:32:58 +0100
committerDanilo M. <danix@danix.xyz>2026-12-04 11:32:58 +0100
commitfeda206462824b52adad1fff83b04599c3076509 (patch)
tree6880209e972f6e5298b5ec993ddf2bbd9a6310d0 /desktop/assistant/Card.qml
parent2830b2c1dd5ebe8ebcb5a48816479eff0b0950f6 (diff)
downloadquickshell-feda206462824b52adad1fff83b04599c3076509.tar.gz
quickshell-feda206462824b52adad1fff83b04599c3076509.zip
feat(assistant): title bar with face, chat title, enlarge and close
A row above the chat header: the assistant's face, the chat's title from the daemon ("Desktop Assistant" until it has one), and enlarge and close. Enlarged, the tall card fills the screen but a margin, for the session. Avatar moves out of Message.qml to be shared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/assistant/Card.qml')
-rw-r--r--desktop/assistant/Card.qml44
1 files changed, 43 insertions, 1 deletions
diff --git a/desktop/assistant/Card.qml b/desktop/assistant/Card.qml
index f4e1af1..15819c6 100644
--- a/desktop/assistant/Card.qml
+++ b/desktop/assistant/Card.qml
@@ -40,6 +40,7 @@ Rectangle {
+ (status.visible ? status.height + 10 : 0)
+ (actions.visible ? actions.height + 10 : 0)
Behavior on height { NumberAnimation { duration: 180; easing.type: Easing.OutCubic } }
+ Behavior on width { NumberAnimation { duration: 180; easing.type: Easing.OutCubic } }
clip: true
color: Qt.alpha(Theme.base, 0.82)
@@ -161,12 +162,53 @@ Rectangle {
function onChattingChanged() { input.forceActiveFocus(); }
}
+ // --- title bar (chat): the face, the chat's title, enlarge and close ---
+
+ Item {
+ id: titleBar
+ visible: card.mode === "chat"
+ anchors { top: parent.top; left: parent.left; right: parent.right; margins: 14 }
+ height: 28
+
+ Avatar {
+ anchors { left: parent.left; verticalCenter: parent.verticalCenter }
+ width: 28
+ source: card.canvas.face.length ? card.canvas.fileUrl(card.canvas.backdrop) : ""
+ crop: card.canvas.face
+ }
+ Text {
+ anchors.centerIn: parent
+ width: Math.min(implicitWidth, parent.width - 2 * (winBtns.width + 12))
+ elide: Text.ElideRight
+ text: card.canvas.title || "Desktop Assistant"
+ color: Theme.subtext
+ font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2; bold: true }
+ }
+ // nf-fa-compress / nf-fa-expand and nf-fa-xmark, as Keystone's
+ // titlebar.
+ Row {
+ id: winBtns
+ anchors { right: parent.right; verticalCenter: parent.verticalCenter }
+ spacing: 6
+ WindowButton {
+ icon: card.canvas.big ? "\uf066" : "\uf065"
+ onClicked: card.canvas.big = !card.canvas.big
+ }
+ WindowButton {
+ icon: "\uf00d"
+ danger: true
+ onClicked: card.canvas.close()
+ }
+ }
+ }
+
// --- header (chat) ---
Item {
id: header
visible: card.mode === "chat"
- anchors { top: parent.top; left: parent.left; right: parent.right; margins: 14 }
+ anchors { top: titleBar.bottom; left: parent.left; right: parent.right
+ topMargin: 8; leftMargin: 14; rightMargin: 14 }
height: 32
// The chat's model, a click opens the model panel. nf-fa-cloud for a