Files
ForgeLM/tauri-app/src/components/Sidebar.css
T
Evandro Fonseca Junior 01b629cb4a feat: add SettingsPage with HuggingFace model search and fix flexbox layout
- Add SettingsPage component with macOS/Linear-style settings UI (sp-* classes)
- Fix HuggingFace results list squeeze: sp-card-row--full now has align-items: stretch
  overriding the inherited flex-start, ensuring children fill 100% horizontal width
- Fix sp-hf-file row layout: width 100%, grid columns for name/quant/size/download
- Fix sp-hf-name truncation: explicit overflow/ellipsis/white-space in CSS
- Add white-space: nowrap to sp-hf-size and sp-hf-quant-badge to protect secondary columns
- Add runtime-deps crate, Tailwind/PostCSS config, runtime-defaults, MessageBubble test
- Update Cargo workspace, inference-server, tauri runtime types and process handling
2026-03-30 23:35:08 -03:00

337 lines
6.0 KiB
CSS

.sidebar {
width: 280px;
min-width: 280px;
background: var(--bg2);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
overflow: hidden;
}
.sidebar-header-actions {
display: flex;
align-items: center;
gap: 4px;
}
.sidebar-close-btn {
display: none;
}
/* ── Header ── */
.sidebar-header {
display: flex;
align-items: center;
padding: 16px 16px 12px;
border-bottom: 1px solid var(--border);
gap: 8px;
flex-shrink: 0;
}
.sidebar-brand {
display: flex;
align-items: center;
flex: 1;
min-width: 0;
}
.brand-name {
font-size: 14px;
font-weight: 600;
letter-spacing: -0.01em;
color: var(--text);
}
.icon-btn {
background: none;
border: none;
color: var(--text3);
cursor: pointer;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--radius-sm);
transition: background 0.15s, color 0.15s;
flex-shrink: 0;
padding: 0;
}
.icon-btn:hover {
background: var(--bg4);
color: var(--text);
}
/* ── Model section ── */
.model-section {
padding: 10px 16px;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.model-section-label {
font-size: 11px;
font-weight: 600;
color: var(--text3);
text-transform: uppercase;
letter-spacing: 0.06em;
margin-bottom: 6px;
}
.model-row {
display: flex;
align-items: center;
gap: 8px;
}
.status-dot {
width: 7px;
height: 7px;
border-radius: 50%;
flex-shrink: 0;
transition: background 0.3s, box-shadow 0.3s;
}
.status-dot.status-ok {
background: var(--success);
box-shadow: 0 0 6px rgba(48,209,88,0.5);
}
.status-dot.status-error {
background: var(--danger);
}
.status-dot.status-loading {
background: var(--warning);
animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.35; }
}
.model-select {
flex: 1;
background: transparent;
border: 1px solid transparent;
border-radius: var(--radius-sm);
color: var(--text);
font-size: 13px;
padding: 6px 28px 6px 8px;
outline: none;
cursor: pointer;
min-width: 0;
font-family: inherit;
transition: border-color 0.15s, background 0.15s;
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 8px center;
}
.model-select:hover {
background-color: var(--bg3);
border-color: var(--border);
}
.model-select:focus {
border-color: var(--accent);
background-color: var(--bg3);
}
.model-select:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* ── Sidebar actions ── */
.sidebar-actions {
padding: 10px 16px 6px;
flex-shrink: 0;
}
.new-chat-btn {
width: 100%;
background: var(--bg3);
color: var(--text2);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 8px 12px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
display: flex;
align-items: center;
justify-content: flex-start;
gap: 8px;
transition: background 0.15s, color 0.15s, border-color 0.15s;
font-family: inherit;
height: 36px;
}
.new-chat-btn:hover {
background: var(--bg4);
color: var(--text);
border-color: var(--border);
}
.new-chat-btn:active {
transform: scale(0.98);
}
/* ── Chat list ── */
.chat-list-section-label {
font-size: 11px;
font-weight: 600;
color: var(--text3);
text-transform: uppercase;
letter-spacing: 0.06em;
padding: 12px 16px 4px;
flex-shrink: 0;
}
.chat-list {
flex: 1;
overflow-y: auto;
padding: 4px 8px 8px;
display: flex;
flex-direction: column;
gap: 1px;
}
.chat-list-empty {
text-align: center;
color: var(--text3);
font-size: 12px;
padding: 24px 0;
line-height: 1.6;
}
.chat-item {
display: flex;
align-items: center;
gap: 4px;
border-radius: var(--radius-sm);
font-size: 13px;
color: var(--text2);
transition: background 0.12s, color 0.12s;
position: relative;
}
.chat-item-button {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
padding: 8px 10px;
background: transparent;
border: 0;
color: inherit;
cursor: pointer;
font: inherit;
text-align: left;
border-radius: var(--radius-sm);
}
.chat-item:hover {
background: var(--bg3);
color: var(--text);
}
.chat-item:focus-within {
background: var(--bg3);
color: var(--text);
}
.chat-item.active {
background: var(--bg4);
color: var(--text);
}
.chat-item-title {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13px;
line-height: 1.4;
}
.chat-item-del {
opacity: 0;
background: none;
border: none;
color: var(--text3);
cursor: pointer;
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
transition: opacity 0.15s, background 0.15s, color 0.15s;
flex-shrink: 0;
padding: 0;
margin-right: 4px;
}
.chat-item:hover .chat-item-del {
opacity: 1;
}
.chat-item:focus-within .chat-item-del,
.chat-item.active .chat-item-del {
opacity: 1;
}
.chat-item-del:hover {
background: rgba(240,64,64,0.15);
color: var(--danger);
}
/* ── Footer ── */
.sidebar-footer {
padding: 8px 16px;
border-top: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
flex-shrink: 0;
}
.footer-version {
font-size: 10px;
color: var(--text3);
letter-spacing: 0.02em;
}
@media (max-width: 960px) {
.sidebar {
position: fixed;
inset: 0 auto 0 0;
width: min(86vw, 320px);
min-width: 0;
z-index: 20;
transform: translateX(-100%);
transition: transform 0.22s ease, box-shadow 0.22s ease;
box-shadow: none;
}
.sidebar-open .sidebar {
transform: translateX(0);
box-shadow: var(--shadow-lg);
}
.sidebar-close-btn {
display: inline-flex;
}
}
@media (hover: none), (max-width: 960px) {
.chat-item-del {
opacity: 1;
}
}