aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--src/routes/__layout.svelte18
2 files changed, 11 insertions, 9 deletions
diff --git a/README.md b/README.md
index 19e66469..c181376a 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,7 @@ This repository is the latest front-end code for the CoinOS web application.
## Commands
To get started, clone or download the repo, then:
+
- run `pnpm install` inside the repo once to install all dependencies (and whenever you pull new commits)
- run `pnpm run dev` every time you want to start up the UI
- run `pnpm format` to format the code before committing any changes
@@ -16,6 +17,7 @@ To get started, clone or download the repo, then:
## Libraries
This UI uses the following libraries:
+
- [`sveltekit`](https://kit.svelte.dev/) as the JavaScript framework
- [`tailwindcss`](https://tailwindcss.com/) for inline styling
- [`pnpm`](https://pnpm.io/) as the recommended package manager
diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte
index 8ac6f20f..316bf6b3 100644
--- a/src/routes/__layout.svelte
+++ b/src/routes/__layout.svelte
@@ -1,8 +1,8 @@
<script>
import { SvelteToast } from '@zerodevx/svelte-toast';
- import '$lib/i18n';
- import { isLoading, locale } from 'svelte-i18n';
- import '../app.css';
+ import '$lib/i18n';
+ import { isLoading, locale } from 'svelte-i18n';
+ import '../app.css';
import { onMount } from 'svelte';
import { connect } from '$lib/socket';
import { user, token } from '$lib/store';
@@ -17,13 +17,13 @@
let ready = false;
onMount(() => {
- // get locale from local storage
- let localStorageLocale = localStorage.getItem('svelte-i18n-locale');
- if (localStorageLocale) locale.set(localStorageLocale);
+ // get locale from local storage
+ let localStorageLocale = localStorage.getItem('svelte-i18n-locale');
+ if (localStorageLocale) locale.set(localStorageLocale);
- locale.subscribe((lng) => {
- if (lng) localStorage.setItem('svelte-i18n-locale', lng);
- });
+ locale.subscribe((lng) => {
+ if (lng) localStorage.setItem('svelte-i18n-locale', lng);
+ });
if (protectedRoutes.find((p) => $page.url.pathname.match(p))) {
if (!$token) {