diff --git a/ui/src/App.svelte b/ui/src/App.svelte
index 442e667..b5533ce 100644
--- a/ui/src/App.svelte
+++ b/ui/src/App.svelte
@@ -4,7 +4,6 @@
import { pipe } from 'fp-ts/lib/function';
import { onDestroy } from 'svelte';
import DownloadCard from './lib/DownloadCard.svelte';
- import FloatingAction from './lib/FloatingAction.svelte';
import Footer from './lib/Footer.svelte';
import Navbar from './lib/Navbar.svelte';
import Spinner from './lib/Spinner.svelte';
@@ -58,7 +57,7 @@
{/each}
{/if}
-
+
diff --git a/ui/src/lib/Footer.svelte b/ui/src/lib/Footer.svelte
index 20a6bf5..8f4c7ad 100644
--- a/ui/src/lib/Footer.svelte
+++ b/ui/src/lib/Footer.svelte
@@ -11,7 +11,7 @@
});
const minHeight = 52;
- const maxHeight = 600;
+ const maxHeight = window.innerHeight - 60;
let open = false;
$: open = $height > minHeight;
diff --git a/ui/src/lib/NewDownload.svelte b/ui/src/lib/NewDownload.svelte
index f540d67..93ea4ec 100644
--- a/ui/src/lib/NewDownload.svelte
+++ b/ui/src/lib/NewDownload.svelte
@@ -2,11 +2,13 @@
import { get } from 'svelte/store';
import Button from './Button.svelte';
import TextField from './TextField.svelte';
- import { rpcClient } from './store';
+ import { downloadTemplates, rpcClient } from './store';
let url: string = '';
let args: string = '';
+ $: console.log(args);
+
const download = () =>
get(rpcClient).download({
url,
@@ -14,8 +16,15 @@
});
-
-
-
+
+
+
+
+
+
diff --git a/ui/src/lib/TextField.svelte b/ui/src/lib/TextField.svelte
index 95734f9..8d8cdaf 100644
--- a/ui/src/lib/TextField.svelte
+++ b/ui/src/lib/TextField.svelte
@@ -1,14 +1,19 @@
diff --git a/ui/src/lib/store.ts b/ui/src/lib/store.ts
index 07ffa92..1352f86 100644
--- a/ui/src/lib/store.ts
+++ b/ui/src/lib/store.ts
@@ -1,7 +1,7 @@
import * as O from 'fp-ts/lib/Option'
-import { derived, writable } from 'svelte/store'
+import { derived, readable, writable } from 'svelte/store'
import { RPCClient } from './RPCClient'
-import type { RPCResult } from './types'
+import { type CustomTemplate, type RPCResult } from './types'
export const rpcHost = writable
(localStorage.getItem('rpcHost') ?? 'localhost')
export const rpcPort = writable(Number(localStorage.getItem('rpcPort')) || 3033)
@@ -44,4 +44,14 @@ export const rpcClient = derived(
*/
export const downloads = writable>(O.none)
-export const cookiesTemplate = writable('')
\ No newline at end of file
+export const cookiesTemplate = writable('')
+
+/**
+ * fetches download templates, needs manual update
+ */
+export const downloadTemplates = readable([], (set) => {
+ serverApiEndpoint
+ .subscribe(ep => fetch(`${ep}/api/v1/template/all`)
+ .then(res => res.json())
+ .then(data => set(data)))
+})
\ No newline at end of file