mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-22 11:46:43 +02:00
feat: add i18n localization with language switcher to all web apps
- Add svelte-i18n configuration with SSR support to all web apps - Create LanguageSelector component for each app with brand colors - Add German and English locale files - Integrate language switcher into login pages via headerControls snippet - Fix Tailwind v4 @source directives for shared package scanning - Update AppSlider styling to match login container design Apps updated: - Memoro (gold #f8d62b) - Märchenzauber (pink #FF6B9D) - ManaDeck (purple #8b5cf6) - ManaCore (indigo #6366f1) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
bd869dfe09
commit
926ca231b5
147 changed files with 7090 additions and 2276 deletions
|
|
@ -37,6 +37,24 @@ export function createSupabaseAdminClient(config: SupabaseConfig): SupabaseClien
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Supabase error type
|
||||
*/
|
||||
export interface SupabaseError {
|
||||
message: string;
|
||||
code?: string;
|
||||
details?: string;
|
||||
hint?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Standardized query result type
|
||||
*/
|
||||
export interface QueryResult<T> {
|
||||
data: T | null;
|
||||
error: SupabaseError | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Common database query helpers
|
||||
*/
|
||||
|
|
@ -44,16 +62,15 @@ export const dbHelpers = {
|
|||
/**
|
||||
* Handle Supabase query result and return standardized response
|
||||
*/
|
||||
handleQueryResult<T>(result: { data: T | null; error: any }): {
|
||||
data: T | null;
|
||||
error: { message: string; code?: string } | null;
|
||||
} {
|
||||
handleQueryResult<T>(result: { data: T | null; error: SupabaseError | null }): QueryResult<T> {
|
||||
if (result.error) {
|
||||
return {
|
||||
data: null,
|
||||
error: {
|
||||
message: result.error.message,
|
||||
code: result.error.code,
|
||||
details: result.error.details,
|
||||
hint: result.error.hint,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue