mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 13:06:43 +02:00
fix: extract types from .svelte files for proper named re-exports
Svelte 5 .svelte modules only expose a default export, so 'export type { X } from "./X.svelte"' fails type-check. Move shared interfaces into adjacent .ts type files.
- shared-ui/navigation: SpotlightAction, ContentSearcher, ContentSearch{Result,Group} → types.ts
- shared-auth-ui: PasskeyManagerTranslations, TwoFactorSetupTranslations, SessionManagerTranslations → types.ts
- mana/web/page-carousel: CarouselPage → new types.ts
- mana/web: bump @vitest/* to 4.1.2 (matches lockfile)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
fc743a494b
commit
440f6507f1
12 changed files with 143 additions and 135 deletions
|
|
@ -1,31 +1,5 @@
|
|||
<script lang="ts">
|
||||
/** Translation strings for the PasskeyManager */
|
||||
export interface PasskeyManagerTranslations {
|
||||
title: string;
|
||||
noPasskeys: string;
|
||||
registerButton: string;
|
||||
renameButton: string;
|
||||
deleteButton: string;
|
||||
cancelButton: string;
|
||||
saveButton: string;
|
||||
confirmDeleteTitle: string;
|
||||
confirmDeleteMessage: string;
|
||||
created: string;
|
||||
lastUsed: string;
|
||||
never: string;
|
||||
backedUp: string;
|
||||
notBackedUp: string;
|
||||
browserNotSupported: string;
|
||||
registerNamePlaceholder: string;
|
||||
registerNameLabel: string;
|
||||
registerTitle: string;
|
||||
renamePlaceholder: string;
|
||||
errorGeneric: string;
|
||||
daysAgo: (days: number) => string;
|
||||
hoursAgo: (hours: number) => string;
|
||||
minutesAgo: (minutes: number) => string;
|
||||
justNow: string;
|
||||
}
|
||||
import type { PasskeyManagerTranslations } from '../types';
|
||||
|
||||
interface Passkey {
|
||||
id: string;
|
||||
|
|
|
|||
|
|
@ -1,26 +1,6 @@
|
|||
<script lang="ts">
|
||||
import { parseUserAgent, getDeviceType } from '../utils/userAgent';
|
||||
|
||||
export interface SessionManagerTranslations {
|
||||
title?: string;
|
||||
subtitle?: string;
|
||||
current?: string;
|
||||
revoke?: string;
|
||||
revokeAll?: string;
|
||||
lastActivity?: string;
|
||||
confirmRevoke?: string;
|
||||
confirmRevokeAll?: string;
|
||||
noSessions?: string;
|
||||
unknown?: string;
|
||||
refresh?: string;
|
||||
revokeError?: string;
|
||||
revokeAllError?: string;
|
||||
justNow?: string;
|
||||
minutesAgo?: string;
|
||||
hoursAgo?: string;
|
||||
yesterday?: string;
|
||||
daysAgo?: string;
|
||||
}
|
||||
import type { SessionManagerTranslations } from '../types';
|
||||
|
||||
interface Session {
|
||||
id: string;
|
||||
|
|
|
|||
|
|
@ -1,32 +1,6 @@
|
|||
<script lang="ts">
|
||||
import QRCode from 'qrcode';
|
||||
import type { AuthResult } from '../types';
|
||||
|
||||
export interface TwoFactorSetupTranslations {
|
||||
title: string;
|
||||
statusEnabled: string;
|
||||
statusDisabled: string;
|
||||
enableButton: string;
|
||||
disableButton: string;
|
||||
regenerateButton: string;
|
||||
passwordLabel: string;
|
||||
passwordPlaceholder: string;
|
||||
confirmButton: string;
|
||||
cancelButton: string;
|
||||
setupTitle: string;
|
||||
setupStep1: string;
|
||||
setupStep2: string;
|
||||
manualEntryLabel: string;
|
||||
copyButton: string;
|
||||
copiedButton: string;
|
||||
doneButton: string;
|
||||
disableConfirmTitle: string;
|
||||
disableConfirmText: string;
|
||||
backupCodesTitle: string;
|
||||
backupCodesWarning: string;
|
||||
copyCodesButton: string;
|
||||
copiedCodesButton: string;
|
||||
}
|
||||
import type { AuthResult, TwoFactorSetupTranslations } from '../types';
|
||||
|
||||
const defaultTranslations: TwoFactorSetupTranslations = {
|
||||
title: 'Zwei-Faktor-Authentifizierung',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue