Refactor frontend styles toward Tailwind utilities and unified design system

This commit is contained in:
shuaiplus
2026-04-25 02:23:10 +08:00
parent 514889adfc
commit e4bc1b9bbe
20 changed files with 632 additions and 1177 deletions
+3
View File
@@ -155,6 +155,7 @@ export default function App() {
const [confirm, setConfirm] = useState<AppConfirmState | null>(null);
const [mobileLayout, setMobileLayout] = useState(false);
const [mobileSidebarToggleKey, setMobileSidebarToggleKey] = useState(0);
const [decryptedFolders, setDecryptedFolders] = useState<VaultFolder[]>([]);
const [decryptedCiphers, setDecryptedCiphers] = useState<Cipher[]>([]);
const [decryptedSends, setDecryptedSends] = useState<Send[]>([]);
@@ -1198,6 +1199,7 @@ export default function App() {
profile,
session,
mobileLayout,
mobileSidebarToggleKey,
importRoute: IMPORT_ROUTE,
settingsHomeRoute: SETTINGS_HOME_ROUTE,
settingsAccountRoute: SETTINGS_ACCOUNT_ROUTE,
@@ -1403,6 +1405,7 @@ export default function App() {
onLock={handleLock}
onLogout={handleLogout}
onToggleTheme={handleToggleTheme}
onToggleMobileSidebar={() => setMobileSidebarToggleKey((key) => key + 1)}
mainRoutesProps={mainRoutesProps}
/>
@@ -21,6 +21,7 @@ interface AppAuthenticatedShellProps {
onLock: () => void;
onLogout: () => void;
onToggleTheme: () => void;
onToggleMobileSidebar: () => void;
mainRoutesProps: AppMainRoutesProps;
}
@@ -51,7 +52,7 @@ export default function AppAuthenticatedShell(props: AppAuthenticatedShellProps)
className="btn btn-secondary small mobile-sidebar-toggle"
aria-label={props.sidebarToggleTitle}
title={props.sidebarToggleTitle}
onClick={() => window.dispatchEvent(new CustomEvent('nodewarden:toggle-sidebar'))}
onClick={props.onToggleMobileSidebar}
>
<FolderIcon size={16} className="btn-icon" />
</button>
+1 -1
View File
@@ -76,7 +76,7 @@ export default function AppGlobalOverlays(props: AppGlobalOverlaysProps) {
<span>{t('txt_totp_code')}</span>
<input className="input" value={props.totpCode} autoComplete="one-time-code" onInput={(e) => props.onTotpCodeChange((e.currentTarget as HTMLInputElement).value)} />
</label>
<label className="check-line" style={{ marginBottom: 0 }}>
<label className="check-line check-line-compact">
<input type="checkbox" checked={props.rememberDevice} onChange={(e) => props.onRememberDeviceChange((e.currentTarget as HTMLInputElement).checked)} />
<span>{t('txt_trust_this_device_for_30_days')}</span>
</label>
+3
View File
@@ -33,6 +33,7 @@ export interface AppMainRoutesProps {
profile: Profile | null;
session: SessionState | null;
mobileLayout: boolean;
mobileSidebarToggleKey: number;
importRoute: string;
settingsHomeRoute: string;
settingsAccountRoute: string;
@@ -167,6 +168,7 @@ export default function AppMainRoutes(props: AppMainRoutesProps) {
onBulkDelete={props.onBulkDeleteSends}
uploadingSendFileName={props.uploadingSendFileName}
sendUploadPercent={props.sendUploadPercent}
mobileSidebarToggleKey={props.mobileSidebarToggleKey}
onNotify={props.onNotify}
/>
</Suspense>
@@ -206,6 +208,7 @@ export default function AppMainRoutes(props: AppMainRoutesProps) {
attachmentDownloadPercent={props.attachmentDownloadPercent}
uploadingAttachmentName={props.uploadingAttachmentName}
attachmentUploadPercent={props.attachmentUploadPercent}
mobileSidebarToggleKey={props.mobileSidebarToggleKey}
/>
</Suspense>
</Route>
+78 -8
View File
@@ -1,4 +1,4 @@
import { useEffect, useState } from 'preact/hooks';
import { useEffect, useRef, useState } from 'preact/hooks';
import { Download, Eye, Lock } from 'lucide-preact';
import { accessPublicSend, accessPublicSendFile, decryptPublicSend, decryptPublicSendFileBytes } from '@/lib/api/send';
import { toBufferSource } from '@/lib/crypto';
@@ -11,29 +11,95 @@ interface PublicSendPageProps {
keyPart: string | null;
}
interface PublicSendFileData {
id: string;
fileName?: string | null;
sizeName?: string | null;
}
interface PublicSendData {
id: string;
type: 0 | 1;
decName?: string | null;
decText?: string | null;
decFileName?: string | null;
expirationDate?: string | null;
file?: PublicSendFileData | null;
}
function asRecord(value: unknown): Record<string, unknown> | null {
return value && typeof value === 'object' ? value as Record<string, unknown> : null;
}
function optionalString(value: unknown): string | null {
return typeof value === 'string' ? value : null;
}
function parsePublicSendData(value: unknown): PublicSendData | null {
const source = asRecord(value);
if (!source) return null;
const id = optionalString(source.id);
const rawType = Number(source.type);
if (!id || (rawType !== 0 && rawType !== 1)) return null;
const fileSource = asRecord(source.file);
const fileId = optionalString(fileSource?.id);
const file = fileSource && fileId
? {
id: fileId,
fileName: optionalString(fileSource.fileName),
sizeName: optionalString(fileSource.sizeName),
}
: null;
if (rawType === 1 && !file) return null;
return {
id,
type: rawType,
decName: optionalString(source.decName),
decText: optionalString(source.decText),
decFileName: optionalString(source.decFileName),
expirationDate: optionalString(source.expirationDate),
file,
};
}
export default function PublicSendPage(props: PublicSendPageProps) {
const [loading, setLoading] = useState(true);
const [password, setPassword] = useState('');
const [needPassword, setNeedPassword] = useState(false);
const [error, setError] = useState('');
const [sendData, setSendData] = useState<any>(null);
const [sendData, setSendData] = useState<PublicSendData | null>(null);
const [busy, setBusy] = useState(false);
const [downloadPercent, setDownloadPercent] = useState<number | null>(null);
const loadRequestRef = useRef(0);
const loadAbortRef = useRef<AbortController | null>(null);
async function loadSend(pass?: string): Promise<void> {
loadAbortRef.current?.abort();
const controller = new AbortController();
const requestId = loadRequestRef.current + 1;
loadRequestRef.current = requestId;
loadAbortRef.current = controller;
setBusy(true);
setError('');
setLoading(true);
try {
const data = await accessPublicSend(props.accessId, props.keyPart, pass);
const data = await accessPublicSend(props.accessId, props.keyPart, pass, { signal: controller.signal });
if (controller.signal.aborted || requestId !== loadRequestRef.current) return;
if (!props.keyPart) {
setError(t('txt_this_link_is_missing_decryption_key'));
setSendData(null);
return;
}
const decrypted = await decryptPublicSend(data, props.keyPart);
setSendData(decrypted);
if (controller.signal.aborted || requestId !== loadRequestRef.current) return;
const parsed = parsePublicSendData(decrypted);
if (!parsed) throw new Error(t('txt_send_unavailable'));
setSendData(parsed);
setNeedPassword(false);
} catch (e) {
if (controller.signal.aborted || requestId !== loadRequestRef.current) return;
const err = e as Error & { status?: number };
if (err.status === 401) {
setNeedPassword(true);
@@ -43,6 +109,7 @@ export default function PublicSendPage(props: PublicSendPageProps) {
}
setSendData(null);
} finally {
if (controller.signal.aborted || requestId !== loadRequestRef.current) return;
setBusy(false);
setLoading(false);
}
@@ -86,6 +153,9 @@ export default function PublicSendPage(props: PublicSendPageProps) {
useEffect(() => {
void loadSend();
return () => {
loadAbortRef.current?.abort();
};
}, [props.accessId, props.keyPart]);
return (
@@ -120,13 +190,13 @@ export default function PublicSendPage(props: PublicSendPageProps) {
{!loading && sendData && (
<>
<h2 style={{ marginTop: '8px' }}>{sendData.decName || t('txt_no_name')}</h2>
<h2 className="public-send-title">{sendData.decName || t('txt_no_name')}</h2>
{sendData.type === 0 ? (
<div className="card" style={{ marginTop: '10px' }}>
<div className="card public-send-card">
<div className="notes">{sendData.decText || ''}</div>
</div>
) : (
<div className="card" style={{ marginTop: '10px' }}>
<div className="card public-send-card">
<div className="kv-line">
<span>{t('txt_file')}</span>
<strong>{sendData.decFileName || sendData.file?.fileName || sendData.file?.sizeName || t('txt_encrypted_file')}</strong>
@@ -142,7 +212,7 @@ export default function PublicSendPage(props: PublicSendPageProps) {
{!loading && !sendData && !needPassword && !error && (
<p className="muted">
<Eye size={14} style={{ verticalAlign: 'text-bottom' }} /> {t('txt_send_unavailable')}
<Eye size={14} className="inline-status-icon" /> {t('txt_send_unavailable')}
</p>
)}
{!!error && <p className="local-error">{error}</p>}
@@ -66,8 +66,8 @@ export default function SecurityDevicesPage(props: SecurityDevicesPageProps) {
<section className="card">
<div className="section-head">
<div>
<h3 style={{ margin: 0 }}>{t('txt_device_management')}</h3>
<div className="muted-inline" style={{ marginTop: 4 }}>
<h3 className="flush-title">{t('txt_device_management')}</h3>
<div className="muted-inline section-note">
{t('txt_manage_device_sessions_and_30_day_totp_trusted_sessions')}
</div>
</div>
@@ -89,7 +89,7 @@ export default function SecurityDevicesPage(props: SecurityDevicesPageProps) {
</section>
<section className="card">
<h3 style={{ marginTop: 0 }}>{t('txt_authorized_devices')}</h3>
<h3 className="section-title-flush">{t('txt_authorized_devices')}</h3>
<table className="table">
<thead>
<tr>
@@ -169,7 +169,7 @@ export default function SecurityDevicesPage(props: SecurityDevicesPageProps) {
{!props.loading && props.devices.length === 0 && (
<tr>
<td colSpan={7}>
<div className="empty" style={{ minHeight: 80 }}>{t('txt_no_devices_found')}</div>
<div className="empty empty-comfortable">{t('txt_no_devices_found')}</div>
</td>
</tr>
)}
+8 -11
View File
@@ -14,6 +14,7 @@ interface SendsPageProps {
onBulkDelete: (ids: string[]) => Promise<void>;
uploadingSendFileName: string;
sendUploadPercent: number | null;
mobileSidebarToggleKey: number;
onNotify: (type: 'success' | 'error', text: string) => void;
}
@@ -107,12 +108,9 @@ export default function SendsPage(props: SendsPageProps) {
}, []);
useEffect(() => {
const onToggleSidebar = () => {
if (!props.mobileSidebarToggleKey) return;
setMobileSidebarOpen((open) => !open);
};
window.addEventListener('nodewarden:toggle-sidebar', onToggleSidebar);
return () => window.removeEventListener('nodewarden:toggle-sidebar', onToggleSidebar);
}, []);
}, [props.mobileSidebarToggleKey]);
useEffect(() => {
try {
@@ -325,8 +323,7 @@ export default function SendsPage(props: SendsPageProps) {
{filteredSends.map((send, index) => (
<div
key={send.id}
className={`list-item stagger-item ${selectedId === send.id ? 'active' : ''}`}
style={{ animationDelay: `${Math.min(index, 10) * 26}ms` }}
className={`list-item stagger-item stagger-delay-${Math.min(index, 10)} ${selectedId === send.id ? 'active' : ''}`}
onClick={(event) => {
const target = event.target as HTMLElement;
if (target.closest('.row-check')) return;
@@ -405,7 +402,7 @@ export default function SendsPage(props: SendsPageProps) {
)}
{isEditing && draft && (
<div key={`send-editor-${draft.id || selectedSend?.id || 'new'}-${draft.type}`} className="detail-switch-stage">
<div className="card stagger-item" style={{ animationDelay: '0ms' }}>
<div className="card stagger-item stagger-delay-0">
<h3 className="detail-title">{isCreating ? t('txt_new_send') : t('txt_edit_send')}</h3>
{!!props.uploadingSendFileName && <div className="detail-sub">{sendUploadLabel}</div>}
<div className="field-grid">
@@ -505,12 +502,12 @@ export default function SendsPage(props: SendsPageProps) {
{!isEditing && selectedSend && (
<div key={`send-detail-${selectedSend.id}`} className="detail-switch-stage">
<div className="card stagger-item" style={{ animationDelay: '36ms' }}>
<div className="card stagger-item stagger-delay-1">
<h3 className="detail-title">{selectedSend.decName || t('txt_no_name')}</h3>
<div className="detail-sub">{Number(selectedSend.type) === 1 ? t('txt_file_send') : t('txt_text_send')}</div>
</div>
<div className="card stagger-item" style={{ animationDelay: '72ms' }}>
<div className="card stagger-item stagger-delay-2">
<h4>{t('txt_send_details')}</h4>
<div className="kv-line"><span>{t('txt_access_count')}</span><strong>{selectedSend.accessCount || 0}</strong></div>
<div className="kv-line"><span>{t('txt_deletion_date')}</span><strong>{selectedSend.deletionDate || t('txt_dash')}</strong></div>
@@ -533,7 +530,7 @@ export default function SendsPage(props: SendsPageProps) {
</div>
{!!(selectedSend.decNotes || '').trim() && (
<div className="card stagger-item" style={{ animationDelay: '108ms' }}>
<div className="card stagger-item stagger-delay-3">
<h4>{t('txt_notes')}</h4>
<div className="notes">{selectedSend.decNotes || ''}</div>
</div>
+9 -26
View File
@@ -268,7 +268,7 @@ export default function SettingsPage(props: SettingsPageProps) {
<div className="settings-subcard">
<h3>{t('txt_recovery_code')}</h3>
<p className="muted-inline" style={{ marginBottom: 8 }}>
<p className="muted-inline settings-field-note">
{t('txt_this_is_a_one_time_code_after_it_is_used_a_new_code_is_generated_automatically')}
</p>
<label className="field">
@@ -298,8 +298,8 @@ export default function SettingsPage(props: SettingsPageProps) {
</button>
</div>
{recoveryCode && (
<div className="card" style={{ marginTop: 10, marginBottom: 0 }}>
<div style={{ fontWeight: 800, letterSpacing: '0.08em' }}>{recoveryCode}</div>
<div className="card recovery-code-card">
<div className="recovery-code-value">{recoveryCode}</div>
</div>
)}
</div>
@@ -341,30 +341,13 @@ export default function SettingsPage(props: SettingsPageProps) {
onConfirm={() => setApiKeyDialogOpen(false)}
onCancel={() => setApiKeyDialogOpen(false)}
>
<div
style={{
border: '1px solid color-mix(in srgb, var(--danger) 24%, transparent)',
background: 'color-mix(in srgb, var(--danger) 7%, var(--surface))',
borderRadius: 8,
padding: 14,
marginTop: 12,
marginBottom: 14,
}}
>
<div style={{ fontWeight: 800, color: 'var(--danger)', marginBottom: 8 }}>{t('txt_warning')}</div>
<div style={{ color: 'var(--text)', lineHeight: 1.55 }}>{t('txt_api_key_warning_body')}</div>
<div className="api-key-warning-panel">
<div className="api-key-warning-title">{t('txt_warning')}</div>
<div className="api-key-warning-body">{t('txt_api_key_warning_body')}</div>
</div>
<div
style={{
border: '1px solid color-mix(in srgb, var(--primary) 25%, transparent)',
background: 'color-mix(in srgb, var(--primary) 7%, var(--surface))',
borderRadius: 8,
padding: 14,
marginBottom: 10,
}}
>
<div style={{ display: 'flex', alignItems: 'center', gap: 8, fontWeight: 800, color: 'var(--primary)', marginBottom: 10 }}>
<div className="api-key-credentials-panel">
<div className="api-key-credentials-title">
<KeyRound size={15} />
<span>{t('txt_oauth_client_credentials')}</span>
</div>
@@ -376,7 +359,7 @@ export default function SettingsPage(props: SettingsPageProps) {
] as [string, string][]).map(([label, value]) => (
<label key={label} className="field">
<span>{label}</span>
<div style={{ display: 'grid', gridTemplateColumns: 'minmax(0, 1fr) auto', gap: 8 }}>
<div className="api-key-credential-row">
<input className="input" readOnly value={value} onFocus={(e) => (e.currentTarget as HTMLInputElement).select()} />
<button
type="button"
+3 -5
View File
@@ -58,6 +58,7 @@ interface VaultPageProps {
attachmentDownloadPercent: number | null;
uploadingAttachmentName: string;
attachmentUploadPercent: number | null;
mobileSidebarToggleKey: number;
}
@@ -131,12 +132,9 @@ export default function VaultPage(props: VaultPageProps) {
}, []);
useEffect(() => {
const onToggleSidebar = () => {
if (!props.mobileSidebarToggleKey) return;
setMobileSidebarOpen((open) => !open);
};
window.addEventListener('nodewarden:toggle-sidebar', onToggleSidebar);
return () => window.removeEventListener('nodewarden:toggle-sidebar', onToggleSidebar);
}, []);
}, [props.mobileSidebarToggleKey]);
useEffect(() => {
const onQuickAdd = () => {
@@ -105,7 +105,7 @@ export default function VaultDetailView(props: VaultDetailViewProps) {
<div className="card">
<h4>{t('txt_master_password_reprompt_2')}</h4>
<div className="detail-sub">{t('txt_this_item_requires_master_password_every_time_before_viewing_details')}</div>
<div className="actions" style={{ marginTop: '10px' }}>
<div className="actions detail-unlock-actions">
<button type="button" className="btn btn-primary" onClick={props.onOpenReprompt}>
<Eye size={14} className="btn-icon" /> {t('txt_unlock_details')}
</button>
@@ -117,7 +117,7 @@ export default function VaultDetailView(props: VaultDetailViewProps) {
<div className="card">
<h3 className="detail-title">{props.selectedCipher.decName || t('txt_no_name')}</h3>
<div className="detail-sub">{props.folderName(props.selectedCipher.folderId)}</div>
{isArchived && <div className="list-badge" style={{ marginTop: '8px', width: 'fit-content' }}>{t('txt_archived')}</div>}
{isArchived && <div className="list-badge archive-badge">{t('txt_archived')}</div>}
</div>
{props.selectedCipher.login && (
+1 -1
View File
@@ -299,7 +299,7 @@ export default function VaultEditor(props: VaultEditorProps) {
</DndContext>
{props.draft.loginFido2Credentials.length > 0 && (
<>
<div className="section-head" style={{ marginTop: '18px' }}>
<div className="section-head passkeys-section-head">
<h4>{t('txt_passkeys')}</h4>
</div>
<div className="attachment-list">
+19 -10
View File
@@ -260,18 +260,24 @@ async function buildPublicSendAccessPayload(password?: string, keyPart?: string
return payload;
}
export async function accessPublicSend(accessId: string, keyPart?: string | null, password?: string): Promise<any> {
export async function accessPublicSend(
accessId: string,
keyPart?: string | null,
password?: string,
options?: { signal?: AbortSignal }
): Promise<unknown> {
const payload = await buildPublicSendAccessPayload(password, keyPart);
const resp = await fetch(`/api/sends/access/${encodeURIComponent(accessId)}`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload),
signal: options?.signal,
});
if (!resp.ok) {
const message = await parseErrorMessage(resp, 'Failed to access send');
throw createApiError(message, resp.status);
}
return (await parseJson<any>(resp)) || null;
return (await parseJson<unknown>(resp)) || null;
}
export async function accessPublicSendFile(sendId: string, fileId: string, keyPart?: string | null, password?: string): Promise<string> {
@@ -290,19 +296,22 @@ export async function accessPublicSendFile(sendId: string, fileId: string, keyPa
return body.url;
}
export async function decryptPublicSend(accessData: any, urlSafeKey: string): Promise<any> {
export async function decryptPublicSend(accessData: unknown, urlSafeKey: string): Promise<unknown> {
const sendKeyMaterial = base64UrlToBytes(urlSafeKey);
const sendKey = await toSendKeyParts(sendKeyMaterial);
const out: any = { ...accessData };
out.decName = await decryptStr(accessData?.name || '', sendKey.enc, sendKey.mac);
if (accessData?.text?.text) {
out.decText = await decryptStr(accessData.text.text, sendKey.enc, sendKey.mac);
const source = accessData && typeof accessData === 'object' ? accessData as Record<string, unknown> : {};
const text = source.text && typeof source.text === 'object' ? source.text as Record<string, unknown> : null;
const file = source.file && typeof source.file === 'object' ? source.file as Record<string, unknown> : null;
const out: Record<string, unknown> = { ...source };
out.decName = await decryptStr(String(source.name || ''), sendKey.enc, sendKey.mac);
if (text?.text) {
out.decText = await decryptStr(String(text.text), sendKey.enc, sendKey.mac);
}
if (accessData?.file?.fileName) {
if (file?.fileName) {
try {
out.decFileName = await decryptStr(accessData.file.fileName, sendKey.enc, sendKey.mac);
out.decFileName = await decryptStr(String(file.fileName), sendKey.enc, sendKey.mac);
} catch {
out.decFileName = String(accessData.file.fileName);
out.decFileName = String(file.fileName);
}
}
return out;
+30 -42
View File
@@ -7,25 +7,34 @@
}
.public-send-page {
min-height: 80vh;
align-items: center;
@apply min-h-[80vh] items-center;
justify-items: center;
}
.public-send-title {
@apply mt-2;
}
.public-send-card {
@apply mt-2.5;
}
.inline-status-icon {
@apply align-text-bottom;
}
.auth-card {
@apply relative w-full overflow-hidden border bg-panel p-[30px] shadow-elevated;
border-color: var(--line);
border-radius: 22px;
@apply rounded-[22px];
}
.auth-card h1 {
margin: 0 0 4px 0;
text-align: center;
@apply m-0 mb-1 text-center;
}
.standalone-shell {
@apply grid gap-3.5;
width: min(640px, 100%);
@apply grid w-[min(640px,100%)] gap-3.5;
}
.standalone-brand {
@@ -33,9 +42,7 @@
}
.standalone-brand-outside {
justify-content: center;
width: 100%;
margin-bottom: 2px;
@apply mb-0.5 w-full justify-center;
}
.standalone-brand-logo {
@@ -44,10 +51,8 @@
}
.standalone-brand-wordmark {
display: block;
height: auto;
@apply block h-auto max-w-full;
width: clamp(200px, 30vw, 360px);
max-width: 100%;
filter: drop-shadow(0 10px 22px rgba(43, 102, 217, 0.18));
}
@@ -56,17 +61,12 @@
}
.standalone-muted {
text-align: left;
@apply text-left;
}
.jwt-warning-head {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
margin-bottom: 10px;
@apply mb-2.5 flex items-center justify-center gap-2.5 text-center;
color: #b45309;
text-align: center;
}
.jwt-warning-box {
@@ -74,29 +74,23 @@
}
.jwt-warning-label {
font-size: 13px;
font-weight: 700;
@apply mb-1.5 text-[13px] font-bold;
color: #92400e;
margin-bottom: 6px;
}
.jwt-warning-copy {
margin: 0 0 14px;
@apply m-0 mb-3.5 leading-[1.6];
color: #475569;
line-height: 1.6;
}
.jwt-warning-list {
margin: 0;
padding-left: 18px;
@apply m-0 pl-[18px] leading-[1.55];
color: #334155;
line-height: 1.55;
}
.jwt-inline-link {
@apply font-bold no-underline;
color: #1d4ed8;
font-weight: 700;
text-decoration: none;
}
.jwt-inline-link:hover {
@@ -104,16 +98,12 @@
}
.jwt-secret-fields {
margin-top: 8px;
display: grid;
gap: 6px;
@apply mt-2 grid gap-1.5;
}
.jwt-secret-row {
display: grid;
@apply grid items-start gap-2;
grid-template-columns: 88px minmax(0, 1fr);
gap: 8px;
align-items: start;
}
.jwt-secret-row > span {
@@ -121,7 +111,7 @@
}
.jwt-generator {
margin-top: 14px;
@apply mt-3.5;
}
.jwt-generator-actions {
@@ -129,9 +119,8 @@
}
.jwt-copy-hint {
@apply text-[13px] font-bold;
color: #15803d;
font-size: 13px;
font-weight: 700;
}
.standalone-footer {
@@ -139,9 +128,8 @@
}
.standalone-footer a {
@apply font-bold no-underline;
color: #1d4ed8;
font-weight: 700;
text-decoration: none;
}
.standalone-footer a:hover {
@@ -149,6 +137,6 @@
}
.standalone-version {
font-weight: 700;
@apply font-bold;
color: #1d4ed8;
}
+1 -3
View File
@@ -5,9 +5,7 @@
html,
body,
#root {
margin: 0;
padding: 0;
@apply h-full w-full;
@apply m-0 h-full w-full p-0;
color: var(--text);
background: var(--bg-accent);
font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
+12 -21
View File
@@ -7,7 +7,7 @@
}
.field > span {
@apply mb-2 block text-sm font-semibold;
@apply mb-2 mt-2.5 block text-sm font-semibold;
}
.input {
@@ -18,10 +18,10 @@
}
select.input {
@apply pr-[42px];
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
padding-right: 42px;
background-image:
linear-gradient(45deg, transparent 50%, #365fa8 50%),
linear-gradient(135deg, #365fa8 50%, transparent 50%);
@@ -33,11 +33,7 @@ select.input {
}
input[type='file'].input {
height: auto;
min-height: 48px;
padding: 8px 10px;
font-size: 14px;
line-height: 1.4;
@apply h-auto min-h-12 px-2.5 py-2 text-sm leading-[1.4];
}
input[type='file'].input::file-selector-button {
@@ -75,7 +71,7 @@ input[type='file'].input::file-selector-button:hover {
}
.password-wrap .input {
padding-right: 44px;
@apply pr-11;
}
.password-toggle {
@@ -101,8 +97,7 @@ input[type='file'].input::file-selector-button:hover {
.user-chip,
.side-link,
.mobile-tab {
position: relative;
overflow: hidden;
@apply relative overflow-hidden;
}
.topbar-actions .btn::before,
@@ -110,15 +105,9 @@ input[type='file'].input::file-selector-button:hover {
.side-link::before,
.mobile-tab::before {
content: '';
position: absolute;
left: 50%;
top: 50%;
width: 110px;
height: 110px;
border-radius: 999px;
@apply absolute left-1/2 top-1/2 h-[110px] w-[110px] rounded-full opacity-0;
background: radial-gradient(circle, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.08) 42%, transparent 72%);
transform: translate(-50%, -50%) scale(0.68);
opacity: 0;
pointer-events: none;
transition:
opacity var(--dur-fast) var(--ease-smooth),
@@ -141,7 +130,7 @@ input[type='file'].input::file-selector-button:hover {
}
.btn-icon {
flex-shrink: 0;
@apply shrink-0;
}
.btn.full {
@@ -191,6 +180,10 @@ input[type='file'].input::file-selector-button:hover {
@apply mt-2 text-[13px] leading-normal text-slate-500;
}
.check-line-compact {
@apply mb-0;
}
.auth-support-row {
@apply -mt-0.5 mb-3 flex items-center justify-between gap-2.5;
}
@@ -205,7 +198,5 @@ input[type='file'].input::file-selector-button:hover {
}
.auth-link-btn:disabled {
color: #94a3b8;
cursor: not-allowed;
text-decoration: none;
@apply cursor-not-allowed text-slate-400 no-underline;
}
File diff suppressed because it is too large Load Diff
+32 -105
View File
@@ -1,27 +1,17 @@
.dialog-mask {
position: fixed;
inset: 0;
width: 100vw;
height: 100dvh;
@apply fixed inset-0 grid h-dvh w-screen place-items-center p-5 opacity-0;
background: rgba(15, 23, 42, 0.5);
display: grid;
place-items: center;
z-index: 1200;
padding: 20px;
opacity: 0;
animation: fade-in var(--dur-medium) var(--ease-smooth) both;
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
}
.dialog-card {
@apply rounded-[20px] border bg-white p-5 text-center;
width: min(460px, 100%);
background: #fff;
border-radius: 20px;
border: 1px solid var(--line);
box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
padding: 20px;
text-align: center;
transform-origin: 50% 30%;
animation: dialog-in 240ms var(--ease-out-strong) both;
}
@@ -45,20 +35,11 @@
}
.dialog-warning-head {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
margin-bottom: 8px;
@apply mb-2 flex items-center justify-center gap-3;
}
.dialog-warning-badge {
width: 48px;
height: 48px;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 16px;
@apply inline-flex h-12 w-12 items-center justify-center rounded-2xl;
background: linear-gradient(180deg, #fff1f2, #ffe4e6);
color: #dc2626;
box-shadow:
@@ -67,10 +48,7 @@
}
.dialog-warning-kicker {
font-size: 12px;
font-weight: 800;
letter-spacing: 0.16em;
text-transform: uppercase;
@apply text-xs font-extrabold uppercase tracking-[0.16em];
color: #b91c1c;
}
@@ -83,69 +61,50 @@
}
.dialog-card .field {
text-align: left;
@apply text-left;
}
.dialog-title {
margin: 6px 0;
font-size: 30px;
@apply my-1.5 text-3xl;
}
.dialog-message {
@apply mb-2.5;
color: #475467;
margin-bottom: 10px;
}
.dialog-card.warning .dialog-title {
@apply mb-2.5;
color: #7f1d1d;
margin-bottom: 10px;
}
.dialog-message.warning {
margin-bottom: 16px;
padding: 14px 16px;
border-radius: 16px;
@apply mb-4 rounded-2xl px-4 py-3.5 leading-[1.65];
border: 1px solid rgba(220, 38, 38, 0.16);
background: linear-gradient(180deg, rgba(255, 241, 242, 0.94), rgba(255, 247, 237, 0.9));
color: #7a2832;
line-height: 1.65;
box-shadow: 0 10px 28px rgba(248, 113, 113, 0.08) inset;
}
.dialog-btn {
width: 100%;
height: 50px;
font-size: 20px;
margin-top: 8px;
@apply mt-2 h-[50px] w-full text-xl;
}
.dialog-extra {
margin-top: 8px;
@apply mt-2;
}
.dialog-divider {
height: 1px;
@apply my-2 mb-2.5 h-px;
background: var(--line);
margin: 8px 0 10px;
}
.import-summary-dialog {
max-width: 520px;
text-align: left;
position: relative;
padding-top: 16px;
@apply relative max-w-[520px] pt-4 text-left;
}
.import-summary-close {
position: absolute;
top: 10px;
right: 10px;
border: none;
background: transparent;
color: #64748b;
font-size: 24px;
line-height: 1;
cursor: pointer;
@apply absolute right-2.5 top-2.5 cursor-pointer border-0 bg-transparent text-2xl leading-none text-slate-500;
}
.import-summary-close:hover {
@@ -153,34 +112,29 @@
}
.import-summary-table-wrap {
margin-top: 8px;
@apply mt-2 overflow-hidden rounded-[10px];
border: 1px solid var(--line);
border-radius: 10px;
overflow: hidden;
}
.import-summary-table {
width: 100%;
@apply w-full text-sm;
border-collapse: collapse;
font-size: 14px;
}
.import-summary-table th,
.import-summary-table td {
padding: 10px 12px;
@apply px-3 py-2.5;
border-bottom: 1px solid var(--line);
}
.import-summary-table th {
text-align: left;
@apply bg-slate-50 text-left;
color: #475467;
background: #f8fafc;
}
.import-summary-table td:last-child,
.import-summary-table th:last-child {
text-align: right;
width: 96px;
@apply w-24 text-right;
}
.import-summary-table tbody tr:last-child td {
@@ -188,72 +142,53 @@
}
.import-summary-failed-list {
margin-top: 10px;
padding: 10px 12px;
@apply mt-2.5 rounded-[10px] px-3 py-2.5 text-[13px];
border: 1px solid #fecaca;
border-radius: 10px;
background: #fef2f2;
color: #991b1b;
font-size: 13px;
}
.import-summary-failed-title {
font-weight: 700;
margin-bottom: 6px;
@apply mb-1.5 font-bold;
}
.import-summary-failed-list ul {
margin: 0;
padding-left: 18px;
@apply m-0 pl-[18px];
}
.import-summary-failed-list li + li {
margin-top: 4px;
@apply mt-1;
}
.settings-twofactor-grid {
display: grid;
@apply grid gap-3;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
}
.settings-subcard {
@apply rounded-xl bg-white p-3;
border: 1px solid var(--line);
border-radius: 12px;
padding: 12px;
background: #fff;
}
.settings-subcard h3 {
margin-top: 0;
margin-bottom: 10px;
@apply mb-2.5 mt-0;
}
.toast-stack {
position: fixed;
@apply fixed grid list-none gap-2.5 p-0;
top: 16px;
right: 16px;
z-index: 1400;
width: min(420px, calc(100vw - 20px));
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: 10px;
}
.toast-item {
position: relative;
border-radius: 10px;
@apply relative flex items-center justify-between overflow-hidden rounded-[10px] px-3.5 py-3;
border: 1px solid #bbdfc6;
background: #dff4e5;
color: #0f5132;
padding: 12px 14px;
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
overflow: hidden;
display: flex;
justify-content: space-between;
align-items: center;
animation: toast-in 240ms var(--ease-out-strong) both;
}
@@ -270,15 +205,11 @@
}
.toast-text {
font-weight: 700;
padding-right: 10px;
@apply pr-2.5 font-bold;
}
.toast-close {
border: none;
background: transparent;
cursor: pointer;
font-size: 20px;
@apply cursor-pointer border-0 bg-transparent text-xl;
color: inherit;
transition: transform var(--dur-fast) var(--ease-out-soft), opacity var(--dur-fast) var(--ease-smooth);
}
@@ -289,11 +220,7 @@
}
.toast-progress {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 3px;
@apply absolute bottom-0 left-0 h-[3px] w-full;
background: rgba(15, 23, 42, 0.2);
animation: toast-life 4.5s linear forwards;
}
+67 -177
View File
@@ -1,11 +1,11 @@
@media (max-width: 1180px) {
.app-page {
padding: 8px;
@apply p-2;
}
.app-shell {
@apply rounded-xl;
height: calc(100vh - 16px);
border-radius: 12px;
}
.app-main {
@@ -13,26 +13,24 @@
}
.app-side {
@apply grid items-start gap-2;
border-right: none;
border-bottom: 1px solid #d9e0ea;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
align-items: start;
align-self: start;
height: fit-content;
gap: 8px;
}
.app-side > .side-link {
min-height: 0;
@apply min-h-0;
}
.vault-grid {
grid-template-columns: 1fr;
height: auto;
@apply h-auto;
}
.sidebar {
max-height: 280px;
@apply max-h-[280px];
}
.totp-grid,
.field-grid {
@@ -53,115 +51,91 @@
}
.standalone-title {
font-size: 24px;
@apply text-2xl;
}
.standalone-footer {
font-size: 12px;
line-height: 1.4;
@apply text-xs leading-[1.4];
}
}
@media (max-width: 900px) {
.auth-page {
padding: 14px;
align-items: start;
@apply items-start p-3.5;
}
.standalone-shell {
width: 100%;
max-width: 460px;
gap: 10px;
padding-top: 12px;
@apply w-full max-w-[460px] gap-2.5 pt-3;
}
.standalone-brand-outside {
justify-content: flex-start;
@apply justify-start;
}
.standalone-brand-logo {
width: 44px;
height: 44px;
@apply h-11 w-11;
}
.auth-card {
padding: 20px 16px;
border-radius: 18px;
@apply rounded-[18px] px-4 py-5;
}
.btn.full {
height: 48px;
font-size: 18px;
@apply h-12 text-lg;
}
.auth-support-row {
align-items: center;
flex-direction: row;
@apply flex-row items-center;
}
.app-page {
padding: 0;
@apply p-0;
background: transparent;
}
.app-shell {
--mobile-topbar-height: 58px;
--mobile-tabbar-height: 70px;
height: 100dvh;
max-width: none;
@apply h-dvh max-w-none rounded-none border-0;
border: none;
border-radius: 0;
box-shadow: none;
}
.topbar {
@apply relative z-20 px-3;
height: var(--mobile-topbar-height);
padding: 0 12px;
position: relative;
z-index: 20;
}
.brand {
min-width: 0;
gap: 10px;
font-size: 18px;
@apply min-w-0 gap-2.5 text-lg;
}
.brand-logo {
width: 34px;
height: 34px;
@apply h-[34px] w-[34px];
}
.mobile-page-title {
display: inline;
@apply inline;
}
.topbar-actions .user-chip,
.topbar-actions > .btn:not(.mobile-sidebar-toggle):not(.mobile-lock-btn),
.topbar-actions > .theme-switch-wrap {
display: none;
@apply hidden;
}
.mobile-sidebar-toggle,
.mobile-lock-btn {
display: inline-flex;
width: 36px;
min-width: 36px;
height: 36px;
padding: 0;
justify-content: center;
font-size: 0;
gap: 0;
@apply inline-flex h-9 w-9 min-w-9 justify-center gap-0 p-0 text-[0];
}
.mobile-sidebar-toggle .btn-icon,
.mobile-lock-btn .btn-icon {
margin: 0;
@apply m-0;
}
.mobile-theme-btn {
display: inline-flex;
align-items: center;
@apply inline-flex items-center;
}
.mobile-theme-btn .theme-switch {
@@ -170,26 +144,21 @@
}
.app-main {
display: flex;
flex-direction: column;
min-height: 0;
@apply flex min-h-0 flex-col;
}
.app-side {
display: none;
@apply hidden;
}
.content {
flex: 1;
min-height: 0;
@apply min-h-0 flex-1;
-webkit-overflow-scrolling: touch;
}
.mobile-tabbar {
display: grid;
@apply grid items-center gap-1.5;
grid-template-columns: repeat(4, minmax(0, 1fr));
align-items: center;
gap: 6px;
min-height: var(--mobile-tabbar-height);
padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
border-top: 1px solid var(--line);
@@ -197,15 +166,8 @@
}
.mobile-tab {
display: grid;
justify-items: center;
gap: 4px;
@apply grid justify-items-center gap-1 rounded-xl px-1 py-1.5 text-[11px] font-bold no-underline;
color: #64748b;
text-decoration: none;
font-size: 11px;
font-weight: 700;
padding: 6px 4px;
border-radius: 12px;
transition:
transform 220ms var(--ease-out-soft),
background-color var(--dur-fast) var(--ease-smooth),
@@ -223,30 +185,21 @@
}
.vault-grid {
gap: 10px;
padding: 0;
@apply gap-2.5 p-0;
}
.sidebar {
display: none;
@apply hidden;
}
.mobile-sidebar-sheet {
display: block;
position: fixed;
left: 10px;
right: 10px;
@apply fixed left-2.5 right-2.5 z-[55] block overflow-auto rounded-[18px] p-3 opacity-0;
top: calc(var(--mobile-topbar-height) + 10px);
bottom: auto;
max-height: calc(100dvh - 145px);
z-index: 55;
overflow: auto;
border: 1px solid #d8dee8;
border-radius: 18px;
background: #fff;
padding: 12px;
box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
opacity: 0;
visibility: hidden;
pointer-events: none;
transform: translate3d(0, 10px, 0) scale(0.98);
@@ -257,37 +210,26 @@
}
.mobile-sidebar-sheet.open {
opacity: 1;
@apply opacity-100;
visibility: visible;
pointer-events: auto;
transform: translate3d(0, 0, 0) scale(1);
}
.mobile-sidebar-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
margin-bottom: 10px;
@apply mb-2.5 flex items-center justify-between gap-2.5;
}
.mobile-sidebar-title {
font-size: 16px;
font-weight: 800;
@apply text-base font-extrabold;
color: #0f172a;
}
.mobile-sidebar-close {
width: 34px;
height: 34px;
@apply inline-grid h-[34px] w-[34px] cursor-pointer place-items-center rounded-full p-0;
border: 1px solid #d7dde6;
border-radius: 999px;
background: #fff;
color: #0f172a;
display: inline-grid;
place-items: center;
cursor: pointer;
padding: 0;
transition:
transform var(--dur-fast) var(--ease-out-soft),
background-color var(--dur-fast) var(--ease-smooth),
@@ -299,37 +241,31 @@
}
.mobile-sidebar-sheet .sidebar-block {
margin: 0;
padding: 0;
@apply m-0 rounded-none border-0 p-0;
border: none;
border-radius: 0;
background: transparent;
box-shadow: none;
}
.mobile-sidebar-sheet .tree-btn {
margin-bottom: 2px;
@apply mb-0.5;
}
.mobile-sidebar-sheet .folder-row {
align-items: stretch;
gap: 4px;
@apply items-stretch gap-1;
}
.mobile-sidebar-sheet .folder-row .tree-btn {
min-height: 42px;
@apply min-h-[42px];
}
.mobile-sidebar-sheet .sidebar-title,
.mobile-sidebar-sheet .sidebar-title-row {
padding-bottom: 6px;
margin-bottom: 0;
@apply mb-0 pb-1.5;
}
.mobile-sidebar-sheet .tree-btn {
padding-left: 8px;
padding-right: 8px;
border-radius: 10px;
@apply rounded-[10px] px-2;
}
.mobile-sidebar-sheet .tree-btn.active {
@@ -337,56 +273,39 @@
}
.mobile-sidebar-sheet .folder-delete-btn {
width: 28px;
height: 42px;
border-radius: 8px;
@apply h-[42px] w-7 rounded-lg;
}
.list-col {
max-width: none;
@apply max-w-none;
}
.list-head {
display: grid;
@apply grid items-center gap-2;
grid-template-columns: minmax(0, 1fr) auto auto auto;
gap: 8px;
align-items: center;
}
.list-count {
grid-column: auto;
width: auto;
font-size: 12px;
white-space: nowrap;
@apply w-auto whitespace-nowrap text-xs;
}
.list-head .search-input-wrap {
width: 100%;
min-width: 0;
@apply w-full min-w-0;
}
.list-head .search-input {
width: 100%;
min-width: 0;
height: 42px;
border-radius: 14px;
@apply h-[42px] w-full min-w-0 rounded-[14px];
}
.list-icon-btn {
width: auto;
min-width: 0;
padding: 0 12px;
font-size: 13px;
gap: 6px;
white-space: nowrap;
@apply w-auto min-w-0 gap-1.5 whitespace-nowrap px-3 py-0 text-[13px];
}
.toolbar.actions {
justify-content: flex-end;
@apply justify-end overflow-visible pb-0.5;
flex-wrap: unset;
gap: var(--actions-gap);
overflow: visible;
padding-bottom: 2px;
}
.actions {
@@ -394,37 +313,21 @@
}
.toolbar.actions .btn.small {
width: auto;
min-width: 0;
height: 34px;
padding: 0 12px;
font-size: 13px;
gap: 6px;
border-radius: 999px;
white-space: nowrap;
@apply h-[34px] w-auto min-w-0 gap-1.5 whitespace-nowrap rounded-full px-3 py-0 text-[13px];
}
.mobile-fab-wrap {
position: fixed;
right: 14px;
@apply fixed right-3.5 z-[45];
bottom: calc(14px + var(--mobile-tabbar-height) + env(safe-area-inset-bottom));
z-index: 45;
}
.mobile-fab-trigger {
width: 36px;
height: 56px;
padding: 0;
border-radius: 999px;
font-size: 0;
gap: 0;
@apply h-14 w-9 gap-0 rounded-full p-0 text-[0];
box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}
.mobile-fab-trigger .btn-icon {
margin: 0;
width: 20px;
height: 20px;
@apply m-0 h-5 w-5;
}
.mobile-fab-wrap .create-menu {
@@ -435,18 +338,15 @@
}
.list-panel {
border-radius: 16px;
overflow: visible;
@apply overflow-visible rounded-2xl;
}
.list-item {
padding: 12px;
border-radius: 14px;
@apply rounded-[14px] p-3;
}
.row-check {
width: 18px;
height: 18px;
@apply h-[18px] w-[18px];
}
.vault-grid.mobile-panel-detail .sidebar,
@@ -454,20 +354,15 @@
.vault-grid.mobile-panel-edit .sidebar,
.vault-grid.mobile-panel-edit .list-col {
display: none;
@apply hidden;
}
.mobile-detail-sheet {
display: block;
position: fixed;
left: 0;
right: 0;
@apply fixed left-0 right-0 z-[35] block overflow-auto opacity-0;
top: calc(var(--mobile-topbar-height) + env(safe-area-inset-top));
bottom: calc(var(--mobile-tabbar-height) + env(safe-area-inset-bottom));
z-index: 35;
overflow: auto;
background: transparent;
padding: 0 0 18px;
opacity: 0;
visibility: hidden;
pointer-events: none;
transform: translate3d(0, 18px, 0);
@@ -478,43 +373,38 @@
}
.mobile-detail-sheet.open {
opacity: 1;
@apply opacity-100;
visibility: visible;
pointer-events: auto;
transform: translate3d(0, 0, 0);
}
.mobile-panel-head {
display: flex;
align-items: center;
margin: 0 10px 10px;
@apply mb-2.5 ml-2.5 mr-2.5 flex items-center;
}
.mobile-panel-back {
min-height: 40px;
@apply min-h-10;
}
.mobile-detail-sheet > .detail-switch-stage,
.mobile-detail-sheet > .card,
.mobile-detail-sheet > .empty {
margin-left: 10px;
margin-right: 10px;
@apply ml-2.5 mr-2.5;
}
.detail-col .card,
.import-export-panel,
.settings-subcard {
border-radius: 16px;
@apply rounded-2xl;
}
.card {
padding: 14px 14px;
@apply p-3.5;
}
.section-head {
align-items: flex-start;
gap: 10px;
flex-direction: column;
@apply flex-col items-start gap-2.5;
}
.detail-actions {
+15 -39
View File
@@ -6,7 +6,7 @@
@apply relative mx-auto flex max-w-[1600px] flex-col overflow-hidden border bg-panel-soft shadow-elevated;
height: calc(100vh - 40px);
border-color: var(--line);
border-radius: 24px;
@apply rounded-3xl;
}
.topbar {
@@ -20,10 +20,8 @@
}
.brand-wordmark {
display: block;
height: auto;
@apply block h-auto max-w-full;
width: clamp(210px, 20vw, 290px);
max-width: 100%;
filter: drop-shadow(0 12px 24px rgba(43, 102, 217, 0.12));
}
@@ -42,19 +40,19 @@
}
.mobile-tabbar {
display: none;
@apply hidden;
}
.mobile-sidebar-toggle {
display: none;
@apply hidden;
}
.mobile-lock-btn {
display: none;
@apply hidden;
}
.mobile-theme-btn {
display: none;
@apply hidden;
}
.theme-switch-wrap {
@@ -62,16 +60,11 @@
}
.theme-switch {
position: relative;
display: inline-block;
width: 56px;
height: 32px;
@apply relative inline-block h-8 w-14;
}
.theme-switch-input {
opacity: 0;
width: 0;
height: 0;
@apply h-0 w-0 opacity-0;
}
.theme-switch-slider {
@@ -81,11 +74,8 @@
}
.theme-switch-slider::before {
position: absolute;
@apply absolute h-[26px] w-[26px] rounded-full;
content: '';
height: 26px;
width: 26px;
border-radius: 999px;
left: 2px;
bottom: 2px;
z-index: 2;
@@ -98,24 +88,20 @@
}
.theme-switch .sun svg {
position: absolute;
@apply absolute h-[18px] w-[18px];
top: 6px;
left: 32px;
z-index: 1;
width: 18px;
height: 18px;
opacity: 0.95;
transition: transform var(--dur-medium) var(--ease-out-soft), opacity var(--dur-fast) var(--ease-smooth);
}
.theme-switch .moon svg {
fill: #5b86d6;
position: absolute;
@apply absolute h-4 w-4;
top: 7px;
left: 7px;
z-index: 1;
width: 16px;
height: 16px;
opacity: 0.88;
transition: transform var(--dur-medium) var(--ease-out-soft), opacity var(--dur-fast) var(--ease-smooth);
}
@@ -143,11 +129,7 @@
}
.topbar-actions .btn {
height: 34px;
border-radius: 12px;
padding: 0 12px;
font-size: 13px;
font-weight: 600;
@apply h-[34px] rounded-xl px-3 text-[13px] font-semibold;
transition-duration: 220ms;
}
@@ -203,24 +185,18 @@
}
.mobile-sidebar-mask {
position: fixed;
inset: 0;
@apply pointer-events-none invisible fixed inset-0 opacity-0;
background: rgba(15, 23, 42, 0.36);
z-index: 54;
opacity: 0;
visibility: hidden;
pointer-events: none;
transition:
opacity 220ms var(--ease-smooth),
visibility 220ms var(--ease-smooth);
}
.mobile-sidebar-mask.open {
opacity: 1;
visibility: visible;
pointer-events: auto;
@apply pointer-events-auto visible opacity-100;
}
.mobile-sidebar-head {
display: none;
@apply hidden;
}
+162 -347
View File
@@ -6,9 +6,8 @@
.sidebar,
.list-panel,
.card {
@apply border bg-panel shadow-soft;
@apply rounded-2xl border bg-panel shadow-soft;
border-color: var(--line);
border-radius: 16px;
}
.sidebar {
@@ -25,14 +24,11 @@
}
.sidebar-title-row {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 8px;
@apply flex items-center justify-between pb-2;
}
.sidebar-title-row .sidebar-title {
margin-bottom: 0;
@apply mb-0;
}
.folder-title-actions {
@@ -55,9 +51,7 @@
}
.search-input-wrap {
position: relative;
flex: 1 1 auto;
min-width: 0;
@apply relative min-w-0 flex-auto;
}
.search-input:focus {
@@ -67,23 +61,14 @@
}
.search-input-wrap .search-input {
padding-right: 42px;
@apply pr-[42px];
}
.search-clear-btn {
position: absolute;
top: 50%;
right: 9px;
width: 22px;
height: 22px;
display: inline-flex;
align-items: center;
justify-content: center;
@apply absolute right-[9px] top-1/2 inline-flex h-[22px] w-[22px] cursor-pointer items-center justify-center rounded-full border-0;
border: none;
border-radius: 999px;
background: rgba(148, 163, 184, 0.18);
color: var(--muted);
cursor: pointer;
transform: translateY(-50%);
transition: background-color var(--dur-fast) var(--ease-out-soft), color var(--dur-fast) var(--ease-out-soft), transform var(--dur-fast) var(--ease-out-soft);
}
@@ -114,39 +99,25 @@
}
.tree-icon {
flex-shrink: 0;
@apply shrink-0;
}
.tree-label {
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@apply min-w-0 overflow-hidden text-ellipsis whitespace-nowrap;
}
.folder-row {
display: flex;
align-items: center;
gap: 6px;
@apply flex items-center gap-1.5;
}
.folder-row .tree-btn {
margin-bottom: 0;
@apply mb-0;
}
.folder-delete-btn {
@apply inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent p-0;
border: none;
background: transparent;
color: #64748b;
width: 24px;
height: 24px;
padding: 0;
cursor: pointer;
flex-shrink: 0;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 6px;
transition:
color var(--dur-fast) var(--ease-smooth),
background-color var(--dur-fast) var(--ease-smooth),
@@ -169,18 +140,16 @@
}
.toolbar {
margin: 0 0 8px 0;
@apply mb-2;
}
.toolbar.actions {
justify-content: flex-end;
@apply justify-end;
gap: var(--actions-gap);
}
.toolbar .btn.small {
height: 30px;
border-radius: 999px;
font-size: 12px;
@apply h-[30px] rounded-full text-xs;
}
.list-head {
@@ -188,40 +157,32 @@
}
.list-head .search-input-wrap {
flex: 1 1 auto;
min-width: 0;
@apply min-w-0 flex-auto;
}
.list-head .search-input {
height: 42px;
@apply h-[42px];
}
.list-head .btn {
white-space: nowrap;
@apply whitespace-nowrap;
}
.list-count {
flex: 0 0 auto;
@apply shrink-0 whitespace-nowrap text-xs;
color: var(--text-muted);
font-size: 12px;
white-space: nowrap;
}
.list-icon-btn {
white-space: nowrap;
@apply whitespace-nowrap;
}
.sort-menu-wrap {
position: relative;
flex: 0 0 auto;
@apply relative shrink-0;
}
.sort-trigger {
min-width: 36px;
width: 36px;
padding: 0;
justify-content: center;
gap: 0;
@apply w-9 min-w-9 justify-center gap-0 p-0;
}
.sort-trigger.active {
@@ -231,34 +192,19 @@
}
.sort-menu {
position: absolute;
@apply absolute right-0 z-30 min-w-[156px] rounded-2xl border p-1.5;
top: calc(100% + 6px);
right: 0;
z-index: 30;
min-width: 156px;
padding: 6px;
border: 1px solid var(--line);
border-radius: 16px;
background: var(--panel);
border-color: var(--line);
box-shadow: var(--shadow-md);
transform-origin: top right;
animation: menu-in 190ms var(--ease-out-strong) both;
}
.sort-menu-item {
width: 100%;
@apply flex w-full cursor-pointer items-center justify-between gap-2.5 rounded-[10px] border-0 bg-transparent px-2.5 py-[9px] text-left text-[13px];
border: none;
background: transparent;
border-radius: 10px;
padding: 9px 10px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
color: #0f172a;
font-size: 13px;
text-align: left;
cursor: pointer;
transition:
background-color var(--dur-fast) var(--ease-smooth),
color var(--dur-fast) var(--ease-smooth),
@@ -271,15 +217,13 @@
}
.sort-menu-item.active {
@apply font-bold;
background: rgba(37, 99, 235, 0.1);
color: var(--primary-strong);
font-weight: 700;
}
.sort-menu-check-placeholder {
width: 14px;
height: 14px;
flex: 0 0 14px;
@apply h-3.5 w-3.5 shrink-0;
}
.list-panel {
@@ -295,12 +239,10 @@
.list-item::before {
content: '';
position: absolute;
inset: 0;
@apply absolute inset-0 opacity-0;
background:
linear-gradient(90deg, rgba(43, 102, 217, 0.06), transparent 24%, transparent 76%, rgba(14, 165, 233, 0.05)),
radial-gradient(circle at 18px 50%, rgba(255, 255, 255, 0.28), transparent 44%);
opacity: 0;
transition:
opacity var(--dur-fast) var(--ease-smooth),
transform 320ms var(--ease-out-soft);
@@ -313,6 +255,62 @@
animation: stagger-rise 520ms var(--ease-out-strong) both;
}
.stagger-delay-0 {
@apply [animation-delay:0ms];
}
.stagger-delay-1 {
@apply [animation-delay:26ms];
}
.stagger-delay-2 {
@apply [animation-delay:52ms];
}
.stagger-delay-3 {
@apply [animation-delay:78ms];
}
.stagger-delay-4 {
@apply [animation-delay:104ms];
}
.stagger-delay-5 {
@apply [animation-delay:130ms];
}
.stagger-delay-6 {
@apply [animation-delay:156ms];
}
.stagger-delay-7 {
@apply [animation-delay:182ms];
}
.stagger-delay-8 {
@apply [animation-delay:208ms];
}
.stagger-delay-9 {
@apply [animation-delay:234ms];
}
.stagger-delay-10 {
@apply [animation-delay:260ms];
}
.detail-unlock-actions {
@apply mt-2.5;
}
.archive-badge {
@apply mt-2 w-fit;
}
.passkeys-section-head {
@apply mt-[18px];
}
.list-item:hover {
background: #fcfdff;
border-color: rgba(148, 163, 184, 0.26);
@@ -336,26 +334,12 @@
}
.row-check {
width: 16px;
height: 16px;
position: relative;
z-index: 2;
cursor: pointer;
@apply relative z-[2] h-4 w-4 cursor-pointer;
}
.row-main {
flex: 1;
min-width: 0;
@apply relative z-[1] flex min-w-0 flex-1 cursor-pointer items-center gap-2.5 border-0 bg-transparent p-0 text-left;
border: none;
background: transparent;
padding: 0;
display: flex;
align-items: center;
gap: 10px;
text-align: left;
cursor: pointer;
position: relative;
z-index: 1;
transition: transform 220ms var(--ease-out-soft);
}
@@ -365,69 +349,43 @@
}
.list-icon-wrap {
width: 24px;
height: 24px;
display: grid;
place-items: center;
flex-shrink: 0;
@apply grid h-6 w-6 shrink-0 place-items-center;
transition: transform 240ms var(--ease-out-soft), filter 240ms var(--ease-out-soft);
}
.list-icon {
width: 24px;
height: 24px;
border-radius: 6px;
@apply h-6 w-6 rounded-md;
}
.list-icon-fallback {
display: grid;
place-items: center;
@apply grid place-items-center;
color: #64748b;
transition: color var(--dur-fast) var(--ease-smooth), transform 240ms var(--ease-out-soft);
}
.list-icon-fallback svg {
width: 24px;
height: 24px;
@apply h-6 w-6;
}
.list-text {
flex: 1;
min-width: 0;
overflow: hidden;
@apply min-w-0 flex-1 overflow-hidden;
transition: transform 220ms var(--ease-out-soft);
}
.list-title {
display: flex;
align-items: center;
gap: 6px;
@apply flex min-w-0 items-center gap-1.5 text-[15px] font-bold;
color: var(--primary-strong);
font-size: 15px;
font-weight: 700;
min-width: 0;
transition: color var(--dur-fast) var(--ease-smooth), letter-spacing 220ms var(--ease-out-soft);
}
.list-title-text {
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@apply min-w-0 overflow-hidden text-ellipsis whitespace-nowrap;
}
.list-badge {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 2px 6px;
border-radius: 999px;
font-size: 11px;
font-weight: 700;
line-height: 1;
@apply inline-flex shrink-0 items-center justify-center rounded-full px-1.5 py-0.5 text-[11px] font-bold leading-none;
color: #475569;
background: #e8eef8;
flex-shrink: 0;
}
.list-badge.danger {
@@ -436,13 +394,8 @@
}
.list-sub {
display: block;
@apply mt-0.5 block overflow-hidden text-ellipsis whitespace-nowrap text-[13px];
color: #5f6f85;
margin-top: 2px;
font-size: 13px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transition: color var(--dur-fast) var(--ease-smooth), transform 220ms var(--ease-out-soft), opacity var(--dur-fast) var(--ease-smooth);
}
@@ -474,12 +427,11 @@
}
.detail-col {
overflow: auto;
min-height: 0;
@apply min-h-0 overflow-auto;
}
.mobile-panel-head {
display: none;
@apply hidden;
}
.card {
@@ -487,7 +439,7 @@
}
.detail-col > .card {
opacity: 1;
@apply opacity-100;
animation: none;
}
@@ -502,36 +454,29 @@
}
.detail-switch-stage > .card {
opacity: 1;
@apply opacity-100;
animation: none;
}
.card h4 {
margin-top: 0;
margin-bottom: 12px;
@apply mb-3 mt-0;
}
.detail-title {
margin: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@apply m-0 overflow-hidden text-ellipsis whitespace-nowrap;
}
.detail-sub {
@apply mt-2;
color: #667085;
margin-top: 8px;
}
.password-history-link {
margin-top: 10px;
padding: 0;
@apply mt-2.5 cursor-pointer p-0 font-bold;
border: none;
background: transparent;
color: var(--primary);
font: inherit;
font-weight: 700;
cursor: pointer;
}
.password-history-link:hover {
@@ -540,12 +485,8 @@
}
.kv-line {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
@apply flex items-center justify-between gap-2.5 py-2.5;
border-bottom: 1px solid rgba(154, 172, 205, 0.22);
padding: 10px 0;
}
.kv-line:last-child {
@@ -557,12 +498,9 @@
}
.kv-row {
display: grid;
@apply grid items-center gap-2.5 py-2.5;
grid-template-columns: minmax(0px, 80px) minmax(0, 1fr) auto;
align-items: center;
gap: 10px;
border-bottom: 1px solid rgba(154, 172, 205, 0.22);
padding: 10px 0;
}
.kv-row:last-child {
@@ -570,32 +508,22 @@
}
.password-history-dialog {
width: min(560px, calc(100vw - 32px));
@apply w-[min(560px,calc(100vw-32px))];
}
.password-history-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 12px;
@apply mb-3 flex items-center justify-between gap-3;
}
.password-history-head .dialog-title {
margin: 0;
@apply m-0;
}
.password-history-close {
display: inline-flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
@apply inline-flex h-[34px] w-[34px] cursor-pointer items-center justify-center rounded-full border-0;
border: none;
border-radius: 999px;
background: transparent;
color: var(--muted-strong);
cursor: pointer;
}
.password-history-close:hover {
@@ -604,85 +532,59 @@
}
.password-history-list {
display: grid;
gap: 12px;
margin: 10px 0 18px;
@apply mb-[18px] mt-2.5 grid gap-3;
}
.password-history-item {
position: relative;
border: 1px solid var(--line);
border-radius: 14px;
@apply relative rounded-[14px] border py-4 pl-4 pr-[54px];
border-color: var(--line);
background: var(--panel-soft);
padding: 16px 54px 14px 16px;
box-shadow: var(--shadow-sm);
}
.password-history-value {
@apply text-[22px] leading-[1.15];
color: var(--primary);
font-size: 22px;
line-height: 1.15;
letter-spacing: 0.01em;
word-break: break-all;
}
.password-history-time {
margin-top: 8px;
@apply mt-2;
color: var(--muted);
}
.password-history-copy {
position: absolute;
top: 12px;
right: 12px;
@apply absolute right-3 top-3;
}
.password-history-copy-btn {
min-width: 36px;
padding: 0;
width: 36px;
height: 36px;
@apply h-9 w-9 min-w-9 p-0;
}
.kv-label {
@apply min-w-0 overflow-hidden text-ellipsis whitespace-nowrap;
color: #64748b;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.kv-main {
display: flex;
align-items: center;
gap: 10px;
justify-content: flex-start;
min-width: 0;
@apply flex min-w-0 items-center justify-start gap-2.5;
}
.kv-main > strong {
min-width: 0;
@apply min-w-0;
}
.totp-inline {
display: inline-flex;
align-items: center;
gap: 10px;
min-width: 0;
@apply inline-flex min-w-0 items-center gap-2.5;
}
.totp-timer {
width: 30px;
height: 30px;
position: relative;
display: inline-grid;
place-items: center;
flex-shrink: 0;
@apply relative inline-grid h-[30px] w-[30px] shrink-0 place-items-center;
}
.totp-ring {
width: 30px;
height: 30px;
@apply h-[30px] w-[30px];
transform: rotate(-90deg);
}
@@ -703,41 +605,24 @@
}
.totp-timer-value {
position: absolute;
inset: 0;
display: grid;
place-items: center;
font-size: 11px;
font-weight: 700;
@apply absolute inset-0 grid place-items-center text-[11px] font-bold;
color: #0f172a;
}
.totp-codes-page {
display: flex;
flex-direction: column;
min-height: 100%;
@apply flex min-h-full flex-col;
}
.totp-codes-list {
display: grid;
gap: 10px;
@apply grid w-full items-start gap-2.5;
grid-template-columns: repeat(var(--totp-columns, 1), minmax(320px, 1fr));
align-items: start;
width: 100%;
}
.totp-code-row {
display: grid;
@apply grid w-full min-w-0 max-w-none items-center gap-2.5 rounded-xl border p-3;
grid-template-columns: auto minmax(0, 1fr) auto;
align-items: center;
gap: 10px;
padding: 12px;
border: 1px solid #e2e8f0;
border-radius: 12px;
border-color: #e2e8f0;
background: #f8fafc;
width: 100%;
min-width: 0;
max-width: none;
transition:
transform 220ms var(--ease-out-soft),
box-shadow var(--dur-fast) var(--ease-out-soft),
@@ -747,38 +632,25 @@
}
.totp-code-row.is-dragging {
z-index: 2;
@apply z-[2];
border-color: rgba(37, 99, 235, 0.3);
background: color-mix(in srgb, var(--panel) 88%, white 12%);
box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}
.totp-code-info {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
@apply flex min-w-0 items-center gap-2.5;
}
.totp-drag-btn {
min-width: 24px;
width: 24px;
height: 34px;
padding: 0;
gap: 0;
@apply relative h-[34px] w-6 min-w-6 cursor-grab self-center overflow-visible rounded-[10px] p-0 opacity-[0.82];
color: var(--muted);
cursor: grab;
align-self: center;
touch-action: none;
-webkit-user-select: none;
user-select: none;
border-color: transparent;
background: transparent;
box-shadow: none;
border-radius: 10px;
position: relative;
overflow: visible;
opacity: 0.82;
}
.totp-drag-btn:hover {
@@ -798,109 +670,76 @@
.totp-drag-btn::before {
content: '';
position: absolute;
inset: -10px;
border-radius: 12px;
@apply absolute -inset-2.5 rounded-xl;
}
.totp-drag-btn .btn-icon {
opacity: 0.9;
@apply opacity-90;
}
.totp-code-main {
display: flex;
align-items: center;
gap: 6px;
min-width: 0;
flex-shrink: 0;
@apply flex min-w-0 shrink-0 items-center gap-1.5;
}
.totp-code-main strong {
font-size: 22px;
line-height: 1;
@apply whitespace-nowrap text-[22px] leading-none;
letter-spacing: 0.04em;
white-space: nowrap;
}
.totp-code-meta {
min-width: 0;
@apply min-w-0;
}
.totp-code-name,
.totp-code-username {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@apply overflow-hidden text-ellipsis whitespace-nowrap;
}
.totp-code-name {
font-size: 15px;
font-weight: 700;
@apply text-[15px] font-bold;
color: #0f172a;
}
.totp-code-username {
margin-top: 2px;
font-size: 13px;
@apply mt-0.5 text-[13px];
color: #64748b;
}
.totp-copy-btn {
min-width: 28px;
width: 28px;
height: 28px;
padding: 0;
border-radius: 999px;
flex-shrink: 0;
gap: 0;
@apply h-7 w-7 min-w-7 shrink-0 gap-0 rounded-full p-0;
}
.value-ellipsis {
display: block;
max-width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@apply block max-w-full overflow-hidden text-ellipsis whitespace-nowrap;
}
.kv-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 8px;
flex-wrap: wrap;
flex-shrink: 0;
@apply flex shrink-0 flex-wrap items-center justify-end gap-2;
}
.attachment-list {
display: grid;
gap: 0;
@apply grid gap-0;
}
.attachment-head {
margin-bottom: 8px;
@apply mb-2;
}
.attachment-head h4 {
margin-bottom: 0;
@apply mb-0;
}
.attachment-add-btn {
min-width: 32px;
padding: 0 8px;
@apply min-w-8 px-2 py-0;
}
.attachment-file-input {
display: none;
@apply hidden;
}
.attachment-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
@apply flex items-center justify-between gap-2.5 py-2.5;
border-bottom: 1px solid #ecf0f5;
padding: 10px 0;
}
.attachment-row:last-child {
@@ -908,25 +747,20 @@
}
.attachment-main {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
@apply flex min-w-0 items-center gap-2;
}
.attachment-text {
min-width: 0;
display: grid;
gap: 2px;
@apply grid min-w-0 gap-0.5;
}
.attachment-text span {
@apply text-xs;
color: #64748b;
font-size: 12px;
}
.attachment-row.is-removed {
opacity: 0.6;
@apply opacity-60;
}
.attachment-row.is-removed .attachment-text strong {
@@ -934,20 +768,16 @@
}
.attachment-queue-title {
font-size: 12px;
@apply px-0 pb-0.5 pt-2 text-xs font-bold;
color: #64748b;
font-weight: 700;
padding: 8px 0 2px;
}
.boolean-text {
min-width: 0;
@apply min-w-0;
}
.custom-field-card {
display: grid;
gap: 8px;
padding: 10px 0;
@apply grid gap-2 py-2.5;
border-bottom: 1px solid #ecf0f5;
}
@@ -957,59 +787,44 @@
}
.custom-field-label {
display: block;
@apply block overflow-hidden text-ellipsis whitespace-nowrap text-xs font-bold leading-[1.2];
color: #64748b;
font-size: 12px;
font-weight: 700;
line-height: 1.2;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.custom-field-body {
display: grid;
@apply grid items-center gap-2.5;
grid-template-columns: minmax(0, 1fr) auto;
gap: 10px;
align-items: center;
}
.custom-field-value {
min-width: 0;
@apply min-w-0;
}
.custom-field-value > .input {
width: 100%;
@apply w-full;
}
.custom-field-check {
margin-bottom: 0;
display: inline-flex;
align-items: center;
gap: 8px;
@apply mb-0 inline-flex items-center gap-2;
}
.custom-field-check span {
@apply text-sm font-semibold;
color: #334155;
font-size: 14px;
font-weight: 600;
}
.custom-field-remove {
white-space: nowrap;
@apply whitespace-nowrap;
}
.notes {
white-space: pre-wrap;
@apply min-h-12 whitespace-pre-wrap;
overflow-wrap: anywhere;
word-break: break-word;
color: #334155;
min-height: 48px;
}
.empty {
@apply grid min-h-[120px] place-items-center;
color: #667085;
display: grid;
place-items: center;
min-height: 120px;
}