current state before improvement pass
This commit is contained in:
+419
-201
@@ -8,250 +8,468 @@
|
||||
|
||||
let cfg: Config | null = $state(null)
|
||||
let saving: boolean = $state(false)
|
||||
let hotkeyWarnings: string[] = $state([])
|
||||
let showAdvanced: boolean = $state(false)
|
||||
let activeTab: string = $state("capture")
|
||||
|
||||
onMount(async () => {
|
||||
cfg = await api.getConfig()
|
||||
})
|
||||
const TABS = [
|
||||
{ id: "capture", label: "Capture" },
|
||||
{ id: "export", label: "Export" },
|
||||
{ id: "hotkeys", label: "Hotkeys" },
|
||||
{ id: "output", label: "Output" },
|
||||
{ id: "system", label: "System" },
|
||||
]
|
||||
|
||||
onMount(async () => { cfg = await api.getConfig() })
|
||||
|
||||
async function save() {
|
||||
if (!cfg) return
|
||||
saving = true
|
||||
hotkeyWarnings = []
|
||||
try {
|
||||
await api.saveConfig(cfg)
|
||||
onClose()
|
||||
} finally {
|
||||
saving = false
|
||||
}
|
||||
const result = await api.saveConfig(cfg)
|
||||
const failed: string[] = []
|
||||
if (result.hotkey_result.start_ok === false) failed.push("start")
|
||||
if (result.hotkey_result.stop_ok === false) failed.push("stop")
|
||||
if (result.hotkey_result.pause_ok === false) failed.push("pause")
|
||||
if (failed.length > 0) {
|
||||
hotkeyWarnings = [`${failed.join(", ")} - hotkey may be in use by another app`]
|
||||
} else {
|
||||
onClose()
|
||||
}
|
||||
} finally { saving = false }
|
||||
}
|
||||
|
||||
async function pickOutputDir() {
|
||||
if (!cfg) return
|
||||
const picked = await open({
|
||||
directory: true,
|
||||
defaultPath: cfg.output_dir ?? undefined,
|
||||
})
|
||||
if (typeof picked === "string") {
|
||||
cfg.output_dir = picked
|
||||
}
|
||||
const picked = await open({ directory: true, defaultPath: cfg.output_dir ?? undefined })
|
||||
if (typeof picked === "string") cfg.output_dir = picked
|
||||
}
|
||||
</script>
|
||||
|
||||
<main>
|
||||
<header>
|
||||
<h1>settings</h1>
|
||||
<button class="back" onclick={onClose}>← back</button>
|
||||
<div class="settings">
|
||||
<header class="settings-header">
|
||||
<div class="header-left">
|
||||
<button class="back-btn" onclick={onClose} aria-label="close settings">
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<polyline points="9,2 3,7 9,12"/>
|
||||
</svg>
|
||||
</button>
|
||||
<h1>Settings</h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{#if cfg}
|
||||
<section>
|
||||
<h2>capture</h2>
|
||||
<label>
|
||||
<span>default fps</span>
|
||||
<select bind:value={cfg.capture.default_fps}>
|
||||
<option value={15}>15</option>
|
||||
<option value={24}>24</option>
|
||||
<option value={30}>30</option>
|
||||
<option value={60}>60</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="check">
|
||||
<input type="checkbox" bind:checked={cfg.capture.capture_cursor} />
|
||||
<span>capture cursor by default</span>
|
||||
</label>
|
||||
<label class="check">
|
||||
<input type="checkbox" bind:checked={cfg.capture.capture_audio} />
|
||||
<span>capture system audio by default</span>
|
||||
</label>
|
||||
</section>
|
||||
<div class="settings-body">
|
||||
<!-- Tab nav -->
|
||||
<nav class="tab-nav" aria-label="settings categories">
|
||||
{#each TABS as t}
|
||||
<button
|
||||
class="tab"
|
||||
class:active={activeTab === t.id}
|
||||
onclick={() => activeTab = t.id}
|
||||
>{t.label}</button>
|
||||
{/each}
|
||||
</nav>
|
||||
|
||||
<section>
|
||||
<h2>export defaults</h2>
|
||||
<label>
|
||||
<span>default format</span>
|
||||
<select bind:value={cfg.export.default_format}>
|
||||
<option value="gif">GIF</option>
|
||||
<option value="webm">WebM</option>
|
||||
<option value="mp4">MP4</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
<span>GIF dithering</span>
|
||||
<select bind:value={cfg.export.gif_dither}>
|
||||
<option value="floyd_steinberg">Floyd-Steinberg</option>
|
||||
<option value="bayer">Bayer</option>
|
||||
<option value="none">none</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
<span>WebM codec</span>
|
||||
<select bind:value={cfg.export.webm_codec}>
|
||||
<option value="vp9">VP9 (default)</option>
|
||||
<option value="av1">AV1 (smaller, slower)</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
<span>MP4 codec</span>
|
||||
<select bind:value={cfg.export.mp4_codec}>
|
||||
<option value="h264">H.264 (default)</option>
|
||||
<option value="h265">H.265 (smaller, less universal)</option>
|
||||
</select>
|
||||
</label>
|
||||
</section>
|
||||
<!-- Tab content -->
|
||||
<div class="tab-content">
|
||||
{#if activeTab === "capture"}
|
||||
<div class="tab-panel">
|
||||
<div class="panel-head">
|
||||
<h2>Capture</h2>
|
||||
<p class="panel-desc">Recording behavior and defaults</p>
|
||||
</div>
|
||||
<div class="field-list">
|
||||
<label class="field">
|
||||
<span class="field-label">Default FPS</span>
|
||||
<select bind:value={cfg.capture.default_fps}>
|
||||
{#each [15,24,30,60] as f}<option value={f}>{f} fps</option>{/each}
|
||||
</select>
|
||||
</label>
|
||||
<label class="field-check">
|
||||
<input type="checkbox" bind:checked={cfg.capture.capture_cursor} />
|
||||
<span>Capture cursor</span>
|
||||
</label>
|
||||
<label class="field-check">
|
||||
<input type="checkbox" bind:checked={cfg.capture.capture_audio} />
|
||||
<span>Capture system audio</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section>
|
||||
<h2>hotkeys</h2>
|
||||
<label>
|
||||
<span>start</span>
|
||||
<HotkeyInput bind:value={cfg.hotkeys.start} placeholder="click to assign" />
|
||||
</label>
|
||||
<label>
|
||||
<span>stop</span>
|
||||
<HotkeyInput bind:value={cfg.hotkeys.stop} placeholder="click to assign" />
|
||||
</label>
|
||||
<label>
|
||||
<span>pause</span>
|
||||
<HotkeyInput bind:value={cfg.hotkeys.pause} placeholder="click to assign" />
|
||||
</label>
|
||||
</section>
|
||||
{:else if activeTab === "export"}
|
||||
<div class="tab-panel">
|
||||
<div class="panel-head">
|
||||
<h2>Export</h2>
|
||||
<p class="panel-desc">Default format and encoding options</p>
|
||||
</div>
|
||||
<div class="field-list">
|
||||
<label class="field">
|
||||
<span class="field-label">Default format</span>
|
||||
<select bind:value={cfg.export.default_format}>
|
||||
<option value="gif">GIF</option>
|
||||
<option value="webm">WebM</option>
|
||||
<option value="mp4">MP4</option>
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<section>
|
||||
<h2>output</h2>
|
||||
<label>
|
||||
<span>save folder</span>
|
||||
<div class="path-input">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="default: ./output next to the app"
|
||||
value={cfg.output_dir ?? ""}
|
||||
oninput={(e) => {
|
||||
const v = (e.currentTarget as HTMLInputElement).value
|
||||
if (cfg) cfg.output_dir = v.trim() ? v : null
|
||||
}}
|
||||
/>
|
||||
<button class="small" onclick={pickOutputDir}>browse...</button>
|
||||
</div>
|
||||
</label>
|
||||
</section>
|
||||
<button class="advanced-toggle" onclick={() => showAdvanced = !showAdvanced} aria-expanded={showAdvanced}>
|
||||
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class:rotated={showAdvanced}>
|
||||
<polyline points="2,3 5,6 8,3"/>
|
||||
</svg>
|
||||
Advanced codecs
|
||||
</button>
|
||||
|
||||
<section>
|
||||
<h2>updates</h2>
|
||||
<label class="check">
|
||||
<input type="checkbox" bind:checked={cfg.updates.check_on_launch} />
|
||||
<span>check for updates on launch</span>
|
||||
</label>
|
||||
</section>
|
||||
{#if showAdvanced}
|
||||
<label class="field">
|
||||
<span class="field-label">GIF dithering</span>
|
||||
<select bind:value={cfg.export.gif_dither}>
|
||||
<option value="floyd_steinberg">Floyd-Steinberg</option>
|
||||
<option value="bayer">Bayer</option>
|
||||
<option value="none">None</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="field">
|
||||
<span class="field-label">WebM codec</span>
|
||||
<select bind:value={cfg.export.webm_codec}>
|
||||
<option value="vp9">VP9 (default)</option>
|
||||
<option value="av1">AV1 (smaller, slower)</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="field">
|
||||
<span class="field-label">MP4 codec</span>
|
||||
<select bind:value={cfg.export.mp4_codec}>
|
||||
<option value="h264">H.264 (default)</option>
|
||||
<option value="h265">H.265 (smaller, less universal)</option>
|
||||
</select>
|
||||
</label>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<button class="primary" disabled={saving} onclick={save}>
|
||||
{saving ? "saving..." : "save"}
|
||||
</button>
|
||||
<button onclick={onClose}>cancel</button>
|
||||
{:else if activeTab === "hotkeys"}
|
||||
<div class="tab-panel">
|
||||
<div class="panel-head">
|
||||
<h2>Hotkeys</h2>
|
||||
<p class="panel-desc">Global keyboard shortcuts</p>
|
||||
</div>
|
||||
<div class="field-list">
|
||||
<label class="field">
|
||||
<span class="field-label">Start recording</span>
|
||||
<HotkeyInput bind:value={cfg.hotkeys.start} placeholder="e.g. F9" />
|
||||
</label>
|
||||
<label class="field">
|
||||
<span class="field-label">Stop recording</span>
|
||||
<HotkeyInput bind:value={cfg.hotkeys.stop} placeholder="e.g. F10" />
|
||||
</label>
|
||||
<label class="field">
|
||||
<span class="field-label">Pause / resume</span>
|
||||
<HotkeyInput bind:value={cfg.hotkeys.pause} placeholder="e.g. F11" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{:else if activeTab === "output"}
|
||||
<div class="tab-panel">
|
||||
<div class="panel-head">
|
||||
<h2>Output</h2>
|
||||
<p class="panel-desc">Where exported files are saved</p>
|
||||
</div>
|
||||
<div class="field-list">
|
||||
<label class="field">
|
||||
<span class="field-label">Save folder</span>
|
||||
<div class="path-row">
|
||||
<input type="text" class="path-input" placeholder="./output" value={cfg.output_dir ?? ""} oninput={(e) => { cfg!.output_dir = (e.currentTarget as HTMLInputElement).value.trim() || null }} />
|
||||
<button class="btn-ghost" onclick={pickOutputDir}>Browse</button>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{:else if activeTab === "system"}
|
||||
<div class="tab-panel">
|
||||
<div class="panel-head">
|
||||
<h2>System</h2>
|
||||
<p class="panel-desc">Appearance and updates</p>
|
||||
</div>
|
||||
<div class="field-list">
|
||||
<label class="field">
|
||||
<span class="field-label">Theme</span>
|
||||
<select bind:value={cfg.theme}>
|
||||
<option value="dark">Dark</option>
|
||||
<option value="light">Light</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="field-check">
|
||||
<input type="checkbox" bind:checked={cfg.updates.check_on_launch} />
|
||||
<span>Check for updates on launch</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if hotkeyWarnings.length > 0}
|
||||
<div class="warn-block" role="alert">
|
||||
{#each hotkeyWarnings as w}<p>{w}</p>{/each}
|
||||
<div class="warn-actions">
|
||||
<button class="btn-warn" onclick={save} disabled={saving}>Try again</button>
|
||||
<button class="btn-ghost" onclick={onClose}>Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="panel-foot">
|
||||
<button class="btn-primary" onclick={save} disabled={saving}>
|
||||
{saving ? "Saving" : "Save changes"}
|
||||
</button>
|
||||
<button class="btn-ghost" onclick={onClose}>Cancel</button>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
main {
|
||||
padding: 2rem;
|
||||
max-width: 720px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
header {
|
||||
.settings {
|
||||
min-height: 100vh;
|
||||
background: var(--bg);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 1.5rem;
|
||||
flex-direction: column;
|
||||
}
|
||||
header h1 {
|
||||
|
||||
.settings-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 20px;
|
||||
height: 44px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
background: var(--bg-2);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.back-btn {
|
||||
display: grid; place-items: center;
|
||||
width: 28px; height: 28px;
|
||||
background: transparent;
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text-3);
|
||||
border-radius: var(--r-sm);
|
||||
cursor: pointer;
|
||||
transition: color 80ms, border-color 80ms;
|
||||
}
|
||||
.back-btn:hover { color: var(--text); border-color: var(--border-2); }
|
||||
|
||||
.settings-header h1 {
|
||||
margin: 0;
|
||||
font-size: 1.5rem;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
section {
|
||||
margin: 1.5rem 0;
|
||||
padding-top: 1rem;
|
||||
border-top: 1px solid #2a2a2a;
|
||||
|
||||
.settings-body {
|
||||
flex: 1;
|
||||
display: grid;
|
||||
grid-template-columns: 160px 1fr;
|
||||
max-width: 640px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
min-height: 0;
|
||||
}
|
||||
h2 {
|
||||
margin: 0 0 0.75rem;
|
||||
font-size: 0.85rem;
|
||||
color: #888;
|
||||
font-weight: normal;
|
||||
|
||||
@media (max-width: 560px) {
|
||||
.settings-body { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
/* Tab nav */
|
||||
.tab-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 16px 8px;
|
||||
gap: 2px;
|
||||
border-right: 1px solid var(--border);
|
||||
}
|
||||
|
||||
@media (max-width: 560px) {
|
||||
.tab-nav {
|
||||
flex-direction: row;
|
||||
padding: 12px 16px;
|
||||
border-right: none;
|
||||
border-bottom: 1px solid var(--border);
|
||||
overflow-x: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.tab {
|
||||
text-align: left;
|
||||
padding: 7px 12px;
|
||||
background: transparent;
|
||||
border: 1px solid transparent;
|
||||
color: var(--text-3);
|
||||
border-radius: var(--r-sm);
|
||||
font-family: var(--sans);
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 80ms;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tab:hover { color: var(--text-2); background: var(--bg-2); }
|
||||
.tab.active { background: var(--accent-dim); color: var(--accent); border-color: rgba(20, 184, 166, 0.15); }
|
||||
|
||||
/* Tab content */
|
||||
.tab-content {
|
||||
padding: 24px 28px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.tab-panel { display: flex; flex-direction: column; gap: 20px; }
|
||||
|
||||
.panel-head { display: flex; flex-direction: column; gap: 2px; }
|
||||
.panel-head h2 {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
.panel-desc {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
color: var(--text-3);
|
||||
}
|
||||
|
||||
.field-list { display: flex; flex-direction: column; gap: 14px; }
|
||||
|
||||
.field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
.field-label {
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
letter-spacing: 0.06em;
|
||||
color: var(--text-3);
|
||||
}
|
||||
label {
|
||||
display: grid;
|
||||
grid-template-columns: 180px 1fr;
|
||||
gap: 1rem;
|
||||
|
||||
.field-check {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0.75rem 0;
|
||||
font-size: 0.9rem;
|
||||
gap: 10px;
|
||||
font-size: 13px;
|
||||
color: var(--text-2);
|
||||
cursor: pointer;
|
||||
}
|
||||
label span {
|
||||
color: #aaa;
|
||||
.field-check input[type="checkbox"] {
|
||||
width: 14px; height: 14px;
|
||||
accent-color: var(--accent);
|
||||
cursor: pointer;
|
||||
}
|
||||
label.check {
|
||||
grid-template-columns: 20px 1fr;
|
||||
}
|
||||
select, input[type="text"] {
|
||||
font: inherit;
|
||||
padding: 0.4rem 0.6rem;
|
||||
border: 1px solid #444;
|
||||
background: #222;
|
||||
color: inherit;
|
||||
border-radius: 4px;
|
||||
}
|
||||
select:focus, input[type="text"]:focus {
|
||||
|
||||
select, .path-input {
|
||||
padding: 8px 10px;
|
||||
background: var(--bg-2);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text);
|
||||
border-radius: var(--r-sm);
|
||||
font-size: 13px;
|
||||
outline: none;
|
||||
border-color: #4a8;
|
||||
}
|
||||
.path-input {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
gap: 0.4rem;
|
||||
width: 100%;
|
||||
}
|
||||
.small {
|
||||
padding: 0.25rem 0.5rem;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
.row {
|
||||
select:focus, .path-input:focus { border-color: var(--accent); }
|
||||
select { cursor: pointer; font-family: var(--sans); }
|
||||
|
||||
.advanced-toggle {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
button {
|
||||
font: inherit;
|
||||
padding: 0.5rem 1rem;
|
||||
border: 1px solid #444;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
}
|
||||
button:hover:not(:disabled) {
|
||||
border-color: #888;
|
||||
}
|
||||
button.primary {
|
||||
background: #4a8;
|
||||
border-color: #4a8;
|
||||
color: #111;
|
||||
}
|
||||
button.primary:disabled {
|
||||
background: #333;
|
||||
border-color: #333;
|
||||
color: #666;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
button.back {
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
padding: 0.25rem 0.5rem;
|
||||
color: #aaa;
|
||||
font-size: 0.9rem;
|
||||
color: var(--text-3);
|
||||
font-size: 12px;
|
||||
font-family: var(--sans);
|
||||
cursor: pointer;
|
||||
padding: 4px 0;
|
||||
transition: color 80ms;
|
||||
width: fit-content;
|
||||
}
|
||||
button.back:hover {
|
||||
.advanced-toggle:hover { color: var(--text-2); }
|
||||
.advanced-toggle svg { transition: transform 150ms; }
|
||||
.advanced-toggle svg.rotated { transform: rotate(180deg); }
|
||||
|
||||
.path-row { display: flex; gap: 6px; }
|
||||
.path-input { flex: 1; font-family: var(--mono); font-size: 12px; }
|
||||
|
||||
.panel-foot {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
padding-top: 8px;
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
padding: 9px 22px;
|
||||
background: var(--accent);
|
||||
border: none;
|
||||
color: var(--accent-text);
|
||||
border-radius: var(--r-sm);
|
||||
font-family: var(--sans);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: background 80ms;
|
||||
}
|
||||
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
|
||||
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
|
||||
|
||||
.btn-ghost {
|
||||
padding: 9px 18px;
|
||||
background: transparent;
|
||||
border: 1px solid var(--border-2);
|
||||
color: var(--text-3);
|
||||
border-radius: var(--r-sm);
|
||||
font-family: var(--sans);
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
transition: border-color 80ms, color 80ms;
|
||||
}
|
||||
.btn-ghost:hover { border-color: var(--border-3); color: var(--text); }
|
||||
|
||||
.warn-block {
|
||||
padding: 14px 16px;
|
||||
background: var(--err-dim);
|
||||
border: 1px solid var(--err-border);
|
||||
border-radius: var(--r-sm);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
.warn-block p { margin: 0; font-size: 12px; color: var(--err); }
|
||||
.warn-actions { display: flex; gap: 8px; }
|
||||
.btn-warn {
|
||||
padding: 8px 16px;
|
||||
background: var(--err);
|
||||
border: none;
|
||||
color: #fff;
|
||||
border-radius: var(--r-sm);
|
||||
font-family: var(--sans);
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: background 80ms;
|
||||
}
|
||||
.btn-warn:hover:not(:disabled) { background: var(--stop-hover); }
|
||||
.btn-warn:disabled { opacity: 0.4; cursor: not-allowed; }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user