about summary refs log tree commit diff
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/global.d.ts3
-rw-r--r--client/src/globals.d.ts39
-rw-r--r--client/src/lib/actions/shorten.ts (renamed from client/src/actions/shorten.ts)0
-rw-r--r--client/src/lib/components/Form.svelte (renamed from client/src/components/Form.svelte)8
-rw-r--r--client/src/lib/components/Response.svelte (renamed from client/src/components/Response.svelte)2
-rw-r--r--client/src/lib/components/Responses.svelte (renamed from client/src/components/Responses.svelte)2
-rw-r--r--client/src/lib/components/Title.svelte (renamed from client/src/components/Title.svelte)0
-rw-r--r--client/src/lib/components/icons/ArrowIcon.svelte (renamed from client/src/components/icons/ArrowIcon.svelte)0
-rw-r--r--client/src/lib/components/icons/CrossIcon.svelte (renamed from client/src/components/icons/CrossIcon.svelte)0
-rw-r--r--client/src/lib/data/links.ts (renamed from client/src/data/links.ts)5
-rw-r--r--client/src/lib/utils/addProtocol.ts (renamed from client/src/utils/addProtocol.ts)0
-rw-r--r--client/src/lib/utils/checkUrl.ts (renamed from client/src/utils/checkUrl.ts)0
-rw-r--r--client/src/lib/utils/debounce.ts (renamed from client/src/utils/debounce.ts)0
-rw-r--r--client/src/routes/index.svelte66
14 files changed, 45 insertions, 80 deletions
diff --git a/client/src/global.d.ts b/client/src/global.d.ts
new file mode 100644
index 0000000..79d7d7f
--- /dev/null
+++ b/client/src/global.d.ts
@@ -0,0 +1,3 @@
+/// <reference types="@sveltejs/kit" />
+/// <reference types="svelte" />
+/// <reference types="vite/client" />
diff --git a/client/src/globals.d.ts b/client/src/globals.d.ts
deleted file mode 100644
index 06d88b7..0000000
--- a/client/src/globals.d.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/// <reference types="@sveltejs/kit" />
-
-//#region Ensure Svelte file endings have a type for TypeScript
-declare module '*.svelte' {
-	export { SvelteComponent as default } from 'svelte';
-}
-//#endregion
-
-//#region Ensure image file endings have a type for TypeScript
-declare module "*.gif" {
-	const value: string;
-	export = value;
-}
-
-declare module "*.jpg" {
-	const value: string;
-	export = value;
-}
-
-declare module "*.jpeg" {
-	const value: string;
-	export = value;
-}
-
-declare module "*.png" {
-	const value: string;
-	export = value;
-}
-
-declare module "*.svg" {
-	const value: string;
-	export = value;
-}
-
-declare module "*.webp" {
-	const value: string;
-	export = value;
-}
-//#endregion
diff --git a/client/src/actions/shorten.ts b/client/src/lib/actions/shorten.ts
index ca685c5..ca685c5 100644
--- a/client/src/actions/shorten.ts
+++ b/client/src/lib/actions/shorten.ts
diff --git a/client/src/components/Form.svelte b/client/src/lib/components/Form.svelte
index 327d25d..a05e868 100644
--- a/client/src/components/Form.svelte
+++ b/client/src/lib/components/Form.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
-    import shorten from "$actions/shorten";
-    import { links } from "$data/links";
-    import checkUrl from "$utils/checkUrl";
-    import debounce from "$utils/debounce";
+    import shorten from "$lib/actions/shorten";
+    import { links } from "$lib/data/links";
+    import checkUrl from "$lib/utils/checkUrl";
+    import debounce from "$lib/utils/debounce";
     import ArrowIcon from "./icons/ArrowIcon.svelte";
     import CrossIcon from "./icons/CrossIcon.svelte";
 
diff --git a/client/src/components/Response.svelte b/client/src/lib/components/Response.svelte
index 215af1b..0ed8cc9 100644
--- a/client/src/components/Response.svelte
+++ b/client/src/lib/components/Response.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-    import type { ShortenRequest } from "$actions/shorten";
+    import type { ShortenRequest } from "$lib/actions/shorten";
 
     export let info: ShortenRequest;
 </script>
diff --git a/client/src/components/Responses.svelte b/client/src/lib/components/Responses.svelte
index 7124f1e..6e83658 100644
--- a/client/src/components/Responses.svelte
+++ b/client/src/lib/components/Responses.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
     import Response from "./Response.svelte"
     import { slide } from 'svelte/transition';
-    import { links } from "$data/links";
+    import { links } from "$lib/data/links";
 </script>
 
 <style>
diff --git a/client/src/components/Title.svelte b/client/src/lib/components/Title.svelte
index 4266eb1..4266eb1 100644
--- a/client/src/components/Title.svelte
+++ b/client/src/lib/components/Title.svelte
diff --git a/client/src/components/icons/ArrowIcon.svelte b/client/src/lib/components/icons/ArrowIcon.svelte
index 52c79ae..52c79ae 100644
--- a/client/src/components/icons/ArrowIcon.svelte
+++ b/client/src/lib/components/icons/ArrowIcon.svelte
diff --git a/client/src/components/icons/CrossIcon.svelte b/client/src/lib/components/icons/CrossIcon.svelte
index 55525d8..55525d8 100644
--- a/client/src/components/icons/CrossIcon.svelte
+++ b/client/src/lib/components/icons/CrossIcon.svelte
diff --git a/client/src/data/links.ts b/client/src/lib/data/links.ts
index 3ccf100..0f0a9ce 100644
--- a/client/src/data/links.ts
+++ b/client/src/lib/data/links.ts
@@ -1,5 +1,6 @@
-import type { ShortenRequest } from "$actions/shorten";
-import { Writable, writable } from "svelte/store";
+import type { ShortenRequest } from "$lib/actions/shorten";
+import type { Writable } from "svelte/store";
+import { writable } from "svelte/store";
 
 function createLinks() {
     const { subscribe, update }: Writable<ShortenRequest[]> = writable([]);
diff --git a/client/src/utils/addProtocol.ts b/client/src/lib/utils/addProtocol.ts
index 75c6214..75c6214 100644
--- a/client/src/utils/addProtocol.ts
+++ b/client/src/lib/utils/addProtocol.ts
diff --git a/client/src/utils/checkUrl.ts b/client/src/lib/utils/checkUrl.ts
index 8ed747f..8ed747f 100644
--- a/client/src/utils/checkUrl.ts
+++ b/client/src/lib/utils/checkUrl.ts
diff --git a/client/src/utils/debounce.ts b/client/src/lib/utils/debounce.ts
index 86ef3db..86ef3db 100644
--- a/client/src/utils/debounce.ts
+++ b/client/src/lib/utils/debounce.ts
diff --git a/client/src/routes/index.svelte b/client/src/routes/index.svelte
index 5e51f13..965d169 100644
--- a/client/src/routes/index.svelte
+++ b/client/src/routes/index.svelte
@@ -1,44 +1,44 @@
 <script lang="ts">
-	import Title from '$components/Title.svelte';
-	import Form from '$components/Form.svelte';
-	import Responses from '$components/Responses.svelte';
+    import Title from '$lib/components/Title.svelte';
+    import Form from '$lib/components/Form.svelte';
+    import Responses from '$lib/components/Responses.svelte';
 </script>
 
 <style>
-	main {
-		width: 100%;
-		height: 100%;
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-		overflow: hidden;
-	}
+    main {
+        width: 100%;
+        height: 100%;
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+        align-items: center;
+        overflow: hidden;
+    }
 
-	.output {
-		position: absolute;
-		top: 175px;
-		width: 100%;
-	}
+    .output {
+        position: absolute;
+        top: 175px;
+        width: 100%;
+    }
 
-	.content {
-		position: relative;
-		width: 80%;
-	}
+    .content {
+        position: relative;
+        width: 80%;
+    }
 
-	@media (min-width: 800px) {
-		.content {
-			width: 40%;
-		}
-	}
+    @media (min-width: 800px) {
+        .content {
+            width: 40%;
+        }
+    }
 </style>
 
 <main>
-	<div class="content">
-		<Title/>
-		<Form/>
-		<div class="output">
-			<Responses/>
-		</div>
-	</div>
+    <div class="content">
+        <Title/>
+        <Form/>
+        <div class="output">
+            <Responses/>
+        </div>
+    </div>
 </main>
\ No newline at end of file