feat: Lucide SVG icons throughout main UI

Replace all emoji/unicode icons with Lucide SVG icons:
- Mode select dropdown: message-circle / pencil / lock / bot
- Send button: arrow-up (chat/OTR), pencil (note), zap (agent)
- Stop button: square icon
- Header nav already had Lucide SVGs; render_icons() now called at init

Add icon_html() + render_icons() helpers; update update_mode_ui() and
open_mode_dropdown() to use innerHTML + lucide.createIcons(). CSS: .btn-icon
alignment, inline-flex on .hdr-btn / .hdr-dd-item / #send / #stop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-03-26 23:06:01 -04:00
parent 24c9f52b49
commit 65548ebf36
3 changed files with 75 additions and 24 deletions

View File

@@ -183,7 +183,13 @@
.persona-dropdown .pd-add:hover { color: var(--text); }
/* Lucide SVG icon alignment */
.btn-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; pointer-events: none; }
.hdr-btn {
display: inline-flex;
align-items: center;
gap: 5px;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 6px;
@@ -224,7 +230,9 @@
.hdr-dropdown.open { display: block; }
.hdr-dd-item {
display: block;
display: flex;
align-items: center;
gap: 8px;
width: 100%;
text-align: left;
padding: 0.55rem 0.85rem;
@@ -538,7 +546,7 @@
#mode-select-btn.mode-otr { border-color: rgba(120,80,160,0.6); color: #a87fd4; }
#mode-select-btn.mode-agent { border-color: rgba(80,140,200,0.6); color: #7cb9e8; }
#mode-icon { font-size: 1rem; line-height: 1; }
#mode-icon { display: flex; align-items: center; }
.mode-arrow { font-size: 0.55rem; color: var(--muted); margin-left: 2px; opacity: 0.5; }
/* Dropdown — opens upward; MRU at bottom = closest to button */
@@ -573,7 +581,7 @@
}
.mode-option:hover { background: var(--border); color: var(--text); }
.mode-option.current { color: var(--text); font-weight: 500; }
.mode-option .opt-icon { font-size: 1rem; line-height: 1; }
.mode-option .opt-icon { display: flex; align-items: center; }
.mode-option .opt-check { margin-left: auto; font-size: 0.7rem; opacity: 0.7; }
/* Note visibility sub-button — shown below mode-select when note is active */
@@ -630,6 +638,10 @@
/* Send button */
#send {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
background: var(--user-bg);
border: 1px solid var(--user-border);
color: var(--text);
@@ -649,11 +661,14 @@
/* Stop button */
#stop {
display: none;
align-items: center;
justify-content: center;
gap: 6px;
background: var(--error-bg);
border: 1px solid var(--error-border);
color: var(--error-text);
border-radius: 8px;
padding: 10px 0;
padding: 10px 14px;
cursor: pointer;
font-size: 0.9rem;
text-align: center;