diff --git a/services/src/db/database.ts b/services/src/db/database.ts index d5499c17..a5bf1b7a 100644 --- a/services/src/db/database.ts +++ b/services/src/db/database.ts @@ -1,4 +1,4 @@ -import type { DB } from 'kysely-codegen' // this is the Database interface we defined earlier +import type { DB } from 'kysely-codegen' import SQLite from 'better-sqlite3' import { Kysely, SqliteDialect } from 'kysely' import 'better-sqlite3' diff --git a/src/components/container/translations/TranslationsKeyTable.svelte b/src/components/container/translations/TranslationsKeyTable.svelte new file mode 100644 index 00000000..ba4679ec --- /dev/null +++ b/src/components/container/translations/TranslationsKeyTable.svelte @@ -0,0 +1,91 @@ + + + + + + {#each translationData as keyValue} + + +
+ {keyValue.key} + +
+
+
+ + {#each keyValue.translations as translation} + + {translation.langCode} + +
+ + {#if translation.isDefault} + Default + {/if} + {#if !translation.text} + + {/if} +
+
+
+ {/each} + {/each} +
diff --git a/src/components/copy/CopyClipboard.svelte b/src/components/copy/CopyClipboard.svelte new file mode 100644 index 00000000..9f967f81 --- /dev/null +++ b/src/components/copy/CopyClipboard.svelte @@ -0,0 +1,25 @@ + + +
+ +
diff --git a/src/components/search-input/SearchInput.svelte b/src/components/search-input/SearchInput.svelte new file mode 100644 index 00000000..4942ed3f --- /dev/null +++ b/src/components/search-input/SearchInput.svelte @@ -0,0 +1,11 @@ + + +
+ + +
diff --git a/src/components/ui/badge/badge.svelte b/src/components/ui/badge/badge.svelte new file mode 100644 index 00000000..0a96b6ed --- /dev/null +++ b/src/components/ui/badge/badge.svelte @@ -0,0 +1,18 @@ + + + + + diff --git a/src/components/ui/badge/index.ts b/src/components/ui/badge/index.ts new file mode 100644 index 00000000..f7e14db9 --- /dev/null +++ b/src/components/ui/badge/index.ts @@ -0,0 +1,21 @@ +import { type VariantProps, tv } from 'tailwind-variants' + +export { default as Badge } from './badge.svelte' + +export const badgeVariants = tv({ + base: 'focus:ring-ring inline-flex select-none items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2', + variants: { + variant: { + default: 'bg-primary text-primary-foreground hover:bg-primary/80 border-transparent', + secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent', + destructive: + 'bg-destructive text-destructive-foreground hover:bg-destructive/80 border-transparent', + outline: 'text-foreground' + } + }, + defaultVariants: { + variant: 'default' + } +}) + +export type Variant = VariantProps['variant'] diff --git a/src/routes/(authenticated)/projects/[slug]/keys/+page.svelte b/src/routes/(authenticated)/projects/[slug]/keys/+page.svelte index 0bdfd492..f4ef554b 100644 --- a/src/routes/(authenticated)/projects/[slug]/keys/+page.svelte +++ b/src/routes/(authenticated)/projects/[slug]/keys/+page.svelte @@ -1 +1,12 @@ -keys + + + + {pageTitle(data.project.name, 'Keys')} + + +This page will display all keys. It will also give the option to add or delete keys. diff --git a/src/routes/(authenticated)/projects/[slug]/languages/+page.svelte b/src/routes/(authenticated)/projects/[slug]/languages/+page.svelte index 72cab76f..524fd364 100644 --- a/src/routes/(authenticated)/projects/[slug]/languages/+page.svelte +++ b/src/routes/(authenticated)/projects/[slug]/languages/+page.svelte @@ -12,6 +12,7 @@ import LanguageTable from '$components/container/language/LanguageTable.svelte' import { Button } from '$components/ui/button' import { Check, Plus } from 'lucide-svelte' + import { pageTitle } from '$lib/utils/page-title' export let data: PageData @@ -58,6 +59,10 @@ } + + {pageTitle(data.project.name, 'Languages')} + +
diff --git a/src/routes/(authenticated)/projects/[slug]/translations/+page.svelte b/src/routes/(authenticated)/projects/[slug]/translations/+page.svelte index a9d988f7..ba654249 100644 --- a/src/routes/(authenticated)/projects/[slug]/translations/+page.svelte +++ b/src/routes/(authenticated)/projects/[slug]/translations/+page.svelte @@ -1 +1,25 @@ -Translation + + + + {pageTitle(data.project.name, 'Translations')} + + + + + +
+ +
+ +
+ +
+