fix: rename Build with AI → Search with AI, sync panel CSS to amber theme
- All copy: "Build with AI" → "Search with AI", "Build Search" → "Search", "Building…" → "Searching…", "Filters updated" → "Filters ready" - Remove ✦ sparkle from toggle button - Replace all var(--color-accent) (purple) with var(--app-primary) (amber) - Fix var(--color-surface-1) → var(--color-surface) (surface-1 does not exist) - Toggle muted at rest, amber on hover/open — matches sidebar toolbar style - SettingsView aria-label updated to match
This commit is contained in:
parent
55b278ff8e
commit
c0a92315d9
2 changed files with 48 additions and 31 deletions
|
|
@ -10,8 +10,7 @@
|
||||||
aria-controls="llm-panel"
|
aria-controls="llm-panel"
|
||||||
@click="toggle"
|
@click="toggle"
|
||||||
>
|
>
|
||||||
<span class="llm-panel-toggle__icon" aria-hidden="true">✦</span>
|
Search with AI
|
||||||
Build with AI
|
|
||||||
<span class="llm-panel-toggle__chevron" aria-hidden="true">{{ isOpen ? '▲' : '▾' }}</span>
|
<span class="llm-panel-toggle__chevron" aria-hidden="true">{{ isOpen ? '▲' : '▾' }}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
@ -33,17 +32,17 @@
|
||||||
placeholder="e.g. used RTX 3080 under $300, no mining cards or for-parts listings"
|
placeholder="e.g. used RTX 3080 under $300, no mining cards or for-parts listings"
|
||||||
:disabled="isLoading"
|
:disabled="isLoading"
|
||||||
@keydown.escape.prevent="handleEscape"
|
@keydown.escape.prevent="handleEscape"
|
||||||
@keydown.ctrl.enter.prevent="onBuild"
|
@keydown.ctrl.enter.prevent="onSearch"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="llm-panel__actions">
|
<div class="llm-panel__actions">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="llm-panel__build-btn"
|
class="llm-panel__search-btn"
|
||||||
:disabled="isLoading || !inputText.trim()"
|
:disabled="isLoading || !inputText.trim()"
|
||||||
@click="onBuild"
|
@click="onSearch"
|
||||||
>
|
>
|
||||||
{{ isLoading ? 'Building…' : 'Build Search' }}
|
{{ isLoading ? 'Searching…' : 'Search' }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<span
|
<span
|
||||||
|
|
@ -56,7 +55,7 @@
|
||||||
<span class="llm-panel__spinner" aria-hidden="true" />
|
<span class="llm-panel__spinner" aria-hidden="true" />
|
||||||
Thinking…
|
Thinking…
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="status === 'done'">Filters updated</span>
|
<span v-else-if="status === 'done'">Filters ready</span>
|
||||||
<span v-else-if="status === 'error'">Error</span>
|
<span v-else-if="status === 'error'">Error</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -75,7 +74,7 @@
|
||||||
:checked="autoRun"
|
:checked="autoRun"
|
||||||
@change="setAutoRun(($event.target as HTMLInputElement).checked)"
|
@change="setAutoRun(($event.target as HTMLInputElement).checked)"
|
||||||
/>
|
/>
|
||||||
Run search automatically after building
|
Run search automatically
|
||||||
</label>
|
</label>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -107,7 +106,7 @@ watch(isOpen, async (open) => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
async function onBuild() {
|
async function onSearch() {
|
||||||
await buildQuery(inputText.value)
|
await buildQuery(inputText.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -123,34 +122,42 @@ function handleEscape() {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Toggle — muted at rest, amber on hover/open. Matches sidebar toolbar buttons. */
|
||||||
.llm-panel-toggle {
|
.llm-panel-toggle {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: var(--space-2);
|
gap: var(--space-2);
|
||||||
padding: var(--space-2) var(--space-3);
|
padding: var(--space-2) var(--space-3);
|
||||||
background: color-mix(in srgb, var(--color-accent) 12%, transparent);
|
background: var(--color-surface-raised);
|
||||||
border: 1px solid color-mix(in srgb, var(--color-accent) 35%, transparent);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--radius-md);
|
border-radius: var(--radius-md);
|
||||||
color: var(--color-accent);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.85rem;
|
font-size: 0.8rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.15s, border-color 0.15s;
|
transition: background var(--transition), border-color var(--transition), color var(--transition);
|
||||||
margin-bottom: var(--space-2);
|
margin-bottom: var(--space-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.llm-panel-toggle:hover,
|
.llm-panel-toggle:hover {
|
||||||
.llm-panel-toggle--open {
|
background: var(--app-primary-light);
|
||||||
background: color-mix(in srgb, var(--color-accent) 20%, transparent);
|
border-color: var(--app-primary);
|
||||||
border-color: var(--color-accent);
|
color: var(--app-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.llm-panel-toggle--open {
|
||||||
|
background: var(--app-primary-light);
|
||||||
|
border-color: var(--app-primary);
|
||||||
|
color: var(--app-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Panel */
|
||||||
.llm-panel {
|
.llm-panel {
|
||||||
display: none;
|
display: none;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-3);
|
gap: var(--space-3);
|
||||||
padding: var(--space-4);
|
padding: var(--space-4);
|
||||||
background: var(--color-surface-2);
|
background: var(--color-surface-raised);
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--radius-md);
|
border-radius: var(--radius-md);
|
||||||
margin-bottom: var(--space-3);
|
margin-bottom: var(--space-3);
|
||||||
|
|
@ -161,15 +168,17 @@ function handleEscape() {
|
||||||
}
|
}
|
||||||
|
|
||||||
.llm-panel__label {
|
.llm-panel__label {
|
||||||
font-size: 0.85rem;
|
font-size: 0.8rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--color-text-muted);
|
color: var(--color-text-muted);
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.llm-panel__textarea {
|
.llm-panel__textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: var(--space-2) var(--space-3);
|
padding: var(--space-2) var(--space-3);
|
||||||
background: var(--color-surface-1);
|
background: var(--color-surface);
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
|
|
@ -179,8 +188,9 @@ function handleEscape() {
|
||||||
}
|
}
|
||||||
|
|
||||||
.llm-panel__textarea:focus {
|
.llm-panel__textarea:focus {
|
||||||
outline: 2px solid var(--color-accent);
|
outline: 2px solid var(--app-primary);
|
||||||
outline-offset: 1px;
|
outline-offset: 1px;
|
||||||
|
border-color: var(--app-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.llm-panel__actions {
|
.llm-panel__actions {
|
||||||
|
|
@ -190,25 +200,32 @@ function handleEscape() {
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.llm-panel__build-btn {
|
/* Search button — same amber style as the main Search button */
|
||||||
|
.llm-panel__search-btn {
|
||||||
padding: var(--space-2) var(--space-4);
|
padding: var(--space-2) var(--space-4);
|
||||||
background: var(--color-accent);
|
background: var(--app-primary);
|
||||||
color: #fff;
|
color: var(--color-text-inverse);
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: var(--radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
transition: background var(--transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
.llm-panel__build-btn:disabled {
|
.llm-panel__search-btn:hover:not(:disabled) {
|
||||||
opacity: 0.5;
|
background: var(--app-primary-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
.llm-panel__search-btn:disabled {
|
||||||
|
opacity: 0.4;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.llm-panel__status-pill {
|
.llm-panel__status-pill {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--color-text-muted);
|
color: var(--color-text-muted);
|
||||||
|
font-family: var(--font-mono);
|
||||||
}
|
}
|
||||||
|
|
||||||
.llm-panel__status-pill--idle {
|
.llm-panel__status-pill--idle {
|
||||||
|
|
@ -228,7 +245,7 @@ function handleEscape() {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 0.75em;
|
width: 0.75em;
|
||||||
height: 0.75em;
|
height: 0.75em;
|
||||||
border: 2px solid var(--color-accent);
|
border: 2px solid var(--app-primary);
|
||||||
border-top-color: transparent;
|
border-top-color: transparent;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
animation: llm-spin 0.7s linear infinite;
|
animation: llm-spin 0.7s linear infinite;
|
||||||
|
|
|
||||||
|
|
@ -85,9 +85,9 @@
|
||||||
|
|
||||||
<label class="settings-toggle">
|
<label class="settings-toggle">
|
||||||
<div class="settings-toggle-text">
|
<div class="settings-toggle-text">
|
||||||
<span class="settings-toggle-label">Auto-run after Build with AI</span>
|
<span class="settings-toggle-label">Auto-run after Search with AI</span>
|
||||||
<span class="settings-toggle-desc">
|
<span class="settings-toggle-desc">
|
||||||
When enabled, Snipe starts searching immediately after the AI fills in your filters.
|
When enabled, Snipe starts searching immediately after AI fills in your filters.
|
||||||
Disable to review the filters before searching.
|
Disable to review the filters before searching.
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -95,7 +95,7 @@
|
||||||
class="toggle-btn"
|
class="toggle-btn"
|
||||||
:class="{ 'toggle-btn--on': llmAutoRun }"
|
:class="{ 'toggle-btn--on': llmAutoRun }"
|
||||||
:aria-pressed="String(llmAutoRun)"
|
:aria-pressed="String(llmAutoRun)"
|
||||||
aria-label="Run search automatically after AI builds filters"
|
aria-label="Run search automatically after Search with AI"
|
||||||
@click="setLLMAutoRun(!llmAutoRun)"
|
@click="setLLMAutoRun(!llmAutoRun)"
|
||||||
>
|
>
|
||||||
<span class="toggle-btn__track" />
|
<span class="toggle-btn__track" />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue