diff --git a/src/routes/graphs.svelte b/src/routes/graphs.svelte new file mode 100644 index 0000000..330c37b --- /dev/null +++ b/src/routes/graphs.svelte @@ -0,0 +1,5 @@ + + + diff --git a/src/routes/index.svelte b/src/routes/index.svelte index e69de29..cc9bcdd 100644 --- a/src/routes/index.svelte +++ b/src/routes/index.svelte @@ -0,0 +1,71 @@ + + + + Skyblock Data Tracker + + +
+ {#await profilesPromise} +
+

Fetching profiles...

+
+ {:then profiles} + {#each profiles as profile} + + {/each} + + + {:catch error} +
+

{error.message}

+
+ {/await} +
+ + diff --git a/src/routes/login.svelte b/src/routes/login.svelte new file mode 100644 index 0000000..964f8fa --- /dev/null +++ b/src/routes/login.svelte @@ -0,0 +1,60 @@ + + + + Login - Skyblock Data Tracker + + +
+
{ + event.preventDefault(); + try { + login.set(await postLogin({ username, password })); + } catch (e) { + username = ""; + password = ""; + try { + status = (await e.response.json()).message; + } catch (e2) { + status = "Unknown error"; + } + } + }} + > +

Login

+

{status}

+
+
+ +
+
+ + diff --git a/src/routes/profile/[profile]/member/[member].svelte b/src/routes/profile/[profile]/member/[member].svelte new file mode 100644 index 0000000..62c210e --- /dev/null +++ b/src/routes/profile/[profile]/member/[member].svelte @@ -0,0 +1,15 @@ + + + diff --git a/src/routes/profile/new.svelte b/src/routes/profile/new.svelte new file mode 100644 index 0000000..d40430e --- /dev/null +++ b/src/routes/profile/new.svelte @@ -0,0 +1,122 @@ + + + + Add Profile - Skyblock Data Tracker + + +
+
{ + event.preventDefault(); + try { + profilesPromise = getPlayerProfiles( + (uuid = await getUUID(username)) + ); + } catch (error) { + status = "Not found"; + } + }} + > +

Add profile

+

{status}

+ + +
+ {#if uuid !== ""} + {#await profilesPromise} +
+

Fetching profiles...

+
+ {:then profiles} + {#each profiles as profile} + + {/each} + {:catch error} +
+

{error.message}

+
+ {/await} + {/if} +
+ +