diff --git a/frontend/src/assets/base.css b/frontend/src/assets/base.css index 1c3638b..63b502e 100644 --- a/frontend/src/assets/base.css +++ b/frontend/src/assets/base.css @@ -6,7 +6,7 @@ --vt-c-black: #181818; --vt-c-black-soft: #222222; - --vt-c-black-mute: #282828; + --vt-c-black-mute: #2c2c2c; --vt-c-indigo: #2c3e50; @@ -25,17 +25,25 @@ --color-green: #00bd7e; --color-green-dark: #003825; --color-blue: #3d8de1; + --color-violet: #9250ff; } /* semantic color and size variables for this project */ :root { + --color-background: var(--vt-c-black); + + /* only one background, the rest should be surface colors */ --color-background-soft: var(--vt-c-black-soft); --color-background-mute: var(--vt-c-black-mute); --color-background-hover: var(--vt-c-black-mute); --color-background-active: var(--vt-c-black-mute); + --color-surface: var(--color-background-soft); + --color-surface-strong: var(--color-background-mute); + --color-surface-input: var(--color-background); + --color-border: var(--vt-c-divider-dark-2); --color-border-hover: var(--vt-c-divider-dark-1); @@ -46,6 +54,11 @@ --color-active: var(--color-heading); + --color-highlight: var(--color-violet); + --color-primary: var(--color-green); + --color-secondary: var(--color-blue); + --color-error: #d54141; + --border-radius: 6px; --section-gap: 160px; --header-height: 4em; diff --git a/frontend/src/assets/main.css b/frontend/src/assets/main.css index 510795a..cef314b 100644 --- a/frontend/src/assets/main.css +++ b/frontend/src/assets/main.css @@ -13,6 +13,14 @@ main { overflow: auto; } +main section { + margin: 1em; + padding: 1em; + border: 1px solid var(--color-border); + border-radius: var(--border-radius); + background-color: var(--color-surface); +} + .main-sidebar { height: 100dvh; display: flex; @@ -37,17 +45,53 @@ a { padding: 3px; } -button { - color: inherit; - background-color: var(--color-background-soft); +button, .button { + color: var(--color-text); + background-color: var(--color-surface-strong); + padding: 0.6em; border: 1px solid var(--color-border); border-radius: var(--border-radius); } -button { +button.hollow, .button.hollow { + background: none; + border: none; +} + +button.hollow:hover { + border: none; +} + +button:hover { + color: var(--color-heading); border-color: var(--color-border-hover); } +button.hollow.primary { color: var(--color-primary); } +button.hollow.error { color: var(--color-error); } + +input, textarea, select { + font-size: inherit; + padding: 0.6em; + border: 1px solid var(--color-border); + color: var(--color-text); + background-color: var(--color-surface-input); + border-radius: var(--border-radius); +} + +input:hover, textarea:hover, select:hover { + border: 1px solid var(--color-border-hover); +} + +input:focus, textarea:focus, select:focus { + outline: none; + border: 1px solid var(--color-primary); +} + +input:disabled, textarea:disabled, select:disabled { + background-color: var(--color-surface); +} + .with-sidebar-expanded .when-sidebar-collapsed { display: none; } \ No newline at end of file diff --git a/frontend/src/chat.js b/frontend/src/chat.js index 196ae04..a696d07 100644 --- a/frontend/src/chat.js +++ b/frontend/src/chat.js @@ -150,18 +150,12 @@ export class ChatSession { // fast access map this.threadMap = {}; - this.editInfo = computed(() => { - const parts = [this.creatingThread.value ? 'New Thread' : `Thread ${this.currentThreadId.value}`]; - if (this.editingMessageId.value != null) { - if (this.noteMode.value) { - parts.push(`Editing Note ${this.editingMessageId.value}`); - } else { - parts.push(`Editing ${this.editingMessageId.value}`); - } - } else if (this.noteMode.value) { - parts.push('Editing Note'); - } - return parts.join(' - '); + this.statusLine = computed(() => { + return this.creatingThread.value ? + (this.editingMessageId.value != null ? 'Forking Message' : 'New Thread') : + (this.editingMessageId.value != null ? 'Editing Message' : + this.currentThreadId == null ? 'Writing in Chat Root' : null + ); }); // Internals diff --git a/frontend/src/components/Message.vue b/frontend/src/components/Message.vue index 1ad2236..9511de7 100644 --- a/frontend/src/components/Message.vue +++ b/frontend/src/components/Message.vue @@ -43,8 +43,7 @@ function chatEntryClass(msg) { return ['log']; } else if (msg.type == 'thread-header') { let cls = ['thread']; - if (!msg.active) cls.push('thread-open') - if (msg.isFork) cls.push('thread-fork'); + if (!msg.active) cls.push(msg.isFork ? 'thread-fork' : 'thread-closed') return cls; } else { return ['info']; @@ -247,22 +246,18 @@ watch(() => [props.message.format, props.message.content], ([newFormat, newConte width: 100%; text-align: center; user-select: none; - border-top: 1px solid var(--color-border); } -.thread.thread-open { +.thread:hover { + border-color: 1px solid var(--color-text); +} + +.thread-closed { + border-bottom: 1px solid var(--color-border); cursor: pointer; } -.thread-open:hover { - border-top: 1px solid var(--color-heading); -} - -.thread.thread-fork { - border-top: none; -} - -.thread.thread-fork.thread-open { +.thread-fork { width: fit-content; border: 1px solid var(--color-border); border-radius: var(--border-radius); diff --git a/frontend/src/components/TitleBar.vue b/frontend/src/components/TitleBar.vue index eff03f7..f6b1854 100644 --- a/frontend/src/components/TitleBar.vue +++ b/frontend/src/components/TitleBar.vue @@ -27,6 +27,10 @@ padding: 0 0.4em; } + .main-header { + background-color: var(--color-surface); + } + .header-button { height: var(--header-height); width: var(--header-height); diff --git a/frontend/src/components/main/Sidebar.vue b/frontend/src/components/main/Sidebar.vue index 3898f47..a6d5717 100644 --- a/frontend/src/components/main/Sidebar.vue +++ b/frontend/src/components/main/Sidebar.vue @@ -124,6 +124,10 @@ \ No newline at end of file