Initial commit: OmniAI Web Frontend

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 12:38:01 +08:00
commit bedee3ba8d
183 changed files with 94805 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
.dropzone {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 6px;
padding: 28px 16px;
border: 2px dashed var(--border-weak, #333);
border-radius: var(--radius-lg, 14px);
cursor: pointer;
transition: border-color 0.2s ease, background-color 0.2s ease;
text-align: center;
}
.dropzone:hover {
border-color: var(--accent, #0d9488);
background: color-mix(in srgb, var(--accent, #0d9488) 5%, transparent);
}
.dropzone--active {
border-color: var(--accent, #0d9488);
background: color-mix(in srgb, var(--accent, #0d9488) 10%, transparent);
border-style: solid;
}
.dropzone__label {
font-size: 14px;
color: var(--text-primary, #e5e5e5);
}
.dropzone__hint {
font-size: 12px;
color: var(--text-tertiary, #888);
}
+50
View File
@@ -0,0 +1,50 @@
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
padding: 48px 24px;
text-align: center;
}
.empty-state__illustration {
color: var(--fg-soft, #888);
margin-bottom: 8px;
opacity: 0.7;
}
.empty-state__title {
font-size: 16px;
font-weight: 600;
color: var(--fg-body, #e0e0e0);
}
.empty-state__desc {
font-size: 13px;
color: var(--fg-soft, #888);
max-width: 280px;
margin: 0;
line-height: 1.5;
}
.empty-state__action {
margin-top: 8px;
padding: 8px 20px;
border: none;
border-radius: 8px;
background: var(--accent, #0d9488);
color: #fff;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: background 0.15s, transform 0.1s;
}
.empty-state__action:hover {
background: var(--accent-hover, #0f766e);
}
.empty-state__action:active {
transform: scale(0.97);
}
File diff suppressed because it is too large Load Diff
+69
View File
@@ -0,0 +1,69 @@
/* Global motion utilities and shared animations */
/* Stagger entrance for list/grid children */
@keyframes list-item-in {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes scale-in {
from {
opacity: 0;
transform: scale(0.95);
}
to {
opacity: 1;
transform: scale(1);
}
}
@keyframes slide-up-in {
from {
opacity: 0;
transform: translateY(12px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes backdrop-in {
from { opacity: 0; }
to { opacity: 1; }
}
/* Stagger utility: apply to parent, children get delayed entrance */
.motion-stagger > * {
animation: list-item-in 280ms var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)) both;
}
.motion-stagger > *:nth-child(1) { animation-delay: 0ms; }
.motion-stagger > *:nth-child(2) { animation-delay: 40ms; }
.motion-stagger > *:nth-child(3) { animation-delay: 80ms; }
.motion-stagger > *:nth-child(4) { animation-delay: 120ms; }
.motion-stagger > *:nth-child(5) { animation-delay: 160ms; }
.motion-stagger > *:nth-child(6) { animation-delay: 200ms; }
.motion-stagger > *:nth-child(7) { animation-delay: 240ms; }
.motion-stagger > *:nth-child(8) { animation-delay: 280ms; }
.motion-stagger > *:nth-child(9) { animation-delay: 320ms; }
.motion-stagger > *:nth-child(10) { animation-delay: 360ms; }
.motion-stagger > *:nth-child(n+11) { animation-delay: 400ms; }
/* Global reduced-motion override */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
+17
View File
@@ -0,0 +1,17 @@
.page-transition {
position: relative;
flex: 1;
min-height: 0;
animation: page-fade-in 150ms ease-out both;
}
@keyframes page-fade-in {
from {
opacity: 0;
transform: translateY(4px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
+111
View File
@@ -0,0 +1,111 @@
/* Shared primitives for new CSS. Keep legacy component debt in legacy-components.css. */
.ui-surface {
border: 1px solid var(--border-subtle);
border-radius: var(--radius-lg);
background: var(--surface-panel);
box-shadow: var(--shadow-panel);
}
.ui-muted {
color: var(--text-muted);
}
.ui-focus-ring:focus-visible {
outline: 2px solid rgba(var(--accent-rgb), 0.48);
outline-offset: 2px;
}
.page-loading-skeleton {
display: flex;
flex-direction: column;
gap: 16px;
width: 100%;
height: 100%;
min-height: 200px;
padding: 32px;
}
.page-loading-skeleton__bar {
width: 40%;
height: 24px;
border-radius: 8px;
background: var(--surface-elevated, #222);
animation: skeleton-shimmer 1.4s ease infinite;
}
.page-loading-skeleton__row {
display: flex;
gap: 16px;
}
.page-loading-skeleton__card {
flex: 1;
height: 140px;
border-radius: 14px;
background: var(--surface-elevated, #222);
animation: skeleton-shimmer 1.4s ease infinite;
animation-delay: 0.15s;
}
.page-loading-skeleton__block {
width: 100%;
height: 200px;
border-radius: 14px;
background: var(--surface-elevated, #222);
animation: skeleton-shimmer 1.4s ease infinite;
animation-delay: 0.3s;
}
@keyframes skeleton-shimmer {
0%, 100% { opacity: 0.4; }
50% { opacity: 0.7; }
}
.page-transition-wrap {
width: 100%;
height: 100%;
min-height: 0;
}
.page-motion--exit {
animation: page-out 180ms ease both;
pointer-events: none;
}
.page-motion--exit .page-motion {
animation: none;
}
@keyframes page-out {
to { opacity: 0; transform: translateY(-6px); }
}
.page-loading-center {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
min-height: 200px;
gap: 12px;
}
.page-loading-center__text {
font: 400 13px/1 'PingFang SC', 'Microsoft YaHei UI', system-ui, sans-serif;
color: var(--text-muted, rgba(255,255,255,.45));
letter-spacing: 0.02em;
}
.page-loading-spinner {
width: 32px;
height: 32px;
border: 3px solid var(--border-subtle, #e5e5e5);
border-top-color: var(--accent, #0d9488);
border-radius: 50%;
animation: page-spin 0.7s linear infinite;
}
@keyframes page-spin {
to { transform: rotate(360deg); }
}
+399
View File
@@ -0,0 +1,399 @@
/* === Recharge Modal === */
.recharge-modal {
position: fixed;
inset: 0;
z-index: 1200;
display: grid;
place-items: center;
padding: 24px;
}
.recharge-modal__backdrop {
position: absolute;
inset: 0;
border: 0;
background: rgb(0 0 0 / 72%);
cursor: pointer;
backdrop-filter: blur(5px);
}
@keyframes rechargeModalIn {
from {
opacity: 0;
transform: translateY(12px) scale(0.98);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
.recharge-modal__panel {
position: relative;
z-index: 1;
display: grid;
gap: 20px;
width: min(1300px, 100%);
max-height: calc(100vh - 32px);
overflow-y: auto;
border: 1px solid var(--border-subtle, rgb(255 255 255 / 10%));
border-radius: 20px;
background: var(--bg-surface, #171a1f);
color: var(--fg-body, #edf2f7);
padding: 28px;
box-shadow: 0 28px 80px rgb(0 0 0 / 44%);
animation: rechargeModalIn 180ms ease both;
scrollbar-color: rgba(var(--accent-rgb), 0.36) transparent;
}
.recharge-modal__header {
position: relative;
display: block;
padding: 0 168px 18px;
border-bottom: 1px solid var(--border-weak, rgb(255 255 255 / 7%));
text-align: center;
}
.recharge-modal__header > div {
max-width: 720px;
margin: 0 auto;
}
.recharge-modal__eyebrow {
color: var(--accent, #34d399);
font-size: 12px;
font-weight: 850;
}
.recharge-modal__header h2 {
margin: 4px 0 6px;
font-size: 22px;
font-weight: 900;
letter-spacing: 0;
}
.recharge-modal__header p {
margin: 0;
color: var(--fg-muted, #9ba7b7);
font-size: 13px;
line-height: 1.55;
}
.recharge-modal__balance {
position: absolute;
top: 8px;
right: 48px;
border: 1px solid rgba(var(--accent-rgb), 0.28);
border-radius: 999px;
background: rgba(var(--accent-rgb), 0.1);
color: var(--fg-body, #edf2f7);
padding: 8px 12px;
font-size: 12px;
font-weight: 850;
white-space: nowrap;
}
.recharge-modal__close {
position: absolute;
top: 4px;
right: 0;
display: grid;
place-items: center;
width: 34px;
height: 34px;
border: 1px solid transparent;
border-radius: 9px;
background: transparent;
color: var(--fg-muted, #9ba7b7);
cursor: pointer;
transition:
background 0.15s,
border-color 0.15s,
color 0.15s;
}
.recharge-modal__close:hover {
border-color: var(--border-subtle, rgb(255 255 255 / 10%));
background: var(--bg-hover, rgb(255 255 255 / 7%));
color: var(--fg-body, #edf2f7);
}
.recharge-modal__promo {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
border: 1px solid rgba(var(--accent-rgb), 0.24);
border-radius: 14px;
background:
linear-gradient(90deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.06)),
var(--bg-elevated, #20242b);
color: var(--fg-muted, #9ba7b7);
padding: 12px 16px;
font-size: 13px;
line-height: 1.45;
text-align: center;
}
.recharge-modal__promo strong {
color: var(--accent, #34d399);
font-weight: 950;
white-space: nowrap;
}
.recharge-modal__audience-tabs {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
border: 1px solid var(--border-subtle, rgb(255 255 255 / 10%));
border-radius: 12px;
background: var(--bg-inset, rgb(0 0 0 / 18%));
padding: 6px;
}
.recharge-modal__audience-tabs button {
min-height: 38px;
border: 1px solid transparent;
border-radius: 9px;
background: transparent;
color: var(--fg-muted, #9ba7b7);
cursor: pointer;
font: inherit;
font-size: 13px;
font-weight: 900;
}
.recharge-modal__audience-tabs button:hover {
border-color: var(--border-subtle, rgb(255 255 255 / 10%));
background: var(--bg-hover, rgb(255 255 255 / 7%));
color: var(--fg-body, #edf2f7);
}
.recharge-modal__audience-tabs button.is-active {
border-color: rgba(var(--accent-rgb), 0.48);
background: rgba(var(--accent-rgb), 0.16);
color: var(--accent, #34d399);
}
.recharge-modal__grid {
display: grid;
gap: 14px;
}
.recharge-modal__grid[data-audience="personal"] {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.recharge-modal__grid[data-audience="enterprise"] {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.recharge-modal__card {
position: relative;
display: flex;
min-width: 0;
min-height: 390px;
flex-direction: column;
gap: 12px;
border: 1px solid var(--border-subtle, rgb(255 255 255 / 10%));
border-radius: 14px;
background: var(--bg-elevated, #20242b);
padding: 18px;
}
.recharge-modal__card.is-selected {
border-color: rgba(var(--accent-rgb), 0.55);
box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.16);
}
.recharge-modal__badge {
position: absolute;
top: 12px;
right: 12px;
border-radius: 999px;
background: var(--accent, #34d399);
color: #07110d;
padding: 4px 9px;
font-size: 11px;
font-weight: 900;
}
.recharge-modal__card-head {
display: flex;
align-items: center;
gap: 12px;
padding-right: 84px;
}
.recharge-modal__card-icon {
display: grid;
width: 42px;
height: 42px;
min-width: 42px;
place-items: center;
border-radius: 12px;
background: rgba(var(--accent-rgb), 0.12);
color: var(--accent, #34d399);
font-size: 18px;
}
.recharge-modal__card h3 {
margin: 0;
font-size: 17px;
font-weight: 900;
}
.recharge-modal__card-head span:not(.recharge-modal__card-icon) {
color: var(--fg-muted, #9ba7b7);
font-size: 12px;
font-weight: 800;
}
.recharge-modal__price strong {
color: var(--fg-body, #edf2f7);
font-size: 25px;
font-weight: 950;
}
.recharge-modal__period {
width: fit-content;
border: 1px solid rgba(var(--accent-rgb), 0.26);
border-radius: 999px;
background: rgba(var(--accent-rgb), 0.1);
color: var(--accent, #34d399);
padding: 4px 9px;
font-size: 12px;
font-weight: 900;
}
.recharge-modal__grant {
margin: 0;
border-radius: 10px;
background: var(--bg-inset, rgb(0 0 0 / 18%));
color: var(--fg-muted, #9ba7b7);
padding: 10px 12px;
font-size: 12px;
font-weight: 700;
line-height: 1.55;
}
.recharge-modal__diff-label {
width: fit-content;
color: var(--fg-body, #edf2f7);
font-size: 12px;
font-weight: 900;
}
.recharge-modal__features {
display: grid;
gap: 8px;
height: 92px;
margin: 0;
padding: 0;
padding-right: 6px;
overflow-y: auto;
list-style: none;
overscroll-behavior: contain;
scrollbar-width: none;
scrollbar-gutter: stable;
}
.recharge-modal__features::-webkit-scrollbar {
width: 0;
height: 0;
}
.recharge-modal__features li {
display: grid;
grid-template-columns: 14px minmax(0, 1fr);
gap: 8px;
color: var(--fg-muted, #9ba7b7);
font-size: 12px;
line-height: 1.45;
}
.recharge-modal__features .anticon {
margin-top: 2px;
color: var(--accent, #34d399);
font-size: 12px;
}
.recharge-modal__buy {
display: inline-flex;
align-items: center;
justify-content: center;
margin-top: auto;
min-height: 38px;
border: 0;
border-radius: 10px;
background: var(--accent, #34d399);
color: #07110d;
cursor: pointer;
font-size: 13px;
font-weight: 900;
}
.recharge-modal__buy.is-selected {
box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.2), 0 10px 24px rgba(var(--accent-rgb), 0.18);
}
.recharge-modal__buy:hover {
filter: brightness(1.05);
}
.recharge-modal__rules {
border: 1px solid var(--border-subtle, rgb(255 255 255 / 10%));
border-radius: 14px;
background: var(--bg-elevated, #20242b);
padding: 16px 18px;
}
.recharge-modal__rules h3 {
margin: 0 0 10px;
font-size: 15px;
font-weight: 900;
}
.recharge-modal__rules ol {
display: grid;
gap: 8px;
margin: 0;
padding-left: 20px;
color: var(--fg-muted, #9ba7b7);
font-size: 12px;
line-height: 1.55;
}
@media (max-width: 980px) {
.recharge-modal__grid[data-audience="personal"],
.recharge-modal__grid[data-audience="enterprise"] {
grid-template-columns: 1fr;
}
}
@media (max-width: 640px) {
.recharge-modal {
padding: 12px;
}
.recharge-modal__panel {
padding: 18px;
}
.recharge-modal__header {
padding: 0 40px 16px;
}
.recharge-modal__balance {
position: static;
display: inline-flex;
margin-top: 12px;
}
.recharge-modal__promo {
align-items: flex-start;
flex-direction: column;
text-align: left;
}
}
+56
View File
@@ -0,0 +1,56 @@
@keyframes skeleton-shimmer {
0% { background-position: 120% 0; }
100% { background-position: -120% 0; }
}
.skeleton-shimmer {
background: linear-gradient(
90deg,
rgba(255, 255, 255, 0.04),
rgba(255, 255, 255, 0.1),
rgba(255, 255, 255, 0.04)
);
background-size: 220% 100%;
animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
.skeleton-card {
display: flex;
flex-direction: column;
gap: 10px;
padding: 12px;
border-radius: var(--radius-lg, 14px);
background: var(--bg-elevated, #222);
}
.skeleton-card__thumb {
width: 100%;
aspect-ratio: 4 / 3;
border-radius: 8px;
}
.skeleton-card__body {
display: flex;
flex-direction: column;
gap: 8px;
padding: 4px 0;
}
.skeleton-card__title {
width: 60%;
height: 14px;
border-radius: 4px;
}
.skeleton-card__desc {
width: 85%;
height: 12px;
border-radius: 4px;
}
.skeleton-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 16px;
padding: 16px;
}
+108
View File
@@ -0,0 +1,108 @@
.app-toast-container {
position: fixed;
bottom: 24px;
left: 50%;
transform: translateX(-50%);
z-index: 9999;
display: flex;
flex-direction: column;
gap: 8px;
pointer-events: none;
max-width: min(420px, calc(100vw - 32px));
}
.app-toast {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 14px;
border-radius: 10px;
background: rgba(22, 22, 22, 0.95);
backdrop-filter: blur(8px);
font-size: 13px;
color: var(--text-primary, #e5e5e5);
pointer-events: auto;
animation: toast-in 220ms ease-out;
border: 1px solid rgba(255, 255, 255, 0.08);
}
.app-toast--success {
border-color: rgba(16, 185, 129, 0.3);
}
.app-toast--error {
border-color: rgba(239, 68, 68, 0.3);
}
.app-toast__icon {
flex-shrink: 0;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
font-size: 11px;
font-weight: 700;
}
.app-toast--success .app-toast__icon {
background: rgba(16, 185, 129, 0.2);
color: #10b981;
}
.app-toast--error .app-toast__icon {
background: rgba(239, 68, 68, 0.2);
color: #ef4444;
}
.app-toast--info .app-toast__icon {
background: rgba(99, 102, 241, 0.2);
color: #818cf8;
}
.app-toast__msg {
flex: 1;
line-height: 1.4;
}
.app-toast__retry {
flex-shrink: 0;
padding: 3px 10px;
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 6px;
background: transparent;
color: var(--text-primary, #e5e5e5);
font-size: 12px;
cursor: pointer;
transition: background 0.15s;
}
.app-toast__retry:hover {
background: rgba(255, 255, 255, 0.08);
}
.app-toast__close {
flex-shrink: 0;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
border: none;
border-radius: 50%;
background: transparent;
color: var(--text-tertiary, #888);
font-size: 14px;
cursor: pointer;
transition: color 0.15s;
}
.app-toast__close:hover {
color: var(--text-primary, #e5e5e5);
}
@keyframes toast-in {
from { opacity: 0; transform: translateY(12px); }
to { opacity: 1; transform: translateY(0); }
}