diff --git a/ui/package.json b/ui/package.json index d363be66..9d5856eb 100644 --- a/ui/package.json +++ b/ui/package.json @@ -23,7 +23,8 @@ "test:watch": "npm run test -- --watch", "test:snapshot": "npm test -- -u", "locales": "npx typesafe-i18n --no-watch", - "locales:watch": "typesafe-i18n" + "locales:watch": "typesafe-i18n", + "check": "svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { "compute-scroll-into-view": "^3.1.0", diff --git a/ui/src/App.svelte b/ui/src/App.svelte index e2a93e2b..f558dfff 100644 --- a/ui/src/App.svelte +++ b/ui/src/App.svelte @@ -4,7 +4,7 @@ import '../node_modules/quill/dist/quill.core.css'; import '../node_modules/quill/dist/quill.snow.css'; import Navaid from 'navaid'; - import { onDestroy, onMount } from 'svelte'; + import { onDestroy } from 'svelte'; import { AppConfig, appRoutes } from './config'; import apiclient from './apiclient'; @@ -52,12 +52,12 @@ import AdminSubscription from './pages/admin/Subscription.svelte'; import { setLocale } from './i18n/i18n-svelte'; import { detectLocale } from './i18n/i18n-util'; - import { loadLocaleAsync } from './i18n/i18n-util.async'; import Confirmation from './pages/subscription/Confirmation.svelte'; import Pricing from './pages/subscription/Pricing.svelte'; import PrivacyPolicy from './pages/support/PrivacyPolicy.svelte'; import TermsConditions from './pages/support/TermsConditions.svelte'; import Support from './pages/support/Support.svelte'; + import { loadLocale } from './i18n/i18n-util.sync'; const { FeaturePoker, @@ -73,6 +73,10 @@ activeWarrior = w; }); + const detectedLocale = activeWarrior.locale || detectLocale(); + loadLocale(detectedLocale); + setLocale(detectedLocale); + $: if (document.dir !== $dir) { document.dir = $dir; } @@ -529,12 +533,6 @@ }); } - onMount(async () => { - const detectedLocale = activeWarrior.locale || detectLocale(); - await loadLocaleAsync(detectedLocale); - setLocale(detectedLocale); - }); - onDestroy(router.unlisten); diff --git a/ui/src/app.css b/ui/src/app.css index a9f04084..0bf8edf7 100644 --- a/ui/src/app.css +++ b/ui/src/app.css @@ -3,7 +3,7 @@ @import 'tailwindcss/utilities'; .font-rajdhani { - font-family: 'Rajdhani', sans-serif; + font-family: 'Rajdhani', 'Arial Narrow', sans-serif; } ::-webkit-calendar-picker-indicator { diff --git a/ui/src/components/Editor.svelte b/ui/src/components/Editor.svelte new file mode 100644 index 00000000..97391b8a --- /dev/null +++ b/ui/src/components/Editor.svelte @@ -0,0 +1,22 @@ + + +
diff --git a/ui/src/components/checkin/Checkin.svelte b/ui/src/components/checkin/Checkin.svelte index edf9651f..5fbe434b 100644 --- a/ui/src/components/checkin/Checkin.svelte +++ b/ui/src/components/checkin/Checkin.svelte @@ -1,8 +1,8 @@