mirror of
https://github.com/runbear-io/beardrive.git
synced 2026-08-25 08:08:08 +02:00
Fixes the two round-2 majors. User: on mobile the per-file actions (Share/History/Upload/Download) are now icon buttons in the header — reachable again (round 2 wrongly hid them). Search tolerates simple English plurals (ideas→idea), the no-matches state states what search covers, the sidebar shows the hub brand instead of the raw device name, and history-row downloads carry a download attribute. Logged-out loads redirect to sign-in from /api/config instead of firing 401-ing API calls. Admin: a hub-admin "Signup & access" settings screen (⚙ Admin in the sidebar) toggles email verification and admin approval live — persisted to auth.json and surviving restart — while the domain allowlist and admin list are shown read-only (deliberately server-config-owned so a browser session can't widen access). Pending approvals live on the same screen. Config toggles are now *bool so an explicit config value pins the setting each boot, else the UI-saved policy stands. Invite revoke confirms; role change re-renders the panel. Tests: policy persistence + reload, policy API admin-only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R7Q9ZKSZRTdvrSJkYLUmYs
373 lines
16 KiB
CSS
373 lines
16 KiB
CSS
/* Obsidian-inspired dark theme */
|
|
:root {
|
|
--bg: #1e1e1e;
|
|
--bg-side: #262626;
|
|
--bg-hover: #333333;
|
|
--bg-active: #3f3550;
|
|
--border: #363636;
|
|
--text: #dadada;
|
|
--text-dim: #9a9a9a;
|
|
--text-faint: #6e6e6e;
|
|
--accent: #a882ff;
|
|
--accent-dim: #7c5cd6;
|
|
--code-bg: #2a2a2a;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
html, body { height: 100%; margin: 0; }
|
|
body {
|
|
display: flex;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
}
|
|
|
|
/* ---- sidebar ---- */
|
|
#sidebar {
|
|
width: 280px;
|
|
min-width: 200px;
|
|
background: var(--bg-side);
|
|
border-right: 1px solid var(--border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
#vault {
|
|
padding: 14px 16px 10px;
|
|
border-bottom: 1px solid var(--border);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
#vault-name { font-weight: 600; font-size: 14px; }
|
|
#signout { color: var(--text-faint); text-decoration: none; font-size: 13px; }
|
|
#signout:hover { color: var(--text); }
|
|
#upload-btn {
|
|
border: none;
|
|
cursor: pointer;
|
|
font: inherit;
|
|
font-size: 12.5px;
|
|
}
|
|
#projects {
|
|
flex: none;
|
|
max-height: 30%;
|
|
overflow-y: auto;
|
|
padding: 8px 6px;
|
|
font-size: 13.5px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
#projects ul { list-style: none; margin: 0; padding-left: 4px; }
|
|
#projects .row {
|
|
padding: 3px 8px;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
color: var(--text-dim);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
#projects .row::before { content: "▣ "; color: var(--text-faint); }
|
|
#projects .row:hover { background: var(--bg-hover); color: var(--text); }
|
|
#projects .row.active { background: var(--bg-active); color: var(--accent); }
|
|
#tree { flex: 1; overflow-y: auto; padding: 8px 6px 24px; font-size: 13.5px; }
|
|
#orgbar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
padding: 9px 16px;
|
|
border-top: 1px solid var(--border);
|
|
font-size: 12.5px;
|
|
color: var(--text-dim);
|
|
}
|
|
#orgbar[hidden] { display: none; }
|
|
#org-name { cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
#org-name::before { content: "⛛ "; color: var(--text-faint); }
|
|
#org-name:hover { color: var(--text); }
|
|
#invite-btn {
|
|
border: none; cursor: pointer; font: inherit; font-size: 11.5px;
|
|
padding: 2px 10px; border-radius: 5px;
|
|
background: var(--bg-active); color: var(--text-dim);
|
|
}
|
|
#invite-btn:hover { color: var(--text); background: var(--bg-hover); }
|
|
#tree ul { list-style: none; margin: 0; padding-left: 14px; }
|
|
#tree > ul { padding-left: 4px; }
|
|
#tree li > .row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
padding: 2px 8px;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
color: var(--text-dim);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
#tree li > .row:hover { background: var(--bg-hover); color: var(--text); }
|
|
#tree li > .row.active { background: var(--bg-active); color: var(--accent); }
|
|
#tree .chev { width: 12px; flex: none; font-size: 10px; color: var(--text-faint); transition: transform .12s; }
|
|
#tree li.collapsed > ul { display: none; }
|
|
#tree li.collapsed > .row .chev { transform: rotate(-90deg); }
|
|
#tree .file .chev { visibility: hidden; }
|
|
|
|
/* ---- main pane ---- */
|
|
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
|
|
#topbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 10px 24px;
|
|
border-bottom: 1px solid var(--border);
|
|
min-height: 46px;
|
|
}
|
|
#crumb { font-size: 13px; color: var(--text-dim); }
|
|
#meta { flex: 1; font-size: 12px; color: var(--text-faint); text-align: right; }
|
|
.btn {
|
|
flex: none;
|
|
padding: 4px 12px;
|
|
border-radius: 6px;
|
|
background: var(--accent-dim);
|
|
color: #fff;
|
|
font-size: 12.5px;
|
|
text-decoration: none;
|
|
}
|
|
.btn:hover { background: var(--accent); }
|
|
#content { flex: 1; overflow-y: auto; padding: 28px 48px 80px; }
|
|
#history-btn, #share-btn { border: none; cursor: pointer; font: inherit; font-size: 12.5px; background: var(--bg-active); color: var(--text-dim); }
|
|
#history-btn:hover, #share-btn:hover { color: var(--text); background: var(--bg-hover); }
|
|
.dir-history { margin-left: auto; padding: 0 4px; visibility: hidden; color: var(--text-faint); font-size: 11px; }
|
|
#tree li > .row:hover .dir-history { visibility: visible; }
|
|
.dir-history:hover { color: var(--text); }
|
|
.history { max-width: 860px; }
|
|
.hentry { padding: 10px 12px; border-bottom: 1px solid var(--border); }
|
|
.hentry .hline { display: flex; gap: 10px; align-items: baseline; }
|
|
.hkind { color: var(--accent); font-size: 11px; }
|
|
.hentry.delete .hkind { color: #ff7b72; }
|
|
.hpath { font-weight: 500; cursor: pointer; }
|
|
.hpath:hover { color: var(--accent); }
|
|
.htime { margin-left: auto; color: var(--text-faint); font-size: 12px; }
|
|
.hmeta { display: flex; gap: 16px; margin-top: 3px; font-size: 12px; color: var(--text-dim); }
|
|
.hdev, .hsize { color: var(--text-faint); }
|
|
.hact { margin-left: auto; }
|
|
.hact a { color: var(--accent); text-decoration: none; margin-left: 8px; }
|
|
.empty { color: var(--text-faint); text-align: center; margin-top: 20vh; }
|
|
.empty-hint { font-size: 12px; color: var(--text-faint); }
|
|
|
|
/* ---- command palette (⌘K) ---- */
|
|
#palette-overlay[hidden] { display: none; }
|
|
#palette-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, .45);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: flex-start;
|
|
padding-top: 12vh;
|
|
z-index: 100;
|
|
}
|
|
#palette {
|
|
width: min(560px, 90vw);
|
|
background: var(--bg-side);
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
box-shadow: 0 16px 48px rgba(0, 0, 0, .5);
|
|
overflow: hidden;
|
|
}
|
|
#palette-input {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
padding: 14px 16px;
|
|
border: none;
|
|
border-bottom: 1px solid var(--border);
|
|
background: transparent;
|
|
color: var(--text);
|
|
font: inherit;
|
|
font-size: 15px;
|
|
outline: none;
|
|
}
|
|
#palette-results {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 6px;
|
|
max-height: 46vh;
|
|
overflow-y: auto;
|
|
}
|
|
#palette-results li {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 7px 10px;
|
|
border-radius: 7px;
|
|
cursor: pointer;
|
|
color: var(--text-dim);
|
|
font-size: 13.5px;
|
|
}
|
|
#palette-results li.selected { background: var(--bg-active); color: var(--text); }
|
|
#palette-results li .picon { width: 18px; flex: none; text-align: center; color: var(--text-faint); }
|
|
#palette-results li .plabel { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
#palette-results li .plabel b { color: var(--accent); font-weight: 600; }
|
|
#palette-results li .pkind { flex: none; font-size: 11px; color: var(--text-faint); }
|
|
#palette-results .pempty { color: var(--text-faint); cursor: default; justify-content: center; }
|
|
#palette-hint {
|
|
padding: 7px 14px;
|
|
border-top: 1px solid var(--border);
|
|
font-size: 11px;
|
|
color: var(--text-faint);
|
|
}
|
|
|
|
/* ---- projects nav header + new-project ---- */
|
|
.nav-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
|
|
.nav-add { border: none; background: transparent; color: var(--text-faint); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 4px; }
|
|
.nav-add:hover { color: var(--text); background: var(--bg-hover); }
|
|
|
|
/* ---- vault header actions ---- */
|
|
.vault-actions { display: flex; align-items: center; gap: 8px; }
|
|
.adminbar { border: none; cursor: pointer; font: inherit; font-size: 11.5px; padding: 2px 8px; border-radius: 5px; background: #4a3a12; color: #f5c451; }
|
|
.adminbar:hover { background: #5c4816; }
|
|
.icon-btn2 { border: none; background: transparent; color: var(--text-faint); font-size: 15px; cursor: pointer; padding: 0 2px; line-height: 1; }
|
|
.icon-btn2:hover { color: var(--text); }
|
|
|
|
/* ---- topbar controls ---- */
|
|
.icon-btn { display: none; border: none; background: transparent; color: var(--text-dim); font-size: 18px; cursor: pointer; padding: 2px 6px; border-radius: 5px; }
|
|
.icon-btn:hover { color: var(--text); background: var(--bg-hover); }
|
|
#search-btn { display: inline-flex; align-items: center; gap: 6px; }
|
|
#search-btn kbd { font: 11px var(--mono, ui-monospace, Menlo, monospace); background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; color: var(--text-faint); }
|
|
.btn.ghost { background: var(--bg-active); color: var(--text-dim); }
|
|
.btn.ghost:hover { background: var(--bg-hover); color: var(--text); }
|
|
|
|
/* ---- onboarding empty state ---- */
|
|
.onboard { max-width: 560px; margin: 8vh auto 0; }
|
|
.onboard h1 { font-size: 26px; margin: 0 0 8px; color: #f0f0f0; }
|
|
.onboard > p { color: var(--text-dim); margin: 0 0 28px; }
|
|
.ob-card { background: var(--bg-side); border: 1px solid var(--border); border-radius: 10px; padding: 20px 22px; margin-bottom: 16px; }
|
|
.ob-card h3 { margin: 0 0 6px; font-size: 15px; }
|
|
.ob-card p { margin: 0 0 14px; font-size: 13.5px; color: var(--text-dim); }
|
|
.ob-row { display: flex; gap: 10px; }
|
|
.ob-row input { flex: 1; padding: 8px 11px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 13.5px; outline: none; }
|
|
.ob-row input:focus { border-color: var(--accent-dim); }
|
|
.pbtn { border: none; cursor: pointer; font: inherit; font-size: 13px; padding: 7px 16px; border-radius: 6px; background: var(--accent-dim); color: #fff; white-space: nowrap; }
|
|
.pbtn:hover { background: var(--accent); }
|
|
|
|
/* ---- admin panels (org, pending) ---- */
|
|
.admin { max-width: 720px; }
|
|
.admin h1 { font-size: 22px; margin: 0 0 20px; color: #f0f0f0; }
|
|
.admin h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin: 26px 0 10px; }
|
|
.admin-h { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 10px; }
|
|
.admin-h h3 { margin: 0; }
|
|
.admin-row { display: flex; gap: 10px; margin-bottom: 8px; }
|
|
.admin-row input { flex: 1; padding: 7px 11px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 13.5px; outline: none; }
|
|
.admin-list { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
|
|
.admin-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
|
|
.admin-item:last-child { border-bottom: none; }
|
|
.ai-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.ai-main.mono { font: 12px var(--mono, ui-monospace, Menlo, monospace); color: var(--text-dim); }
|
|
.ai-tag { font-size: 11.5px; color: var(--text-faint); }
|
|
.admin-item select { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 5px; padding: 3px 6px; font: inherit; font-size: 12.5px; }
|
|
.ai-btn, .ai-del { border: none; cursor: pointer; font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 5px; background: var(--bg-active); color: var(--text-dim); }
|
|
.ai-btn:hover { background: var(--bg-hover); color: var(--text); }
|
|
.ai-del { color: #ff9b91; }
|
|
.ai-del:hover { background: #4a2420; color: #ff7b72; }
|
|
.admin-empty { padding: 14px 12px; color: var(--text-faint); font-size: 13px; }
|
|
.admin-sub { color: var(--text-dim); font-size: 13.5px; margin: -8px 0 4px; }
|
|
.admin-item.toggle { cursor: pointer; }
|
|
.admin-item.toggle input { width: 16px; height: 16px; accent-color: var(--accent); }
|
|
.tg-label { font-size: 13.5px; color: var(--text); }
|
|
.tg-desc { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
|
|
|
|
/* ---- modal ---- */
|
|
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 150; padding: 20px; }
|
|
.modal { background: var(--bg-side); border: 1px solid var(--border); border-radius: 12px; padding: 24px; width: min(460px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
|
|
.modal h3 { margin: 0 0 10px; font-size: 17px; }
|
|
.modal p { margin: 0 0 16px; font-size: 13.5px; color: var(--text-dim); }
|
|
.modal-url { font: 12px var(--mono, ui-monospace, Menlo, monospace); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 9px 11px; color: var(--text-dim); word-break: break-all; margin-bottom: 16px; }
|
|
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
|
|
|
|
/* ---- toast ---- */
|
|
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--bg-active); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 10px 18px; font-size: 13.5px; box-shadow: 0 8px 30px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200; }
|
|
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
|
|
#toast.err { border-color: #7a2e28; color: #ffb4ac; }
|
|
|
|
/* ---- mobile backdrop ---- */
|
|
#sb-backdrop { display: none; }
|
|
|
|
/* ---- responsive ---- */
|
|
@media (max-width: 760px) {
|
|
#sidebar { position: fixed; z-index: 60; top: 0; left: 0; height: 100%; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.5); }
|
|
body.sb-open #sidebar { transform: translateX(0); }
|
|
body.sb-open #sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; }
|
|
.icon-btn { display: inline-block; }
|
|
#content { padding: 20px 18px 60px; }
|
|
#topbar { padding: 8px 14px; gap: 8px; }
|
|
#crumb { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
#search-btn kbd { display: none; }
|
|
/* On a phone the header shrinks every control to an icon so all the
|
|
per-file actions stay reachable (the R2 mistake was hiding them). */
|
|
#topbar .btn { font-size: 0; gap: 0; padding: 5px 8px; }
|
|
#search-btn::before { content: "🔍"; font-size: 15px; }
|
|
#share-btn::before { content: "↗"; font-size: 15px; }
|
|
#history-btn::before { content: "🕘"; font-size: 14px; }
|
|
#upload-btn::before { content: "⬆"; font-size: 14px; }
|
|
#download::before { content: "⬇"; font-size: 14px; }
|
|
#meta { display: none; }
|
|
.markdown, .admin, .onboard, .history { max-width: 100%; }
|
|
.markdown table, pre.plain { display: block; overflow-x: auto; max-width: 100%; }
|
|
.ob-row { flex-direction: column; }
|
|
}
|
|
|
|
/* ---- markdown ---- */
|
|
.markdown { max-width: 820px; }
|
|
.markdown h1, .markdown h2, .markdown h3, .markdown h4 {
|
|
color: #f0f0f0;
|
|
line-height: 1.3;
|
|
margin: 1.4em 0 .5em;
|
|
}
|
|
.markdown h1:first-child { margin-top: 0; }
|
|
.markdown h1 { font-size: 1.7em; }
|
|
.markdown h2 { font-size: 1.35em; border-bottom: 1px solid var(--border); padding-bottom: .25em; }
|
|
.markdown a { color: var(--accent); text-decoration: none; }
|
|
.markdown a:hover { text-decoration: underline; }
|
|
.markdown code {
|
|
background: var(--code-bg);
|
|
padding: .15em .4em;
|
|
border-radius: 4px;
|
|
font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
}
|
|
.markdown pre {
|
|
background: var(--code-bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 14px 16px;
|
|
overflow-x: auto;
|
|
}
|
|
.markdown pre code { background: none; padding: 0; }
|
|
.markdown blockquote {
|
|
margin: 1em 0;
|
|
padding: .1em 1em;
|
|
border-left: 3px solid var(--accent-dim);
|
|
color: var(--text-dim);
|
|
}
|
|
.markdown table { border-collapse: collapse; margin: 1em 0; }
|
|
.markdown th, .markdown td { border: 1px solid var(--border); padding: 6px 12px; }
|
|
.markdown th { background: var(--bg-side); }
|
|
.markdown img { max-width: 100%; border-radius: 6px; }
|
|
.markdown hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
|
|
.markdown input[type="checkbox"] { accent-color: var(--accent); }
|
|
|
|
/* plain file / binary views */
|
|
pre.plain {
|
|
background: var(--code-bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 14px 16px;
|
|
overflow-x: auto;
|
|
font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
white-space: pre-wrap;
|
|
}
|
|
.filecard {
|
|
margin-top: 15vh;
|
|
text-align: center;
|
|
color: var(--text-dim);
|
|
}
|
|
.filecard .name { font-size: 1.2em; color: var(--text); margin-bottom: .3em; }
|