Convert multiple pages into SPA
This commit is contained in:
1 parent
c616b2da7f
commit
06d04a1abc
110 files changed
+1245
-1319
No files matched your search
@@ -1,9 +1,7 @@
|
||||
<script>
|
||||
import { loading_finish, loading_start } from "lib/Loading";
|
||||
import { onMount } from "svelte";
|
||||
import { formatDate } from "util/Formatting";
|
||||
import LoadingIndicator from "util/LoadingIndicator.svelte";
|
||||
|
||||
let loading = false
|
||||
|
||||
let year = 0
|
||||
let month = 0
|
||||
@@ -11,7 +9,7 @@ let month_str = ""
|
||||
let data = []
|
||||
|
||||
const load_activity = async () => {
|
||||
loading = true
|
||||
loading_start()
|
||||
month_str = year + "-" + ("00"+(month)).slice(-2)
|
||||
try {
|
||||
const resp = await fetch(window.api_endpoint+"/user/activity/" + month_str)
|
||||
@@ -29,7 +27,7 @@ const load_activity = async () => {
|
||||
} catch (err) {
|
||||
alert(err)
|
||||
} finally {
|
||||
loading = false
|
||||
loading_finish()
|
||||
}
|
||||
};
|
||||
const last_month = () => {
|
||||
@@ -59,8 +57,6 @@ onMount(() => {
|
||||
})
|
||||
</script>
|
||||
|
||||
<LoadingIndicator loading={loading}/>
|
||||
|
||||
<section>
|
||||
<h2>Account activity log</h2>
|
||||
<p>
|
||||
|
||||
Reference in new issue
Block a user