Major rebranding, i18n, dashboard, shared folders, role capabilities
- Rebrand: new app/agent icons, SKALD.md, warm "paper" CSS palette (terracotta accent, --radius tokens, WCAG contrast, reduced-motion), updated favicon, tray icon, skaldkonur asset - i18n: backend crate (i18n.rs, locale column, ui_locale config), frontend library (web/lib/i18n.js, I18nMixin, t(key)), translation files (web/i18n/), every component wired - Dashboard: <dashboard-page> replaces old home-page content; <app-copilot> becomes the landing page (full/dock layout modes) - Shared folders: API endpoints (shared_folders.rs), frontend page, can_write membership, container mount topology, user_fs routing - Role capabilities: new db table & authorization seam (data not enums), roles.attrs JSON for ui_mode / interface select - Setup: skald-setup prompts for language + password, sets ui_locale - General: components migrated to CSS variables, Lit conventions cleanup, connectors/catalog/marketplace/approval refactoring
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { t } from '../../lib/i18n.js';
|
||||
|
||||
// Shared vocabulary for the Connectors list and a connector's own page.
|
||||
//
|
||||
// Both surfaces have to answer "what state is this connector in?" and both draw the
|
||||
@@ -13,14 +15,25 @@ export function connectorIconUrl(name, size = 'sm') {
|
||||
/// How each status reads on a chip. `tone` maps to the `connector-chip--*` accents
|
||||
/// in `web/css/connectors.css`.
|
||||
export const STATUS_LABEL = {
|
||||
active: { text: 'active', tone: 'ok' },
|
||||
pending: { text: 'needs fix', tone: 'script' },
|
||||
needs_login: { text: 'needs sign-in', tone: 'script' },
|
||||
enabled: { text: 'enabled', tone: 'scope' },
|
||||
off: { text: 'off', tone: '' },
|
||||
available: { text: 'available', tone: '' },
|
||||
active: { tone: 'ok' },
|
||||
pending: { tone: 'script' },
|
||||
needs_login: { tone: 'script' },
|
||||
enabled: { tone: 'scope' },
|
||||
off: { tone: '' },
|
||||
available: { tone: '' },
|
||||
};
|
||||
|
||||
export function statusText(status) {
|
||||
return {
|
||||
active: t('connectors.status.active'),
|
||||
pending: t('connectors.status.needs_fix'),
|
||||
needs_login: t('connectors.status.needs_signin'),
|
||||
enabled: t('connectors.status.enabled'),
|
||||
off: t('connectors.status.off'),
|
||||
available: t('connectors.status.available'),
|
||||
}[status] ?? status;
|
||||
}
|
||||
|
||||
/// The one place that decides what a connector's state *is*, from whichever runtime
|
||||
/// rows exist for it.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user