mirror of
https://github.com/jahruz67/wisp-open.git
synced 2026-08-08 18:14:08 +00:00
- Add support for multiple API providers (Groq and Mistral) - Add collapsible API keys section in settings for both providers - Label all models with their provider (Groq/Mistral) - Add Voxtral Small (Mistral) transcription model - Add Mistral Small and Mistral Medium AI refinement models - Use user-friendly model names while maintaining correct API model values - Update transcriber to route requests to correct provider based on model - Update config to store separate API keys for each provider - Add Mistral brand colors to CSS - Style API keys dropdown section Co-authored-by: jahruz67 <jahruz67@users.noreply.github.com>
482 lines
9.7 KiB
CSS
482 lines
9.7 KiB
CSS
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');
|
|
|
|
:root {
|
|
--bg: #111113;
|
|
--surface: #1a1a1e;
|
|
--surface-2: #222226;
|
|
--border: rgba(255, 255, 255, 0.07);
|
|
--border-hover: rgba(255, 255, 255, 0.13);
|
|
--text: #e8e8ea;
|
|
--text-2: #8a8a90;
|
|
--text-3: #555560;
|
|
--accent: #e8622a;
|
|
--accent-dim: rgba(232, 98, 42, 0.15);
|
|
--accent-hover: #f07040;
|
|
--green: #3dba6e;
|
|
--green-dim: rgba(61, 186, 110, 0.12);
|
|
--red: #e05252;
|
|
--red-dim: rgba(224, 82, 82, 0.12);
|
|
--radius: 10px;
|
|
--radius-sm: 7px;
|
|
--mistral: #8a5cf0;
|
|
--mistral-dim: rgba(138, 92, 240, 0.15);
|
|
color-scheme: dark;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
body {
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
|
font-size: 14px;
|
|
margin: 0;
|
|
padding: 0;
|
|
min-height: 100vh;
|
|
line-height: 1.5;
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
/* Layout */
|
|
.container {
|
|
max-width: 680px;
|
|
margin: 0 auto;
|
|
padding: 32px 28px 60px;
|
|
}
|
|
|
|
/* Header */
|
|
h1 {
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
margin: 0;
|
|
letter-spacing: -0.02em;
|
|
}
|
|
|
|
.flex-between {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.flex-row {
|
|
display: flex;
|
|
gap: 10px;
|
|
align-items: center;
|
|
flex-wrap: nowrap;
|
|
}
|
|
|
|
/* Section cards */
|
|
.section {
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 20px 22px;
|
|
margin-bottom: 10px;
|
|
transition: border-color 0.15s ease;
|
|
}
|
|
|
|
.section:hover {
|
|
border-color: var(--border-hover);
|
|
}
|
|
|
|
/* Labels */
|
|
label {
|
|
display: block;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: var(--text);
|
|
margin-bottom: 9px;
|
|
text-transform: none;
|
|
letter-spacing: normal;
|
|
}
|
|
|
|
.hint {
|
|
font-size: 12px;
|
|
color: var(--text-2);
|
|
margin-top: 7px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* Inputs */
|
|
input[type="text"],
|
|
input[type="password"],
|
|
select,
|
|
textarea {
|
|
width: 100%;
|
|
background: var(--surface-2);
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
padding: 9px 12px;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 13.5px;
|
|
font-family: inherit;
|
|
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
outline: none;
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
}
|
|
|
|
input:focus,
|
|
select:focus,
|
|
textarea:focus {
|
|
border-color: var(--accent);
|
|
box-shadow: 0 0 0 3px var(--accent-dim);
|
|
}
|
|
|
|
input::placeholder,
|
|
textarea::placeholder {
|
|
color: var(--text-3);
|
|
}
|
|
|
|
/* Custom select arrow */
|
|
select {
|
|
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23555560' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='4 6 8 10 12 6'%3e%3c/polyline%3e%3c/svg%3e");
|
|
background-repeat: no-repeat;
|
|
background-position: right 11px center;
|
|
background-size: 14px;
|
|
padding-right: 34px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
select option {
|
|
background: var(--surface-2);
|
|
color: var(--text);
|
|
}
|
|
|
|
textarea {
|
|
resize: vertical;
|
|
min-height: 80px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
input[type="checkbox"] {
|
|
accent-color: var(--accent);
|
|
width: 16px;
|
|
height: 16px;
|
|
cursor: pointer;
|
|
border-radius: 4px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* Form control width */
|
|
.form-control {
|
|
width: 100%;
|
|
}
|
|
|
|
/* Input wrapper (for eye-btn) */
|
|
.input-wrapper {
|
|
position: relative;
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.input-wrapper input {
|
|
padding-right: 40px;
|
|
}
|
|
|
|
.eye-btn {
|
|
position: absolute;
|
|
right: 8px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
background: transparent !important;
|
|
border: none !important;
|
|
box-shadow: none !important;
|
|
cursor: pointer;
|
|
padding: 2px !important;
|
|
font-size: 15px;
|
|
opacity: 0.35;
|
|
transition: opacity 0.15s;
|
|
line-height: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.eye-btn:hover {
|
|
opacity: 0.8;
|
|
transform: translateY(-50%);
|
|
box-shadow: none !important;
|
|
}
|
|
|
|
/* Buttons */
|
|
button {
|
|
background: var(--accent);
|
|
color: #fff;
|
|
border: none;
|
|
padding: 9px 16px;
|
|
border-radius: var(--radius-sm);
|
|
cursor: pointer;
|
|
font-family: inherit;
|
|
font-weight: 500;
|
|
font-size: 13.5px;
|
|
transition: background 0.15s ease, transform 0.1s ease;
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
button:hover {
|
|
background: var(--accent-hover);
|
|
transform: none;
|
|
box-shadow: none;
|
|
}
|
|
|
|
button:active {
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
.btn-link {
|
|
background: transparent !important;
|
|
border: none !important;
|
|
box-shadow: none !important;
|
|
color: var(--red) !important;
|
|
padding: 0 !important;
|
|
font-size: 12px !important;
|
|
text-decoration: none;
|
|
opacity: 0.75;
|
|
min-height: 0;
|
|
}
|
|
|
|
.btn-link:hover {
|
|
opacity: 1;
|
|
transform: none;
|
|
background: transparent !important;
|
|
}
|
|
|
|
.btn-danger {
|
|
background: transparent !important;
|
|
border: 1px solid var(--red) !important;
|
|
color: var(--red) !important;
|
|
box-shadow: none !important;
|
|
font-size: 13px !important;
|
|
}
|
|
|
|
.btn-danger:hover {
|
|
background: var(--red-dim) !important;
|
|
opacity: 1 !important;
|
|
}
|
|
|
|
/* Save status toast */
|
|
.save-status {
|
|
position: fixed;
|
|
bottom: 24px;
|
|
right: 24px;
|
|
background: var(--surface-2);
|
|
border: 1px solid var(--border-hover);
|
|
color: var(--green);
|
|
padding: 10px 18px;
|
|
border-radius: var(--radius);
|
|
font-weight: 500;
|
|
font-size: 13px;
|
|
box-shadow: 0 8px 24px rgba(0,0,0,0.4);
|
|
transform: translateY(16px);
|
|
opacity: 0;
|
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
z-index: 1000;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.save-status.show {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
|
|
/* History */
|
|
.history-list {
|
|
max-height: 240px;
|
|
overflow-y: auto;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.history-item {
|
|
background: var(--surface-2);
|
|
border: 1px solid var(--border);
|
|
padding: 11px 14px;
|
|
border-radius: var(--radius-sm);
|
|
margin-bottom: 6px;
|
|
transition: border-color 0.15s;
|
|
}
|
|
|
|
.history-item:hover {
|
|
border-color: var(--border-hover);
|
|
transform: none;
|
|
}
|
|
|
|
.history-time {
|
|
color: var(--text-2);
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
margin-bottom: 4px;
|
|
display: block;
|
|
}
|
|
|
|
/* Inline status badges (online/offline) */
|
|
#connectionStatus {
|
|
border-radius: var(--radius-sm) !important;
|
|
font-size: 13px !important;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* Installed whisper card */
|
|
#whisperInstalled > div {
|
|
border-radius: var(--radius-sm) !important;
|
|
}
|
|
|
|
/* Install button override */
|
|
#installBtn {
|
|
background: var(--accent) !important;
|
|
border-radius: var(--radius-sm) !important;
|
|
font-size: 14px !important;
|
|
padding: 11px 20px !important;
|
|
width: 100%;
|
|
}
|
|
|
|
#installBtn:hover {
|
|
background: var(--accent-hover) !important;
|
|
}
|
|
|
|
/* Offline Whisper section separator */
|
|
#offlineWhisperSection {
|
|
border-top: 1px solid var(--border) !important;
|
|
margin-top: 20px !important;
|
|
padding-top: 20px !important;
|
|
}
|
|
|
|
/* API Keys Dropdown Section */
|
|
.api-keys-details {
|
|
color: var(--text);
|
|
}
|
|
|
|
.api-keys-summary {
|
|
cursor: pointer;
|
|
font-weight: 500;
|
|
font-size: 13px;
|
|
color: var(--text);
|
|
padding: 2px 0;
|
|
user-select: none;
|
|
list-style: none;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
width: 100%;
|
|
}
|
|
|
|
.api-keys-summary::-webkit-details-marker {
|
|
display: none;
|
|
}
|
|
|
|
.api-keys-summary::after {
|
|
content: '\u25b6';
|
|
font-size: 10px;
|
|
color: var(--text-3);
|
|
transition: transform 0.15s ease;
|
|
display: inline-block;
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.api-keys-details[open] > .api-keys-summary::after {
|
|
transform: rotate(90deg);
|
|
}
|
|
|
|
.api-keys-summary:hover {
|
|
color: var(--text);
|
|
}
|
|
|
|
.api-keys-content {
|
|
margin-top: 12px;
|
|
padding-top: 12px;
|
|
border-top: 1px solid var(--border);
|
|
}
|
|
|
|
.api-key-section {
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.api-key-section:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* Provider badges for model options */
|
|
select option[data-provider]::before {
|
|
content: attr(data-provider);
|
|
display: inline-block;
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
margin-right: 8px;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
select option[data-provider="groq"]::before {
|
|
background: var(--accent-dim);
|
|
color: var(--accent);
|
|
}
|
|
|
|
select option[data-provider="mistral"]::before {
|
|
background: var(--mistral-dim);
|
|
color: var(--mistral);
|
|
}
|
|
|
|
select option[data-provider="local"]::before {
|
|
background: var(--green-dim);
|
|
color: var(--green);
|
|
}
|
|
|
|
/* Collapsible fallback details */
|
|
.fallback-details {
|
|
color: var(--text);
|
|
}
|
|
|
|
.fallback-summary {
|
|
cursor: pointer;
|
|
font-weight: 500;
|
|
font-size: 13px;
|
|
color: var(--text-2);
|
|
padding: 2px 0;
|
|
user-select: none;
|
|
list-style: none;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.fallback-summary::-webkit-details-marker {
|
|
display: none;
|
|
}
|
|
|
|
.fallback-summary::before {
|
|
content: '\u25b6';
|
|
font-size: 10px;
|
|
color: var(--text-3);
|
|
transition: transform 0.15s ease;
|
|
display: inline-block;
|
|
}
|
|
|
|
.fallback-details[open] > .fallback-summary::before {
|
|
transform: rotate(90deg);
|
|
}
|
|
|
|
.fallback-summary:hover {
|
|
color: var(--text);
|
|
}
|
|
|
|
/* Section group header divider */
|
|
.section-group-label {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.07em;
|
|
color: var(--text-3);
|
|
margin: 22px 0 8px;
|
|
}
|
|
|
|
/* Scrollbar */
|
|
::-webkit-scrollbar { width: 5px; }
|
|
::-webkit-scrollbar-track { background: transparent; }
|
|
::-webkit-scrollbar-thumb {
|
|
background: var(--surface-2);
|
|
border-radius: 10px;
|
|
}
|
|
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }
|