Convert multiple pages into SPA

This commit is contained in:
2025-10-09 15:48:23 +02:00
parent c616b2da7f
commit 06d04a1abc
110 changed files with 1245 additions and 1319 deletions

View File

@@ -1,10 +1,8 @@
<script>
import { onMount } from "svelte";
import { formatDate } from "util/Formatting";
import LoadingIndicator from "util/LoadingIndicator.svelte";
import Button from "layout/Button.svelte";
let loading = false
import { loading_finish, loading_start } from "lib/Loading";
let year = 0
let month = 0
@@ -12,8 +10,8 @@ let month_str = ""
let data = []
const load_activity = async () => {
loading = true
month_str = year + "-" + ("00"+(month)).slice(-2)
loading_start()
try {
const resp = await fetch(window.api_endpoint+"/user/activity/" + month_str)
if(resp.status >= 400) {
@@ -30,7 +28,7 @@ const load_activity = async () => {
} catch (err) {
alert(err)
} finally {
loading = false
loading_finish()
}
};
const last_month = () => {
@@ -60,8 +58,6 @@ onMount(() => {
})
</script>
<LoadingIndicator loading={loading}/>
<div class="toolbar">
<Button click={last_month} icon="chevron_left"/>
<div class="toolbar_spacer">