diff --git a/app/http/server.go b/app/http/server.go
index 00405d3..17f2f40 100644
--- a/app/http/server.go
+++ b/app/http/server.go
@@ -155,6 +155,7 @@ func addMainTemplate(renderer multitemplate.Renderer, name string) multitemplate
"./public/templates/layouts/main.tmpl",
"./public/templates/includes/head.tmpl",
"./public/templates/includes/sidebar.tmpl",
+ "./public/templates/includes/loadingscreen.tmpl",
fmt.Sprintf("./public/templates/views/%s.tmpl", name),
)
return renderer
@@ -167,6 +168,7 @@ func addManageTemplate(renderer multitemplate.Renderer, name string) multitempla
"./public/templates/includes/sidebar.tmpl",
"./public/templates/includes/navbar.tmpl",
"./public/templates/includes/substitutionmodal.tmpl",
+ "./public/templates/includes/loadingscreen.tmpl",
fmt.Sprintf("./public/templates/views/%s.tmpl", name),
)
return renderer
diff --git a/public/static/css/style.css b/public/static/css/style.css
index 6570631..c4cecdf 100644
--- a/public/static/css/style.css
+++ b/public/static/css/style.css
@@ -134,3 +134,26 @@ body {
.modal-footer, .modal-header {
border-color: #2e3136 !important;
}
+
+.vertical-center {
+ margin: 0;
+ position: absolute;
+ top: 50%;
+}
+
+.fade-in {
+ opacity: 1;
+ animation-name: fadeInOpacity;
+ animation-iteration-count: 1;
+ animation-timing-function: ease-in;
+ animation-duration: 0.5s;
+}
+
+@keyframes fadeInOpacity {
+ 0% {
+ opacity: 0;
+ }
+ 100% {
+ opacity: 1;
+ }
+}
diff --git a/public/templates/includes/head.tmpl b/public/templates/includes/head.tmpl
index 475f7f2..23cfa83 100644
--- a/public/templates/includes/head.tmpl
+++ b/public/templates/includes/head.tmpl
@@ -63,6 +63,33 @@
setDefaultHeader();
+
+
diff --git a/public/templates/includes/loadingscreen.tmpl b/public/templates/includes/loadingscreen.tmpl
new file mode 100644
index 0000000..172e80b
--- /dev/null
+++ b/public/templates/includes/loadingscreen.tmpl
@@ -0,0 +1,9 @@
+{{define "loadingscreen"}}
+
+{{end}}
\ No newline at end of file
diff --git a/public/templates/layouts/main.tmpl b/public/templates/layouts/main.tmpl
index bc391ad..47b7b9f 100644
--- a/public/templates/layouts/main.tmpl
+++ b/public/templates/layouts/main.tmpl
@@ -7,6 +7,7 @@
{{template "sidebar" .}}
+ {{template "loadingscreen" .}}
{{template "content" .}}
diff --git a/public/templates/layouts/manage.tmpl b/public/templates/layouts/manage.tmpl
index d6ddd4b..a14492b 100644
--- a/public/templates/layouts/manage.tmpl
+++ b/public/templates/layouts/manage.tmpl
@@ -8,6 +8,7 @@
{{template "substitutions" .}}
{{template "navbar" .}}
+ {{template "loadingscreen" .}}
{{template "content" .}}
diff --git a/public/templates/views/blacklist.tmpl b/public/templates/views/blacklist.tmpl
index c707b75..e2b6555 100644
--- a/public/templates/views/blacklist.tmpl
+++ b/public/templates/views/blacklist.tmpl
@@ -135,7 +135,7 @@
});
}
- loadData();
+ withLoadingScreen(loadData);
{{end}}
\ No newline at end of file
diff --git a/public/templates/views/index.tmpl b/public/templates/views/index.tmpl
index ffbcec2..67648d9 100644
--- a/public/templates/views/index.tmpl
+++ b/public/templates/views/index.tmpl
@@ -56,6 +56,6 @@
}
}
- loadData();
+ withLoadingScreen(loadData);
{{end}}
\ No newline at end of file
diff --git a/public/templates/views/logs.tmpl b/public/templates/views/logs.tmpl
index 8166c11..ea97940 100644
--- a/public/templates/views/logs.tmpl
+++ b/public/templates/views/logs.tmpl
@@ -139,7 +139,7 @@
document.getElementById('page-number').innerText = currentPage;
}
- loadData();
+ withLoadingScreen(loadData);
diff --git a/public/templates/views/settings.tmpl b/public/templates/views/settings.tmpl
index e959f91..739253f 100644
--- a/public/templates/views/settings.tmpl
+++ b/public/templates/views/settings.tmpl
@@ -39,7 +39,8 @@
@@ -147,7 +148,8 @@
@@ -155,7 +157,8 @@
@@ -195,7 +198,8 @@
@@ -203,7 +207,8 @@
@@ -343,8 +348,6 @@
await fillArchiveChannels(channels, settings.archive_channel);
await fillCategories(channels, settings.category);
}
-
- loadData();
+
+
{{end}}
diff --git a/public/templates/views/tags.tmpl b/public/templates/views/tags.tmpl
index e9a90de..d13fb10 100644
--- a/public/templates/views/tags.tmpl
+++ b/public/templates/views/tags.tmpl
@@ -118,7 +118,7 @@
}
}
- loadData();
+ withLoadingScreen(loadData);
{{end}}
\ No newline at end of file
diff --git a/public/templates/views/ticketlist.tmpl b/public/templates/views/ticketlist.tmpl
index d7cd17a..ff6120b 100644
--- a/public/templates/views/ticketlist.tmpl
+++ b/public/templates/views/ticketlist.tmpl
@@ -52,7 +52,7 @@
}
}
- loadData();
+ withLoadingScreen(loadData);
{{end}}
\ No newline at end of file
diff --git a/public/templates/views/ticketview.tmpl b/public/templates/views/ticketview.tmpl
index a924187..5534c46 100644
--- a/public/templates/views/ticketview.tmpl
+++ b/public/templates/views/ticketview.tmpl
@@ -106,7 +106,7 @@
}
}
- loadData();
+ withLoadingScreen(loadData);
{{end}}
\ No newline at end of file