fix(chat): Improve menu click targets and dismissal
This commit is contained in:
1 parent
cc5cb24b59
commit
48fe3f025e
1 file changed
+17
-2
+17
-2
@@ -261,9 +261,23 @@
|
||||
}
|
||||
#model-selector {
|
||||
left: 1rem;
|
||||
padding: 0;
|
||||
}
|
||||
#model-selector > summary {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
#model-selector > .model-opt__label {
|
||||
margin: 0 0.5rem;
|
||||
}
|
||||
#model-selector > .model-opt__label:last-child {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
#history-panel {
|
||||
right: 1rem;
|
||||
padding: 0;
|
||||
}
|
||||
#history-panel > summary {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
#model-selector:is(:hover, [open]),
|
||||
#history-panel:is(:hover, [open]) {
|
||||
@@ -272,6 +286,7 @@
|
||||
.history-list {
|
||||
min-width: 220px;
|
||||
max-width: 320px;
|
||||
margin: 0 0.5rem 0.5rem;
|
||||
padding-top: 0.5rem;
|
||||
background: var(--bg-primary);
|
||||
border: 1px solid var(--border-color);
|
||||
@@ -411,7 +426,7 @@
|
||||
<button class="submit" :class="isBusy && 'busy'" @click="isBusy ? abort() : handleSubmit()" x-text="isBusy ? 'Cancel' : 'Send'"></button>
|
||||
|
||||
<!-- Model Selector -->
|
||||
<details id="model-selector" x-show="!attachment">
|
||||
<details id="model-selector" x-show="!attachment" @click.outside="$el.open = false" @keydown.escape.window="$el.open = false">
|
||||
<summary x-text="'Model: ' + activeModelName"></summary>
|
||||
<template x-for="m in models" :key="m.name">
|
||||
<label class="model-opt__label" style="display: block">
|
||||
@@ -422,7 +437,7 @@
|
||||
</details>
|
||||
|
||||
<!-- History -->
|
||||
<details id="history-panel" x-ref="historyPanel" x-show="!attachment">
|
||||
<details id="history-panel" x-ref="historyPanel" x-show="!attachment" @click.outside="$el.open = false" @keydown.escape.window="$el.open = false">
|
||||
<summary>History</summary>
|
||||
<div class="history-list">
|
||||
<template x-if="historyItems.length === 0">
|
||||
|
||||
Reference in new issue
Block a user