aboutsummaryrefslogtreecommitdiffstats
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/deck.css16
-rw-r--r--static/modules/assistant.js2
2 files changed, 18 insertions, 0 deletions
diff --git a/static/deck.css b/static/deck.css
index d998af4..3c45e98 100644
--- a/static/deck.css
+++ b/static/deck.css
@@ -686,3 +686,19 @@ select {
}
#asleep[hidden] { display: none; }
.asleep-moon { font-size: 3rem; color: var(--udt-overlay0); }
+
+/* The Assistant tab's backdrop ([assistant] background, served at /api/bg):
+ the picture's subject rising from the bottom-right corner, desaturated
+ and faded out toward the content; stronger while the chat is empty. No
+ image configured: the URL answers 404 and nothing shows. */
+.assistant { position: relative; }
+.assistant::before {
+ content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
+ /* ponytail: sized for the 1280x800 tablet; the subject centre sits ~74% across */
+ background: url("/api/bg") no-repeat right -300px top / auto 108%;
+ filter: saturate(.75) brightness(.9);
+ opacity: .07; transition: opacity .6s;
+ mask-image: radial-gradient(ellipse 27% 56% at 74% 40%, #000 30%, transparent 100%);
+}
+.assistant.idle::before { opacity: .24; }
+.assistant > * { position: relative; z-index: 1; }
diff --git a/static/modules/assistant.js b/static/modules/assistant.js
index 99df15b..257fb2e 100644
--- a/static/modules/assistant.js
+++ b/static/modules/assistant.js
@@ -316,6 +316,8 @@ export default {
off._offline = null;
el._busy = !!st.pending || st.state !== "idle";
+ // The backdrop shows more while the chat is empty.
+ el.querySelector(".assistant").classList.toggle("idle", !st.turns.length && !st.pending);
const model = el.querySelector(".as-model");
const cloud = st.models.some((m) => m.cloud && m.id === st.wanted);
model.querySelector("i").textContent = cloud ? G.cloud : "";