From f16c738035281978fd481e326f57e9e21f0f42d4 Mon Sep 17 00:00:00 2001 From: d-robotics Date: Wed, 2 Sep 2026 15:27:40 +0800 Subject: [PATCH] feat: align DEMO-014 console with D-Robotics brand --- apps/admin-web/assets/styles.css | 1090 +++++++++++++++++++---- apps/admin-web/index.html | 45 +- docs/demo/DEMO_SCOPE.md | 6 +- docs/development/ADMIN_CONSOLE.md | 10 + docs/plans/PROGRESS.md | 25 +- tests/integration/test_admin_console.py | 5 + 6 files changed, 992 insertions(+), 189 deletions(-) diff --git a/apps/admin-web/assets/styles.css b/apps/admin-web/assets/styles.css index 080b4d8..d693fe7 100644 --- a/apps/admin-web/assets/styles.css +++ b/apps/admin-web/assets/styles.css @@ -1,19 +1,30 @@ +/* DEMO-014 keeps the official orange as the sole accent; all artwork is + code-native so the console has no runtime dependency on brand-site assets. */ :root { color-scheme: light; - --ink: #152521; - --muted: #697772; - --line: #dfe6e2; + --brand: #FF3C00; + --brand-deep: #d83200; + --brand-soft: #fff0eb; + --ink: #111111; + --graphite: #292929; + --muted: #747474; + --line: #d9d9d5; + --line-strong: #bcbcb6; --surface: #ffffff; - --canvas: #f4f6f2; - --forest: #123d32; - --forest-light: #dff1e8; - --lime: #c7ef68; - --danger: #a43c37; - --shadow: 0 18px 48px rgb(35 56 49 / 8%); - font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; + --canvas: #f4f4f1; + --success: #19764a; + --warning: #956000; + --danger: #a52e27; + --shadow: 0 16px 42px rgb(17 17 17 / 7%); + --display-font: "Source Han Sans CN", "Noto Sans CJK SC", "PingFang SC", sans-serif; + --body-font: "Outfit", "Source Han Sans CN", "PingFang SC", sans-serif; + --data-font: "SFMono-Regular", Consolas, "Liberation Mono", monospace; + font-family: var(--body-font); } -* { box-sizing: border-box; } +* { + box-sizing: border-box; +} body { margin: 0; @@ -22,205 +33,952 @@ body { color: var(--ink); } -button, input, select, textarea { font: inherit; } -a { color: inherit; text-decoration: none; } +button, +input, +select, +textarea { + font: inherit; +} -.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; } +a { + color: inherit; + text-decoration: none; +} + +:focus-visible { + outline: 3px solid rgb(255 60 0 / 30%); + outline-offset: 3px; +} + +.app-shell { + min-height: 100vh; + display: grid; + grid-template-columns: 252px minmax(0, 1fr); +} .sidebar { position: sticky; top: 0; + z-index: 2; height: 100vh; display: flex; flex-direction: column; - padding: 30px 20px 22px; - color: #f5fbf8; - background: var(--forest); + padding: 28px 20px 22px; + border-right: 1px solid var(--line); + background: var(--surface); +} + +.brand { + display: flex; + gap: 12px; + align-items: center; + padding: 0 8px; } -.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px; } .brand-mark { + width: 42px; + height: 32px; + flex: 0 0 auto; + fill: var(--ink); +} + +.brand-mark circle { + fill: var(--brand); +} + +.brand strong, +.brand small { + display: block; +} + +.brand strong { + font-family: var(--display-font); + font-size: 16px; + font-weight: 750; + letter-spacing: .08em; +} + +.brand small { + margin-top: 4px; + color: var(--muted); + font-family: var(--data-font); + font-size: 8px; + letter-spacing: .08em; + text-transform: uppercase; +} + +.workspace-label { + display: grid; + gap: 7px; + margin: 44px 8px 14px; + padding-top: 18px; + border-top: 1px solid var(--line); +} + +.workspace-label span { + color: var(--brand); + font-family: var(--data-font); + font-size: 9px; + font-weight: 800; + letter-spacing: .16em; +} + +.workspace-label strong { + font-size: 13px; + font-weight: 650; +} + +.primary-nav { + display: grid; + gap: 7px; +} + +.primary-nav a { + position: relative; + display: flex; + min-height: 48px; + align-items: center; + gap: 13px; + padding: 0 14px; + border-radius: 4px; + color: #5e5e5e; + font-size: 13px; + font-weight: 650; + transition: background-color .16s ease, color .16s ease, transform .16s ease; +} + +.primary-nav a span { + width: 24px; + color: #a1a19c; + font-family: var(--data-font); + font-size: 9px; + font-weight: 700; + letter-spacing: .04em; +} + +.primary-nav a:hover { + background: var(--canvas); + color: var(--ink); + transform: translateX(2px); +} + +.primary-nav a.active { + background: var(--ink); + color: white; +} + +.primary-nav a.active::after { + position: absolute; + top: 50%; + right: -4px; + width: 8px; + height: 8px; + border: 2px solid white; + border-radius: 50%; + background: var(--brand); + content: ""; + transform: translate(50%, -50%); +} + +.primary-nav a.active span { + color: var(--brand); +} + +.sidebar-foot { + margin-top: auto; + padding: 16px 8px 0; + border-top: 1px solid var(--line); + color: #898984; + font-family: var(--data-font); + font-size: 8px; + letter-spacing: .08em; +} + +.environment-dot { + display: inline-block; + width: 7px; + height: 7px; + margin-right: 8px; + border-radius: 50%; + background: var(--brand); + box-shadow: 0 0 0 4px rgb(255 60 0 / 10%); +} + +.workspace { + min-width: 0; + padding: 0 52px 72px; +} + +.topbar { + min-height: 110px; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 1px solid var(--line); +} + +.topbar h1 { + margin: 7px 0 0; + font-family: var(--display-font); + font-size: 27px; + font-weight: 650; + letter-spacing: .025em; +} + +.eyebrow, +.section-label { + margin: 0; + color: var(--brand); + font-family: var(--data-font); + font-size: 9px; + font-weight: 800; + letter-spacing: .16em; +} + +.topbar-actions { + display: flex; + align-items: center; + gap: 24px; +} + +.system-state { + display: inline-flex; + align-items: center; + gap: 7px; + color: var(--muted); + font-size: 11px; +} + +.system-state i { + width: 7px; + height: 7px; + border-radius: 50%; + background: var(--brand); + box-shadow: 0 0 0 4px rgb(255 60 0 / 10%); +} + +.api-link { + padding: 9px 0 8px; + border-bottom: 2px solid var(--brand); + font-size: 11px; + font-weight: 750; +} + +.signal-line { + position: relative; + height: 16px; + border-top: 1px solid var(--ink); +} + +.signal-line::before { + position: absolute; + top: -2px; + left: 0; + width: 112px; + height: 3px; + background: var(--brand); + content: ""; +} + +.signal-line span { + position: absolute; + top: -4px; + width: 7px; + height: 7px; + border-radius: 50%; + background: var(--ink); +} + +.signal-line span:nth-child(1) { left: 36%; } +.signal-line span:nth-child(2) { left: 68%; } +.signal-line span:nth-child(3) { right: 0; background: var(--brand); } + +.page { + max-width: 1180px; + margin: 0 auto; + padding-top: 48px; + animation: page-enter .35s ease-out both; +} + +@keyframes page-enter { + from { opacity: 0; transform: translateY(7px); } + to { opacity: 1; transform: translateY(0); } +} + +.page-heading { + margin-bottom: 28px; +} + +.page-heading h2 { + max-width: 720px; + margin: 12px 0 10px; + font-family: var(--display-font); + font-size: clamp(30px, 4vw, 48px); + font-weight: 520; + letter-spacing: .02em; + line-height: 1.18; +} + +.page-heading p:last-child { + max-width: 680px; + margin: 0; + color: var(--muted); + font-size: 13px; + line-height: 1.8; +} + +.heading-row { + display: flex; + align-items: end; + justify-content: space-between; + gap: 20px; +} + +.notice { + position: fixed; + z-index: 10; + top: 24px; + right: 28px; + max-width: 440px; + padding: 14px 18px; + border-left: 4px solid currentColor; + border-radius: 3px; + box-shadow: var(--shadow); + font-size: 12px; +} + +.notice.success { background: #e9f5ef; color: var(--success); } +.notice.error { background: #fff0ef; color: var(--danger); } + +.upload-panel { + display: grid; + gap: 16px; + max-width: 820px; +} + +.drop-zone { + position: relative; + display: flex; + min-height: 290px; + flex-direction: column; + align-items: center; + justify-content: center; + overflow: hidden; + padding: 34px; + border: 1px solid var(--line-strong); + border-radius: 6px; + background-color: var(--surface); + background-image: + linear-gradient(rgb(17 17 17 / 3%) 1px, transparent 1px), + linear-gradient(90deg, rgb(17 17 17 / 3%) 1px, transparent 1px); + background-size: 28px 28px; + cursor: pointer; + transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; +} + +.drop-zone::before, +.drop-zone::after { + position: absolute; + width: 48px; + height: 48px; + border-color: var(--brand); + content: ""; +} + +.drop-zone::before { + top: 16px; + left: 16px; + border-top: 3px solid var(--brand); + border-left: 3px solid var(--brand); +} + +.drop-zone::after { + right: 16px; + bottom: 16px; + border-right: 3px solid var(--brand); + border-bottom: 3px solid var(--brand); +} + +.drop-zone:hover { + border-color: var(--brand); + box-shadow: 0 12px 35px rgb(255 60 0 / 9%); + transform: translateY(-2px); +} + +.drop-zone input { + position: absolute; + width: 1px; + height: 1px; + opacity: 0; +} + +.upload-icon { + display: grid; + width: 58px; + height: 58px; + margin-bottom: 20px; + place-items: center; + border-radius: 50%; + background: var(--ink); + color: white; + box-shadow: 9px 0 0 var(--brand); + font-family: var(--data-font); + font-size: 25px; +} + +.drop-zone strong { + font-family: var(--display-font); + font-size: 21px; + font-weight: 650; + letter-spacing: .03em; +} + +.drop-zone > span:not(.upload-icon) { + margin-top: 8px; + color: var(--muted); + font-size: 11px; +} + +.drop-zone .selected-file { + margin-top: 23px; + padding: 7px 12px; + border: 1px solid var(--line); + border-radius: 3px; + background: var(--surface); + color: var(--ink); + font-family: var(--data-font); + font-size: 10px; + font-weight: 650; +} + +.primary-button, +.secondary-button { + min-height: 46px; + display: inline-flex; + align-items: center; + justify-content: center; + border-radius: 3px; + cursor: pointer; + font-size: 12px; + font-weight: 750; + letter-spacing: .025em; + transition: background-color .16s ease, color .16s ease, transform .16s ease; +} + +.primary-button { + padding: 0 24px; + border: 1px solid var(--brand); + background: var(--brand); + color: white; +} + +.primary-button:hover { + border-color: var(--ink); + background: var(--ink); + transform: translateY(-1px); +} + +.primary-button:disabled { + cursor: wait; + opacity: .6; + transform: none; +} + +.secondary-button { + padding: 0 18px; + border: 1px solid var(--ink); + background: transparent; + color: var(--ink); +} + +.secondary-button:hover { + background: var(--ink); + color: white; +} + +.compact { + min-height: 38px; + padding: 0 18px; +} + +.result-card { + position: relative; + max-width: 820px; + margin-top: 28px; + padding: 26px; + border: 1px solid var(--line); + border-top: 3px solid var(--brand); + border-radius: 5px; + background: var(--surface); + box-shadow: var(--shadow); +} + +.result-card h3 { + margin: 8px 0 0; + font-size: 19px; +} + +.result-card > .status-pill { + position: absolute; + top: 22px; + right: 24px; +} + +.metadata-grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 20px; + margin: 28px 0; + padding: 20px 0; + border-block: 1px solid var(--line); +} + +dt { + color: var(--muted); + font-family: var(--data-font); + font-size: 9px; + letter-spacing: .05em; + text-transform: uppercase; +} + +dd { + margin: 7px 0 0; + overflow-wrap: anywhere; + font-size: 12px; + font-weight: 650; +} + +.text-link { + color: var(--ink); + font-size: 12px; + font-weight: 750; +} + +.text-link span { + color: var(--brand); +} + +.table-card { + overflow: hidden; + border: 1px solid var(--line); + border-radius: 5px; + background: var(--surface); + box-shadow: var(--shadow); +} + +.table-meta { + display: flex; + justify-content: space-between; + padding: 17px 22px; + border-bottom: 1px solid var(--line); + color: var(--muted); + font-family: var(--data-font); + font-size: 9px; +} + +.table-scroll { + overflow-x: auto; +} + +table { + width: 100%; + border-collapse: collapse; + font-size: 12px; +} + +th { + padding: 13px 18px; + color: #777773; + background: #f7f7f5; + font-family: var(--data-font); + font-size: 9px; + letter-spacing: .07em; + text-align: left; + text-transform: uppercase; +} + +td { + padding: 19px 18px; + border-top: 1px solid #ecece9; + vertical-align: middle; +} + +tbody tr:hover { + background: #fffaf8; +} + +.filename-cell { + min-width: 190px; + font-weight: 750; +} + +.row-actions { + min-width: 116px; + text-align: right; + white-space: nowrap; +} + +.table-action { + padding: 5px 7px; + border: 0; + background: transparent; + color: var(--ink); + cursor: pointer; + font-size: 11px; + font-weight: 700; +} + +.table-action:hover { + color: var(--brand); +} + +.danger-link { + color: var(--danger); +} + +.status-pill { + display: inline-flex; + width: fit-content; + align-items: center; + padding: 5px 9px; + border-radius: 2px; + background: #ededeb; + color: #474744; + font-family: var(--data-font); + font-size: 9px; + font-weight: 850; + letter-spacing: .05em; + text-transform: uppercase; +} + +.status-ready { background: #e5f3eb; color: var(--success); } +.status-processing { background: #fff0ce; color: var(--warning); } +.status-failed { background: #fbe6e3; color: var(--danger); } +.status-uploaded { background: var(--brand-soft); color: var(--brand-deep); } + +.empty-state { + min-height: 240px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 8px; + padding: 34px; + color: var(--muted); + text-align: center; +} + +.empty-state::before { + width: 28px; + height: 3px; + margin-bottom: 9px; + background: var(--brand); + content: ""; +} + +.empty-state strong { + color: var(--ink); + font-family: var(--display-font); + font-size: 18px; + font-weight: 600; +} + +.empty-state .primary-button { + margin-top: 12px; + color: white; + font-size: 11px; +} + +.search-panel { + padding: 22px; + border: 1px solid var(--line); + border-left: 4px solid var(--brand); + border-radius: 4px; + background: var(--surface); + box-shadow: var(--shadow); +} + +.search-panel > label { + display: block; + margin-bottom: 10px; + font-size: 11px; + font-weight: 750; +} + +.search-controls { + display: grid; + grid-template-columns: minmax(0, 1fr) 90px 118px; + gap: 12px; + align-items: stretch; +} + +textarea, +select { + width: 100%; + border: 1px solid #c9c9c4; + border-radius: 3px; + background: #fafaf8; + color: var(--ink); + outline: none; +} + +textarea { + min-height: 90px; + padding: 13px 15px; + resize: vertical; + line-height: 1.55; +} + +textarea:focus, +select:focus { + border-color: var(--brand); + box-shadow: 0 0 0 3px rgb(255 60 0 / 10%); +} + +.top-k-control { + display: flex; + flex-direction: column; + gap: 7px; + color: var(--muted); + font-family: var(--data-font); + font-size: 9px; + font-weight: 700; + text-transform: uppercase; +} + +.top-k-control select { + flex: 1; + padding: 0 11px; +} + +.search-panel .primary-button { + min-height: 54px; + align-self: end; +} + +.results-heading { + display: flex; + align-items: end; + justify-content: space-between; + margin: 42px 0 15px; +} + +.results-heading h3 { + margin: 7px 0 0; + font-family: var(--display-font); + font-size: 22px; + font-weight: 600; +} + +.results-heading > span { + color: var(--muted); + font-family: var(--data-font); + font-size: 9px; +} + +.search-results { + display: grid; + gap: 10px; +} + +.search-empty { + min-height: 220px; + border: 1px dashed var(--line-strong); + border-radius: 4px; +} + +.search-result-card { + display: grid; + grid-template-columns: 54px 1fr; + gap: 18px; + padding: 23px; + border: 1px solid var(--line); + border-radius: 4px; + background: var(--surface); + transition: border-color .16s ease, transform .16s ease; +} + +.search-result-card:hover { + border-color: #b5b5af; + transform: translateX(2px); +} + +.search-result-card:first-child { + border-left: 4px solid var(--brand); +} + +.rank { display: grid; width: 42px; height: 42px; place-items: center; - border-radius: 12px; - background: var(--lime); - color: var(--forest); - font-size: 13px; - font-weight: 900; - letter-spacing: .08em; -} -.brand strong, .brand small { display: block; } -.brand strong { font-family: Georgia, serif; font-size: 15px; line-height: 1.15; } -.brand small { margin-top: 4px; color: #9fb8af; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; } - -.primary-nav { display: grid; gap: 8px; margin-top: 54px; } -.primary-nav a { - display: flex; - align-items: center; - gap: 12px; - min-height: 46px; - padding: 0 14px; - border-radius: 10px; - color: #b8cbc4; - font-size: 14px; - font-weight: 650; -} -.primary-nav a span { width: 20px; font-size: 20px; text-align: center; } -.primary-nav a:hover, .primary-nav a.active { background: rgb(255 255 255 / 9%); color: white; } -.primary-nav a.active { box-shadow: inset 3px 0 var(--lime); } - -.sidebar-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid rgb(255 255 255 / 12%); color: #9fb8af; font-size: 11px; letter-spacing: .05em; } -.environment-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); } - -.workspace { min-width: 0; padding: 0 48px 64px; } -.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 108px; border-bottom: 1px solid var(--line); } -.topbar h1 { margin: 5px 0 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 25px; font-weight: 600; } -.eyebrow, .section-label { margin: 0; color: #6b7c75; font-size: 10px; font-weight: 800; letter-spacing: .17em; } -.api-link { padding-bottom: 3px; border-bottom: 1px solid #9eaaa5; font-size: 12px; font-weight: 700; } - -.page { max-width: 1180px; margin: 0 auto; padding-top: 54px; } -.page-heading { margin-bottom: 30px; } -.page-heading h2 { margin: 8px 0 10px; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(29px, 4vw, 42px); font-weight: 500; letter-spacing: -.02em; } -.page-heading p:last-child { max-width: 670px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; } -.heading-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; } - -.notice { position: fixed; z-index: 10; top: 22px; right: 28px; max-width: 440px; padding: 14px 18px; border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; } -.notice.success { background: #e1f3e8; color: #205f42; } -.notice.error { background: #fce8e6; color: #8d302c; } - -.upload-panel { display: grid; gap: 18px; max-width: 790px; } -.drop-zone { - display: flex; - min-height: 275px; - flex-direction: column; - align-items: center; - justify-content: center; - padding: 32px; - border: 1.5px dashed #94a59e; - border-radius: 16px; - background: var(--surface); - cursor: pointer; - transition: border-color .2s, background .2s, transform .2s; -} -.drop-zone:hover { border-color: var(--forest); background: #fbfdf9; transform: translateY(-2px); } -.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; } -.upload-icon { display: grid; width: 56px; height: 56px; margin-bottom: 20px; place-items: center; border-radius: 50%; background: var(--forest-light); color: var(--forest); font-size: 27px; } -.drop-zone strong { font-family: Georgia, "Noto Serif SC", serif; font-size: 21px; font-weight: 500; } -.drop-zone > span:not(.upload-icon) { margin-top: 7px; color: var(--muted); font-size: 12px; } -.drop-zone .selected-file { margin-top: 22px; padding: 7px 12px; border-radius: 20px; background: var(--canvas); color: var(--ink); font-weight: 650; } - -.primary-button, .secondary-button { - display: inline-flex; - min-height: 44px; - align-items: center; - justify-content: center; - border: 0; - border-radius: 9px; - cursor: pointer; - font-size: 13px; + background: var(--ink); + color: white; + font-family: var(--data-font); + font-size: 12px; font-weight: 750; } -.primary-button { padding: 0 24px; background: var(--forest); color: white; } -.primary-button:hover { background: #1d5546; } -.primary-button:disabled { cursor: wait; opacity: .6; } -.secondary-button { padding: 0 18px; border: 1px solid #bdc9c4; background: transparent; color: var(--ink); } -.compact { min-height: 38px; padding: 0 18px; } -.result-card { position: relative; max-width: 790px; margin-top: 30px; padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); } -.result-card h3 { margin: 7px 0 0; font-size: 19px; } -.result-card > .status-pill { position: absolute; top: 24px; right: 24px; } -.metadata-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 28px 0; padding: 20px 0; border-block: 1px solid var(--line); } -dt { color: var(--muted); font-size: 11px; } -dd { margin: 7px 0 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 650; } -.text-link { color: var(--forest); font-size: 13px; font-weight: 750; } +.search-result-card:first-child .rank { + background: var(--brand); +} -.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); } -.table-meta { display: flex; justify-content: space-between; padding: 17px 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; } -.table-scroll { overflow-x: auto; } -table { width: 100%; border-collapse: collapse; font-size: 13px; } -th { padding: 13px 18px; color: var(--muted); background: #fafbf9; font-size: 10px; letter-spacing: .08em; text-align: left; text-transform: uppercase; } -td { padding: 18px; border-top: 1px solid #edf0ee; vertical-align: middle; } -.filename-cell { min-width: 190px; font-weight: 750; } -.row-actions { min-width: 116px; text-align: right; white-space: nowrap; } -.table-action { padding: 5px 7px; border: 0; background: transparent; color: var(--forest); cursor: pointer; font-size: 12px; font-weight: 700; } -.danger-link { color: var(--danger); } +.result-title-row { + display: flex; + align-items: start; + justify-content: space-between; + gap: 18px; +} -.status-pill { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; border-radius: 20px; background: #edf0ee; color: #47534f; font-size: 10px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; } -.status-ready { background: #dff2e7; color: #256043; } -.status-processing { background: #fff1cb; color: #7c5d13; } -.status-failed { background: #fbe2df; color: #923c36; } -.status-uploaded { background: #e3ebf4; color: #34556e; } +.result-title-row h4 { + margin: 0; + font-size: 14px; +} -.empty-state { display: flex; min-height: 240px; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 34px; color: var(--muted); text-align: center; } -.empty-state strong { color: var(--ink); font-family: Georgia, "Noto Serif SC", serif; font-size: 19px; font-weight: 500; } -.empty-state .primary-button { margin-top: 12px; color: white; font-family: inherit; font-size: 12px; } +.source-meta { + display: flex; + max-width: 60%; + gap: 16px; +} -.search-panel { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); } -.search-panel > label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 750; } -.search-controls { display: grid; grid-template-columns: minmax(0, 1fr) 90px 118px; gap: 12px; align-items: stretch; } -textarea, select { width: 100%; border: 1px solid #c9d3cf; border-radius: 9px; background: #fbfcfa; color: var(--ink); outline: none; } -textarea { min-height: 90px; padding: 13px 15px; resize: vertical; line-height: 1.55; } -textarea:focus, select:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgb(18 61 50 / 8%); } -.top-k-control { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; } -.top-k-control select { flex: 1; padding: 0 11px; } -.search-panel .primary-button { align-self: end; min-height: 54px; } -.results-heading { display: flex; align-items: end; justify-content: space-between; margin: 42px 0 15px; } -.results-heading h3 { margin: 5px 0 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 22px; font-weight: 500; } -.results-heading > span { color: var(--muted); font-size: 11px; } -.search-results { display: grid; gap: 12px; } -.search-empty { min-height: 220px; border: 1px dashed #b9c5c0; border-radius: 14px; } -.search-result-card { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 23px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); } -.rank { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--forest); color: var(--lime); font-family: Georgia, serif; font-size: 15px; } -.result-title-row { display: flex; align-items: start; justify-content: space-between; gap: 18px; } -.result-title-row h4 { margin: 0; font-size: 15px; } -.source-meta { display: flex; max-width: 60%; gap: 16px; } -.source-meta span { display: grid; gap: 3px; text-align: right; } -.source-meta small { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; } -.source-meta strong { overflow-wrap: anywhere; color: #46534e; font-size: 10px; font-weight: 650; } -.chunk-content { margin: 15px 0; color: #37433f; font-family: Georgia, "Noto Serif SC", serif; font-size: 14px; line-height: 1.75; white-space: pre-wrap; } -.score-row { display: flex; gap: 22px; } -.score-row span { display: flex; align-items: baseline; gap: 7px; } -.score-row small { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; } -.score-row strong { font-size: 11px; } +.source-meta span { + display: grid; + gap: 3px; + text-align: right; +} -.document-dialog { width: min(570px, calc(100vw - 32px)); padding: 30px; border: 0; border-radius: 14px; color: var(--ink); box-shadow: 0 24px 80px rgb(0 0 0 / 25%); } -.document-dialog::backdrop { background: rgb(10 25 20 / 55%); backdrop-filter: blur(2px); } -.document-dialog form { position: absolute; top: 15px; right: 15px; } -.icon-button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--canvas); cursor: pointer; font-size: 20px; } -.document-dialog h2 { margin: 10px 36px 24px 0; font-family: Georgia, "Noto Serif SC", serif; font-weight: 500; } -.dialog-metadata { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 0; } -.dialog-metadata div { padding-top: 14px; border-top: 1px solid var(--line); } +.source-meta small, +.score-row small { + color: var(--muted); + font-family: var(--data-font); + font-size: 8px; + font-weight: 750; + letter-spacing: .07em; + text-transform: uppercase; +} -.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } +.source-meta strong { + overflow-wrap: anywhere; + color: #4c4c48; + font-size: 10px; + font-weight: 650; +} + +.chunk-content { + margin: 15px 0; + color: #373733; + font-size: 13px; + line-height: 1.75; + white-space: pre-wrap; +} + +.score-row { + display: flex; + gap: 22px; +} + +.score-row span { + display: flex; + align-items: baseline; + gap: 7px; +} + +.score-row strong { + font-family: var(--data-font); + font-size: 10px; +} + +.document-dialog { + width: min(570px, calc(100vw - 32px)); + padding: 30px; + border: 0; + border-top: 4px solid var(--brand); + border-radius: 4px; + color: var(--ink); + box-shadow: 0 24px 80px rgb(0 0 0 / 25%); +} + +.document-dialog::backdrop { + background: rgb(10 10 10 / 58%); + backdrop-filter: blur(2px); +} + +.document-dialog form { + position: absolute; + top: 15px; + right: 15px; +} + +.icon-button { + width: 34px; + height: 34px; + border: 1px solid var(--line); + border-radius: 50%; + background: var(--canvas); + cursor: pointer; + font-size: 20px; +} + +.icon-button:hover { + border-color: var(--brand); + color: var(--brand); +} + +.document-dialog h2 { + margin: 10px 36px 24px 0; + font-family: var(--display-font); + font-weight: 600; +} + +.dialog-metadata { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 18px; + margin: 0; +} + +.dialog-metadata div { + padding-top: 14px; + border-top: 1px solid var(--line); +} @media (max-width: 820px) { .app-shell { grid-template-columns: 1fr; } .sidebar { position: static; width: 100%; height: auto; padding: 18px; } - .brand strong { font-size: 13px; } + .brand strong { font-size: 14px; } + .workspace-label, .sidebar-foot { display: none; } .primary-nav { grid-template-columns: repeat(3, 1fr); margin-top: 20px; } - .primary-nav a { justify-content: center; padding: 0 8px; font-size: 12px; } + .primary-nav a { min-height: 44px; justify-content: center; padding: 0 8px; font-size: 11px; } .primary-nav a span { display: none; } - .sidebar-foot { display: none; } + .primary-nav a.active::after { top: auto; right: 50%; bottom: -4px; transform: translate(50%, 50%); } .workspace { padding: 0 20px 48px; } .topbar { min-height: 88px; } - .api-link { display: none; } - .page { padding-top: 36px; } - .search-controls { grid-template-columns: 1fr 90px; } + .system-state, .api-link { display: none; } + .page { padding-top: 34px; } + .search-controls { grid-template-columns: minmax(0, 1fr) 90px; } .search-controls textarea { grid-column: 1 / -1; } .metadata-grid { grid-template-columns: 1fr; } } @media (max-width: 540px) { + .brand-mark { width: 36px; } .primary-nav a { min-height: 40px; } .heading-row { align-items: start; flex-direction: column; } .search-controls { grid-template-columns: 1fr; } .search-controls textarea { grid-column: auto; } .top-k-control select { min-height: 44px; } .search-result-card { grid-template-columns: 1fr; } - .result-title-row { align-items: start; flex-direction: column; gap: 6px; } + .result-title-row { align-items: start; flex-direction: column; gap: 8px; } .source-meta { max-width: 100%; flex-wrap: wrap; } .source-meta span { text-align: left; } .dialog-metadata { grid-template-columns: 1fr; } } + +@media (prefers-reduced-motion: reduce) { + *, *::before, *::after { + scroll-behavior: auto !important; + animation-duration: .01ms !important; + animation-iteration-count: 1 !important; + transition-duration: .01ms !important; + } +} diff --git a/apps/admin-web/index.html b/apps/admin-web/index.html index c314484..4376d3c 100644 --- a/apps/admin-web/index.html +++ b/apps/admin-web/index.html @@ -15,26 +15,33 @@
@@ -44,17 +51,21 @@

KNOWLEDGE OPERATIONS

上传文档

- - API 文档 - +
+ API FIRST · V1 + + API 文档 + +
+
- +

让知识进入检索链路

上传一个 PDF、DOCX、TXT 或 Markdown 文件,系统将同步完成解析、切分与索引。

@@ -70,8 +81,8 @@ required /> - 点击选择文件 - 单次上传一个文件 + 选择知识文件 + 支持 PDF、DOCX、TXT、Markdown · 单次一个文件 尚未选择文件 @@ -79,7 +90,7 @@