From 67d29dab2e8a0ae6b40999b5fb7c547a29204459 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 2 May 2021 12:31:32 +0200 Subject: [PATCH] cleanup --- client/src/lib/api.ts | 3 ++- client/src/lib/{ => views}/Create.svelte | 8 ++++---- client/src/lib/{ => views}/Header/Logo.svg | 0 client/src/lib/{ => views}/Header/index.svelte | 0 client/src/routes/$layout.svelte | 2 +- client/src/routes/about.svelte | 10 ++++++++++ client/src/routes/index.svelte | 4 ++-- 7 files changed, 19 insertions(+), 8 deletions(-) rename client/src/lib/{ => views}/Create.svelte (93%) rename client/src/lib/{ => views}/Header/Logo.svg (100%) rename client/src/lib/{ => views}/Header/index.svelte (100%) diff --git a/client/src/lib/api.ts b/client/src/lib/api.ts index 855c2ad..fa61aca 100644 --- a/client/src/lib/api.ts +++ b/client/src/lib/api.ts @@ -1,6 +1,7 @@ import axios from 'axios' +import { dev } from '$app/env' -const base = axios.create({ baseURL: 'http://localhost:5000' }) +const base = axios.create({ baseURL: dev ? 'http://localhost:5000' : undefined }) export type Note = { contents: string diff --git a/client/src/lib/Create.svelte b/client/src/lib/views/Create.svelte similarity index 93% rename from client/src/lib/Create.svelte rename to client/src/lib/views/Create.svelte index 4552ff1..39b1f4b 100644 --- a/client/src/lib/Create.svelte +++ b/client/src/lib/views/Create.svelte @@ -3,10 +3,10 @@ import { create } from '$lib/api' import { getKeyFromString, encrypt } from '$lib/crypto' - import Button from './ui/Button.svelte' - import Switch from './ui/Switch.svelte' - import TextArea from './ui/TextArea.svelte' - import TextInput from './ui/TextInput.svelte' + import Button from '$lib/ui/Button.svelte' + import Switch from '$lib/ui/Switch.svelte' + import TextArea from '$lib/ui/TextArea.svelte' + import TextInput from '$lib/ui/TextInput.svelte' let note: Note = { contents: 'secret', diff --git a/client/src/lib/Header/Logo.svg b/client/src/lib/views/Header/Logo.svg similarity index 100% rename from client/src/lib/Header/Logo.svg rename to client/src/lib/views/Header/Logo.svg diff --git a/client/src/lib/Header/index.svelte b/client/src/lib/views/Header/index.svelte similarity index 100% rename from client/src/lib/Header/index.svelte rename to client/src/lib/views/Header/index.svelte diff --git a/client/src/routes/$layout.svelte b/client/src/routes/$layout.svelte index 94b2ab6..cd64f70 100644 --- a/client/src/routes/$layout.svelte +++ b/client/src/routes/$layout.svelte @@ -1,6 +1,6 @@ diff --git a/client/src/routes/about.svelte b/client/src/routes/about.svelte index e0342c2..eccae73 100644 --- a/client/src/routes/about.svelte +++ b/client/src/routes/about.svelte @@ -39,6 +39,16 @@ you are welcomed to check & audit the source code.

+ +

+
+ ▶ attributions +
+ + icons made by freepik from + www.flaticon.com + +