diff options
| author | secondl1ght <[email protected]> | 2022-08-16 15:11:18 -0600 |
|---|---|---|
| committer | secondl1ght <[email protected]> | 2022-08-16 15:11:18 -0600 |
| commit | 0b51e1dfd0d099c243d21889fb77fea4769dac0a (patch) | |
| tree | ad493d97fe9a393639119982844e6afd03027c60 | |
| parent | 24dcc88f8f42efa4976dd17a6ebf08ae00a016ab (diff) | |
| download | coinos-ui-0b51e1dfd0d099c243d21889fb77fea4769dac0a.tar.gz coinos-ui-0b51e1dfd0d099c243d21889fb77fea4769dac0a.zip | |
format
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | src/routes/__layout.svelte | 18 |
2 files changed, 11 insertions, 9 deletions
@@ -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) { |
