auto-git:
[change] src/App.jsx [change] src/colorSchemes.js [change] src/styles.css
This commit is contained in:
18
src/App.jsx
18
src/App.jsx
@@ -1430,9 +1430,21 @@ async function createNewChat() {
|
||||
placeholder="Ask any question..."
|
||||
maxRows={13}
|
||||
/>
|
||||
<button className={"websearch-toggle" + (webSearchEnabled ? " active" : "")} onClick={toggleWebSearch} title="Toggle web search" aria-pressed={webSearchEnabled}>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className={"websearch-toggle" + (webSearchEnabled ? " active" : "")}
|
||||
onClick={toggleWebSearch}
|
||||
title="Toggle web search"
|
||||
aria-pressed={webSearchEnabled}
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"
|
||||
stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"
|
||||
aria-hidden="true">
|
||||
<circle cx="12" cy="12" r="10"/>
|
||||
<line x1="2" y1="12" x2="22" y2="12"/>
|
||||
<path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>
|
||||
</svg>
|
||||
</button>
|
||||
<button className="button" onClick={sendMessage} disabled={isSending}>
|
||||
{isSending ? <div className="spinner"></div> : 'Send'}
|
||||
</button>
|
||||
|
||||
@@ -43,10 +43,10 @@ const colorSchemes = {
|
||||
'--panel': '#e0ffe0',
|
||||
'--text': '#1a1a1a',
|
||||
'--muted': '#72a272ff',
|
||||
'--accent': '#8e9f38ff',
|
||||
'--accent': '#deef88',
|
||||
'--border': '#a0c0a0',
|
||||
'--input-bg': '#ffffff',
|
||||
'--user-msg-bg': '#f8f7adff',
|
||||
'--user-msg-bg': '#f8f7ad',
|
||||
'--assistant-msg-bg': '#f5fff5',
|
||||
'--active-bg': 'rgba(104, 159, 56, 0.2)',
|
||||
'--hover-bg': 'rgba(104, 159, 56, 0.1)',
|
||||
|
||||
@@ -892,6 +892,7 @@ input:checked + .slider:before {
|
||||
|
||||
|
||||
/* Web search toggle */
|
||||
/*
|
||||
.websearch-toggle {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -905,6 +906,51 @@ input:checked + .slider:before {
|
||||
}
|
||||
.websearch-toggle svg { width: 16px; height: 16px; }
|
||||
.websearch-toggle.active { outline: 2px solid var(--accent); }
|
||||
*/
|
||||
/* Icon-only Websearch toggle */
|
||||
.websearch-toggle {
|
||||
background: transparent;
|
||||
border: 0;
|
||||
padding: 0; /* icon-only */
|
||||
margin: 0 .1rem 0 0;
|
||||
line-height: 0; /* collapse inline space */
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
top: -7.5px;
|
||||
color: var(--muted); /* inactive color */
|
||||
box-shadow: none; /* no glow */
|
||||
outline: none; /* remove default outline */
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.websearch-toggle svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Active state = accent color */
|
||||
.websearch-toggle.active {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
/*
|
||||
.websearch-toggle:hover {
|
||||
color: var(--accent);
|
||||
}
|
||||
*/
|
||||
|
||||
/* Keep focus minimal (no glow) but still visible if you want a tiny underline instead of glow: */
|
||||
.websearch-toggle:focus,
|
||||
.websearch-toggle:focus-visible {
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
.msg-sources { margin-top: 8px; font-size: 12px; color: var(--muted); }
|
||||
.msg-sources a { color: var(--accent); text-decoration: none; margin-right: 8px; }
|
||||
.msg-sources a:hover { text-decoration: underline; }
|
||||
|
||||
Reference in New Issue
Block a user