i18n: localize theme page
This commit is contained in:
1 parent
fe98c0253a
commit
b5657d306b
2 files changed
+29
-14
No files matched your search
+11
-1
@@ -327,6 +327,17 @@
|
|||||||
"resetLogin": {
|
"resetLogin": {
|
||||||
"title": "Reset Password",
|
"title": "Reset Password",
|
||||||
"description": "Enter your account's email, and a password reset link will be sent. If your account does not have an email, contact your instance admins."
|
"description": "Enter your account's email, and a password reset link will be sent. If your account does not have an email, contact your instance admins."
|
||||||
|
},
|
||||||
|
"theme": {
|
||||||
|
"title": "Theme",
|
||||||
|
"import": "Import",
|
||||||
|
"export": "Export",
|
||||||
|
"reset": "Reset",
|
||||||
|
"accent": "Accent",
|
||||||
|
"resetWarning": {
|
||||||
|
"title": "Reset Theme",
|
||||||
|
"description": "This will reset all of your colors to the default. It is recommended to export your theme before this."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cards": {
|
"cards": {
|
||||||
@@ -541,7 +552,6 @@
|
|||||||
"title": "Language",
|
"title": "Language",
|
||||||
"description": "The language used for Photon's UI.",
|
"description": "The language used for Photon's UI.",
|
||||||
"note": "Languages other than English and Hebrew are community translated, and may be incomplete.",
|
"note": "Languages other than English and Hebrew are community translated, and may be incomplete.",
|
||||||
"": "Dont translate the below!",
|
|
||||||
"en": "English",
|
"en": "English",
|
||||||
"en-US": "English",
|
"en-US": "English",
|
||||||
"he": "Hebrew",
|
"he": "Hebrew",
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
} from 'svelte-hero-icons'
|
} from 'svelte-hero-icons'
|
||||||
import ColorSwatch from './ColorSwatch.svelte'
|
import ColorSwatch from './ColorSwatch.svelte'
|
||||||
import { t } from '$lib/translations'
|
import { t } from '$lib/translations'
|
||||||
|
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||||
|
|
||||||
const c = defaultColors
|
const c = defaultColors
|
||||||
|
|
||||||
@@ -44,15 +45,15 @@
|
|||||||
toast({ content: err, type: 'error' })
|
toast({ content: err, type: 'error' })
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
title="Import"
|
title={$t('routes.theme.import')}
|
||||||
action="Import"
|
action={$t('routes.theme.import')}
|
||||||
>
|
>
|
||||||
<TextArea bind:value={importText} style="font-family: monospace;" />
|
<TextArea bind:value={importText} style="font-family: monospace;" />
|
||||||
</Modal>
|
</Modal>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="flex flex-col gap-4 h-full">
|
<div class="flex flex-col gap-4 h-full">
|
||||||
<h1 class="font-bold text-3xl">Theme</h1>
|
<Header>Theme</Header>
|
||||||
<div class="flex items-center gap-4">
|
<div class="flex items-center gap-4">
|
||||||
<Button
|
<Button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
@@ -61,7 +62,7 @@
|
|||||||
size="lg"
|
size="lg"
|
||||||
>
|
>
|
||||||
<Icon src={ArrowUpTray} size="16" mini />
|
<Icon src={ArrowUpTray} size="16" mini />
|
||||||
Import
|
{$t('routes.theme.import')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
@@ -71,37 +72,37 @@
|
|||||||
size="lg"
|
size="lg"
|
||||||
>
|
>
|
||||||
<Icon src={ArrowDownTray} size="16" mini />
|
<Icon src={ArrowDownTray} size="16" mini />
|
||||||
Export
|
{$t('routes.theme.export')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
modal({
|
modal({
|
||||||
actions: [
|
actions: [
|
||||||
action({
|
action({
|
||||||
content: 'Close',
|
content: $t('common.cancel'),
|
||||||
close: true,
|
close: true,
|
||||||
}),
|
}),
|
||||||
action({
|
action({
|
||||||
action: () => {
|
action: () => {
|
||||||
$colors = { other: {}, primary: {}, zinc: {}, slate: {} }
|
$colors = { other: {}, primary: {}, zinc: {}, slate: {} }
|
||||||
},
|
},
|
||||||
content: 'Reset',
|
content: $t('routes.theme.reset'),
|
||||||
close: true,
|
close: true,
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
title: 'Reset Theme',
|
title: $t('routes.theme.resetWarning.title'),
|
||||||
body: 'This will reset all your colors to the default. We recommend exporting your theme first.',
|
body: $t('routes.theme.resetWarning.description'),
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
size="lg"
|
size="lg"
|
||||||
>
|
>
|
||||||
<Icon src={ArrowPath} size="16" mini />
|
<Icon src={ArrowPath} size="16" mini />
|
||||||
Reset
|
{$t('routes.theme.reset')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<Material color="transparent" class="items-center gap-x-4 color-grid gap-y-2">
|
<Material color="transparent" class="items-center gap-x-4 color-grid gap-y-2">
|
||||||
<h1 class="text-2xl font-bold col-span-2">Accent</h1>
|
<h1 class="text-2xl font-bold col-span-2">{$t('routes.theme.accent')}</h1>
|
||||||
<ColorSwatch
|
<ColorSwatch
|
||||||
backgroundColor={defaultColors.primary[900]}
|
backgroundColor={defaultColors.primary[900]}
|
||||||
bind:value={$colors.primary[900]}
|
bind:value={$colors.primary[900]}
|
||||||
@@ -112,8 +113,12 @@
|
|||||||
bind:value={$colors.primary[100]}
|
bind:value={$colors.primary[100]}
|
||||||
class="!w-12 !h-12 col-span-1"
|
class="!w-12 !h-12 col-span-1"
|
||||||
/>
|
/>
|
||||||
<span class="font-semibold text-base">Light</span>
|
<span class="font-semibold text-base">
|
||||||
<span class="font-semibold text-base">Dark</span>
|
{$t('nav.menu.colorscheme.light')}
|
||||||
|
</span>
|
||||||
|
<span class="font-semibold text-base">
|
||||||
|
{$t('nav.menu.colorscheme.dark')}
|
||||||
|
</span>
|
||||||
</Material>
|
</Material>
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-2">
|
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-2">
|
||||||
{#each svelteIntellisenseSucks() as category}
|
{#each svelteIntellisenseSucks() as category}
|
||||||
|
|||||||
Reference in new issue
Block a user