diff --git a/res/static/favicon.ico b/res/static/favicon.ico index 6781590..7c16b27 100644 Binary files a/res/static/favicon.ico and b/res/static/favicon.ico differ diff --git a/res/static/img/carina.webp b/res/static/img/carina.webp new file mode 100644 index 0000000..bc00bb3 Binary files /dev/null and b/res/static/img/carina.webp differ diff --git a/res/static/img/catspaw.webp b/res/static/img/catspaw.webp new file mode 100644 index 0000000..f98d646 Binary files /dev/null and b/res/static/img/catspaw.webp differ diff --git a/res/static/img/fnx_logo.png b/res/static/img/fnx_logo.png new file mode 100644 index 0000000..dd226af Binary files /dev/null and b/res/static/img/fnx_logo.png differ diff --git a/res/static/img/pixeldrain_128.png b/res/static/img/pixeldrain_128.png index 81635db..2e70503 100644 Binary files a/res/static/img/pixeldrain_128.png and b/res/static/img/pixeldrain_128.png differ diff --git a/res/static/img/pixeldrain_256.png b/res/static/img/pixeldrain_256.png index a19f138..bc5962c 100644 Binary files a/res/static/img/pixeldrain_256.png and b/res/static/img/pixeldrain_256.png differ diff --git a/res/static/img/pixeldrain_32.png b/res/static/img/pixeldrain_32.png index c946118..d341c60 100644 Binary files a/res/static/img/pixeldrain_32.png and b/res/static/img/pixeldrain_32.png differ diff --git a/res/static/style/layout.css b/res/static/style/layout.css index de3c987..6e31d42 100644 --- a/res/static/style/layout.css +++ b/res/static/style/layout.css @@ -58,12 +58,6 @@ a>svg { box-sizing: border-box; } -html, -body { - /* This makes sure that no scrollbar shows up when the menu is open on small screens*/ - overflow-x: hidden; -} - body { margin: 0; font-family: system-ui, sans-serif; @@ -76,12 +70,6 @@ body { transition: opacity 0.2s; } -.checkers { - background-image: var(--background_pattern); - background-color: var(--background_pattern_color); - background-repeat: repeat; -} - header, footer { text-align: center; @@ -90,24 +78,16 @@ footer { } footer { - background-image: url("/res/img/nebula.webp"); - background-color: var(--background_color); - background-blend-mode: luminosity; - box-shadow: inset 0 0 10px -4px var(--shadow_color); - border-radius: 8px; - margin: 16px; + background-color: var(--shaded_background); + backdrop-filter: blur(4px); + border-top: 1px solid var(--separator); } footer>.footer_content { - background: var(--body_background); - color: var(--body_text_color); display: inline-block; - width: 1000px; - max-width: 100%; + width: 100%; padding-top: 10px; padding-bottom: 10px; - border-radius: 8px; - margin: 120px 0 60px 0; } header>h1 { @@ -173,52 +153,17 @@ pre>code { transition: left 0.5s; } -.page_body { - position: relative; - right: 0; - height: auto; - left: 0; - margin-left: 300px; - min-width: 300px; - display: block; - text-align: center; - /* Center the header and body */ - overflow-y: auto; - overflow-x: hidden; - transition: margin 0.5s; -} - .page_content { - background: var(--body_background); - border-radius: 6px; - overflow: hidden; + background: var(--shaded_background); + backdrop-filter: blur(4px); + text-align: center; } -.page_content, -.page_margins, -footer { - margin-right: 20px; - margin-left: 20px; -} - -@media (max-width: 1100px) { +@media (max-width: 1000px) { .page_navigation { left: -300px; } - .page_body { - margin-left: 0; - margin-right: 0; - width: 100%; - } - - .page_content, - .page_margins, - footer { - margin-left: 0; - margin-right: 0; - } - header>h1 { /* We want the header text to appear below the menu button, so the top margin needs to be fairly large when the screen is small */ @@ -537,6 +482,12 @@ input[type="color"] { line-height: 1.3em; } +.button.flat { + background: none; + color: var(--body_text_color); + box-shadow: none; +} + button:hover, .button:hover, input[type="submit"]:hover, diff --git a/res/template/admin.html b/res/template/admin.html deleted file mode 100644 index 92c59bf..0000000 --- a/res/template/admin.html +++ /dev/null @@ -1,34 +0,0 @@ -{{define "admin"}} - - - {{if and .Authenticated .User.IsAdmin}} - - {{template "meta_tags" "Administrator panel"}} - - - - - - {{template "menu" .}} -
- - {{else}} - - {{template "meta_tags" "Administrator panel"}} - - - {{template "page_top" .}} -
-

Admin Panel

-
-
- ;-) -
- {{template "page_bottom" .}} - - {{end}} - -{{end}} diff --git a/res/template/appearance.html b/res/template/appearance.html deleted file mode 100644 index 9b74a2e..0000000 --- a/res/template/appearance.html +++ /dev/null @@ -1,152 +0,0 @@ -{{define "appearance"}} - - - {{template "meta_tags" "Appearance settings"}} - - - - - {{template "page_top" .}} -
-

Change website appearance

-
-
-
-

- You can change how pixeldrain looks! Your theme choice will - be saved in a cookie. -

-

Theme

- - (Inspired by Nord) -
- Dynamic theme, changes based on operating system settings. Here you can choose a specific variant: -
- -
- -
-
- - (Inspired by Solarized) -
- Dynamic theme, changes based on operating system settings. Here you can choose a specific variant: -
- -
- -
- - -
- -
- Classic 2022 style, with purple gradients -
-
- -
- Classic pre-2020 pixeldrain style, dark gray -
-
- Other (experimental) themes -
- -
- -
- - (Inspired by Canta GTK) -
- - (Inspired by Skeuos GTK) -
- -
-
- -
- -
- -

- - -

Hue

-

- Many themes support custom hues. The hue does not change the - contrast of the theme, only the color itself. -

-
-
-
-
-
-
-
-
- - - {{template "page_bottom" .}} - - -{{end}} diff --git a/res/template/home.html b/res/template/home.html deleted file mode 100644 index 4a3c532..0000000 --- a/res/template/home.html +++ /dev/null @@ -1,19 +0,0 @@ -{{define "home"}} - - - - {{template "meta_tags" "Cloud storage and data transfer services"}} - - - - - - {{template "menu" .}} -
- - -{{end}} diff --git a/res/template/login.html b/res/template/login.html deleted file mode 100644 index 6ee494a..0000000 --- a/res/template/login.html +++ /dev/null @@ -1,19 +0,0 @@ -{{define "login"}} - - - {{template "meta_tags" "Login" }} - - - - - - - {{template "menu" .}} -
- - -{{end}} diff --git a/res/template/speedtest.html b/res/template/speedtest.html deleted file mode 100644 index 6dc5e27..0000000 --- a/res/template/speedtest.html +++ /dev/null @@ -1,19 +0,0 @@ -{{define "speedtest"}} - - - - {{template "meta_tags" "Speedtest"}} - - - - - - {{template "menu" .}} -
- - -{{end}} diff --git a/res/template/user_home.html b/res/template/user_home.html deleted file mode 100644 index 130704d..0000000 --- a/res/template/user_home.html +++ /dev/null @@ -1,19 +0,0 @@ -{{define "user_home"}} - - - {{template "meta_tags" .User.Username }} - - - - - - - {{template "menu" .}} -
- - -{{end}} diff --git a/res/template/filesystem.html b/res/template/wrap.html similarity index 91% rename from res/template/filesystem.html rename to res/template/wrap.html index 1059e40..1399e3f 100644 --- a/res/template/filesystem.html +++ b/res/template/wrap.html @@ -1,4 +1,4 @@ -{{define "filesystem"}} +{{define "wrap"}} @@ -23,12 +23,12 @@ {{ template "opengraph" .OGData }} - + diff --git a/svelte/package-lock.json b/svelte/package-lock.json index 02d0b0c..e75276d 100644 --- a/svelte/package-lock.json +++ b/svelte/package-lock.json @@ -11,7 +11,6 @@ "behave-js": "^1.5.0", "chart.js": "^4.4.6", "country-data-list": "^1.4.0", - "pdfjs-dist": "^5.4.149", "pure-color": "^1.3.0", "rollup-plugin-includepaths": "^0.2.4", "svelte-preprocess": "^6.0.3", @@ -76,6 +75,7 @@ "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.26.0", @@ -1652,191 +1652,6 @@ "integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==", "license": "MIT" }, - "node_modules/@napi-rs/canvas": { - "version": "0.1.80", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas/-/canvas-0.1.80.tgz", - "integrity": "sha512-DxuT1ClnIPts1kQx8FBmkk4BQDTfI5kIzywAaMjQSXfNnra5UFU9PwurXrl+Je3bJ6BGsp/zmshVVFbCmyI+ww==", - "license": "MIT", - "optional": true, - "workspaces": [ - "e2e/*" - ], - "engines": { - "node": ">= 10" - }, - "optionalDependencies": { - "@napi-rs/canvas-android-arm64": "0.1.80", - "@napi-rs/canvas-darwin-arm64": "0.1.80", - "@napi-rs/canvas-darwin-x64": "0.1.80", - "@napi-rs/canvas-linux-arm-gnueabihf": "0.1.80", - "@napi-rs/canvas-linux-arm64-gnu": "0.1.80", - "@napi-rs/canvas-linux-arm64-musl": "0.1.80", - "@napi-rs/canvas-linux-riscv64-gnu": "0.1.80", - "@napi-rs/canvas-linux-x64-gnu": "0.1.80", - "@napi-rs/canvas-linux-x64-musl": "0.1.80", - "@napi-rs/canvas-win32-x64-msvc": "0.1.80" - } - }, - "node_modules/@napi-rs/canvas-android-arm64": { - "version": "0.1.80", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-android-arm64/-/canvas-android-arm64-0.1.80.tgz", - "integrity": "sha512-sk7xhN/MoXeuExlggf91pNziBxLPVUqF2CAVnB57KLG/pz7+U5TKG8eXdc3pm0d7Od0WreB6ZKLj37sX9muGOQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/canvas-darwin-arm64": { - "version": "0.1.80", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-darwin-arm64/-/canvas-darwin-arm64-0.1.80.tgz", - "integrity": "sha512-O64APRTXRUiAz0P8gErkfEr3lipLJgM6pjATwavZ22ebhjYl/SUbpgM0xcWPQBNMP1n29afAC/Us5PX1vg+JNQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/canvas-darwin-x64": { - "version": "0.1.80", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-darwin-x64/-/canvas-darwin-x64-0.1.80.tgz", - "integrity": "sha512-FqqSU7qFce0Cp3pwnTjVkKjjOtxMqRe6lmINxpIZYaZNnVI0H5FtsaraZJ36SiTHNjZlUB69/HhxNDT1Aaa9vA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/canvas-linux-arm-gnueabihf": { - "version": "0.1.80", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm-gnueabihf/-/canvas-linux-arm-gnueabihf-0.1.80.tgz", - "integrity": "sha512-eyWz0ddBDQc7/JbAtY4OtZ5SpK8tR4JsCYEZjCE3dI8pqoWUC8oMwYSBGCYfsx2w47cQgQCgMVRVTFiiO38hHQ==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/canvas-linux-arm64-gnu": { - "version": "0.1.80", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm64-gnu/-/canvas-linux-arm64-gnu-0.1.80.tgz", - "integrity": "sha512-qwA63t8A86bnxhuA/GwOkK3jvb+XTQaTiVML0vAWoHyoZYTjNs7BzoOONDgTnNtr8/yHrq64XXzUoLqDzU+Uuw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/canvas-linux-arm64-musl": { - "version": "0.1.80", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm64-musl/-/canvas-linux-arm64-musl-0.1.80.tgz", - "integrity": "sha512-1XbCOz/ymhj24lFaIXtWnwv/6eFHXDrjP0jYkc6iHQ9q8oXKzUX1Lc6bu+wuGiLhGh2GS/2JlfORC5ZcXimRcg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/canvas-linux-riscv64-gnu": { - "version": "0.1.80", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-riscv64-gnu/-/canvas-linux-riscv64-gnu-0.1.80.tgz", - "integrity": "sha512-XTzR125w5ZMs0lJcxRlS1K3P5RaZ9RmUsPtd1uGt+EfDyYMu4c6SEROYsxyatbbu/2+lPe7MPHOO/0a0x7L/gw==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/canvas-linux-x64-gnu": { - "version": "0.1.80", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-x64-gnu/-/canvas-linux-x64-gnu-0.1.80.tgz", - "integrity": "sha512-BeXAmhKg1kX3UCrJsYbdQd3hIMDH/K6HnP/pG2LuITaXhXBiNdh//TVVVVCBbJzVQaV5gK/4ZOCMrQW9mvuTqA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/canvas-linux-x64-musl": { - "version": "0.1.80", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-x64-musl/-/canvas-linux-x64-musl-0.1.80.tgz", - "integrity": "sha512-x0XvZWdHbkgdgucJsRxprX/4o4sEed7qo9rCQA9ugiS9qE2QvP0RIiEugtZhfLH3cyI+jIRFJHV4Fuz+1BHHMg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@napi-rs/canvas-win32-x64-msvc": { - "version": "0.1.80", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-win32-x64-msvc/-/canvas-win32-x64-msvc-0.1.80.tgz", - "integrity": "sha512-Z8jPsM6df5V8B1HrCHB05+bDiCxjE9QA//3YrkKIdVDEwn5RKaqOxCJDRJkl48cJbylcrJbW4HxZbTte8juuPg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -2465,6 +2280,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001669", "electron-to-chromium": "^1.5.41", @@ -2486,9 +2302,9 @@ "license": "MIT" }, "node_modules/caniuse-lite": { - "version": "1.0.30001712", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001712.tgz", - "integrity": "sha512-MBqPpGYYdQ7/hfKiet9SCI+nmN5/hp4ZzveOJubl5DTAMa5oggjAuoi0Z4onBpKPFI2ePGnQuQIzF3VxDjDJig==", + "version": "1.0.30001749", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001749.tgz", + "integrity": "sha512-0rw2fJOmLfnzCRbkm8EyHL8SvI2Apu5UbnQuTsJ0ClgrH8hcwFooJ1s5R0EP8o8aVrFu8++ae29Kt9/gZAZp/Q==", "devOptional": true, "funding": [ { @@ -3166,18 +2982,6 @@ "dev": true, "license": "ISC" }, - "node_modules/pdfjs-dist": { - "version": "5.4.149", - "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-5.4.149.tgz", - "integrity": "sha512-Xe8/1FMJEQPUVSti25AlDpwpUm2QAVmNOpFP0SIahaPIOKBKICaefbzogLdwey3XGGoaP4Lb9wqiw2e9Jqp0LA==", - "license": "Apache-2.0", - "engines": { - "node": ">=20.16.0 || >=22.3.0" - }, - "optionalDependencies": { - "@napi-rs/canvas": "^0.1.77" - } - }, "node_modules/periscopic": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", @@ -3371,6 +3175,7 @@ "integrity": "sha512-vGorVWIsWfX3xbcyAS+I047kFKapHYivmkaT63Smj77XwvLSJos6M1xGqZnBPFQFBRZDOcG1QnYEIxAvTr/HjA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "1.0.6" }, @@ -3703,6 +3508,7 @@ "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.19.tgz", "integrity": "sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==", "license": "MIT", + "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.1", "@jridgewell/sourcemap-codec": "^1.4.15", @@ -3832,7 +3638,8 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" + "license": "0BSD", + "peer": true }, "node_modules/typescript": { "version": "5.6.3", diff --git a/svelte/rollup.config.js b/svelte/rollup.config.js index d91c8fb..62c902d 100644 --- a/svelte/rollup.config.js +++ b/svelte/rollup.config.js @@ -11,12 +11,7 @@ const production = !process.env.ROLLUP_WATCH; const builddir = "../res/static/svelte" export default [ - "filesystem", - "user_home", - "admin_panel", - "home_page", - "speedtest", - "login", + "wrap", ].map((name, index) => ({ input: `src/${name}.js`, output: { diff --git a/svelte/src/admin_panel.js b/svelte/src/admin_panel.js deleted file mode 100644 index 3d240f1..0000000 --- a/svelte/src/admin_panel.js +++ /dev/null @@ -1,8 +0,0 @@ -import App from './admin_panel/Router.svelte'; - -const app = new App({ - target: document.getElementById("page_body"), - props: {} -}); - -export default app; diff --git a/svelte/src/admin_panel/AbuseReports.svelte b/svelte/src/admin_panel/AbuseReports.svelte index da28189..f307e02 100644 --- a/svelte/src/admin_panel/AbuseReports.svelte +++ b/svelte/src/admin_panel/AbuseReports.svelte @@ -1,7 +1,7 @@ - -
Reports: {reports.length}
diff --git a/svelte/src/admin_panel/EmailReporters.svelte b/svelte/src/admin_panel/EmailReporters.svelte index 7d2d8bf..9af6056 100644 --- a/svelte/src/admin_panel/EmailReporters.svelte +++ b/svelte/src/admin_panel/EmailReporters.svelte @@ -1,8 +1,8 @@ - -
diff --git a/svelte/src/admin_panel/Home.svelte b/svelte/src/admin_panel/Home.svelte index 00cb909..309c581 100644 --- a/svelte/src/admin_panel/Home.svelte +++ b/svelte/src/admin_panel/Home.svelte @@ -276,24 +276,12 @@ onDestroy(() => { - - File statistics (per file) - {status.stats_watcher_threads} - {status.stats_watcher_listeners} - {(status.stats_watcher_listeners / status.stats_watcher_threads).toPrecision(3)} - Filesystem statistics (per file) {status.filesystem_watcher_threads} {status.filesystem_watcher_listeners} {(status.filesystem_watcher_listeners / status.filesystem_watcher_threads).toPrecision(3)} - - Rate limits (per IP) - {status.rate_limit_watcher_threads} - {status.rate_limit_watcher_listeners} - {(status.rate_limit_watcher_listeners / status.rate_limit_watcher_threads).toPrecision(3)} - Downloads (per IP) {status.download_clients} diff --git a/svelte/src/admin_panel/IPBans.svelte b/svelte/src/admin_panel/IPBans.svelte index e7e600b..0f54702 100644 --- a/svelte/src/admin_panel/IPBans.svelte +++ b/svelte/src/admin_panel/IPBans.svelte @@ -2,7 +2,7 @@ import { onMount } from "svelte"; import { formatDate } from "util/Formatting"; import Expandable from "util/Expandable.svelte"; -import LoadingIndicator from "util/LoadingIndicator.svelte"; +import { loading_finish } from "lib/Loading"; const abuse_types = [ "copyright", @@ -15,7 +15,6 @@ const abuse_types = [ "revenge_porn", ] -let loading = true let rows = [] let total_offences = 0 @@ -25,7 +24,7 @@ let new_ban_address let new_ban_reason = abuse_types[0] const get_bans = async () => { - loading = true; + loading_start() try { const resp = await fetch(window.api_endpoint+"/admin/ip_ban"); if(resp.status >= 400) { @@ -39,7 +38,7 @@ const get_bans = async () => { } catch (err) { alert(err); } finally { - loading = false; + loading_finish(); } }; @@ -95,8 +94,6 @@ const delete_ban = async (addr) => { onMount(get_bans); - -
diff --git a/svelte/src/admin_panel/InvoiceVAT.svelte b/svelte/src/admin_panel/InvoiceVAT.svelte index 8aad009..14be4a0 100644 --- a/svelte/src/admin_panel/InvoiceVAT.svelte +++ b/svelte/src/admin_panel/InvoiceVAT.svelte @@ -1,13 +1,12 @@ - -

{year + "-" + ("00"+(month)).slice(-2)}

diff --git a/svelte/src/admin_panel/MollieSettlement.svelte b/svelte/src/admin_panel/MollieSettlement.svelte index 94fed96..10860be 100644 --- a/svelte/src/admin_panel/MollieSettlement.svelte +++ b/svelte/src/admin_panel/MollieSettlement.svelte @@ -2,11 +2,10 @@ import { onMount } from "svelte"; import { formatDate } from "util/Formatting"; import { mollie_proxy_call } from "./MollieAPI"; -import LoadingIndicator from "util/LoadingIndicator.svelte"; import Euro from "util/Euro.svelte"; +import { loading_start } from "lib/Loading"; export let settlement = {} -let loading = true let payments = [] let per_country = {} @@ -49,7 +48,7 @@ const load_all_payments = async (settlement_id) => { } const get_payments = async () => { - loading = true; + loading_start() try { payments = await load_all_payments(settlement.id) @@ -84,15 +83,13 @@ const get_payments = async () => { } catch (err) { alert(err); } finally { - loading = false; + loading_finish() } }; onMount(get_payments); - -

Accounting information

{#if per_country.NL} diff --git a/svelte/src/admin_panel/MollieSettlements.svelte b/svelte/src/admin_panel/MollieSettlements.svelte index a1c87e0..385dea1 100644 --- a/svelte/src/admin_panel/MollieSettlements.svelte +++ b/svelte/src/admin_panel/MollieSettlements.svelte @@ -2,17 +2,16 @@ import { onMount } from "svelte"; import { formatDate } from "util/Formatting"; import Expandable from "util/Expandable.svelte"; -import LoadingIndicator from "util/LoadingIndicator.svelte"; import Euro from "util/Euro.svelte"; import MollieSettlement from "./MollieSettlement.svelte"; import { mollie_proxy_call } from "./MollieAPI"; +import { loading_finish, loading_start } from "lib/Loading"; -let loading = true let response = {} let settlements = [] const get_settlements = async () => { - loading = true; + loading_start() try { const req = await mollie_proxy_call("settlements?limit=250"); if(req.status >= 400) { @@ -23,15 +22,13 @@ const get_settlements = async () => { } catch (err) { alert(err); } finally { - loading = false; + loading_finish() } }; onMount(get_settlements); - -
{#each settlements as row (row.id)} diff --git a/svelte/src/admin_panel/PayPalTaxes.svelte b/svelte/src/admin_panel/PayPalTaxes.svelte index 70fe118..0360af0 100644 --- a/svelte/src/admin_panel/PayPalTaxes.svelte +++ b/svelte/src/admin_panel/PayPalTaxes.svelte @@ -2,10 +2,9 @@ import { onMount } from "svelte"; import { formatDate } from "util/Formatting"; import Expandable from "util/Expandable.svelte"; -import LoadingIndicator from "util/LoadingIndicator.svelte"; import Euro from "util/Euro.svelte"; +import { loading_finish, loading_start } from "lib/Loading"; -let loading = true let response = {} let payments = [] @@ -40,8 +39,8 @@ const get_payments = async () => { fee: 0, } payments = [] - loading = true; + loading_start() try { await get_page("https://api.mollie.com/v2/payments?limit=250") @@ -76,7 +75,7 @@ const get_payments = async () => { } catch (err) { alert(err); } finally { - loading = false; + loading_finish() } } @@ -118,8 +117,6 @@ onMount(() => { }); - -
Payments: {payments.length}
diff --git a/svelte/src/admin_panel/user_bans/UserBans.svelte b/svelte/src/admin_panel/user_bans/UserBans.svelte index aa3c7c7..81e180c 100644 --- a/svelte/src/admin_panel/user_bans/UserBans.svelte +++ b/svelte/src/admin_panel/user_bans/UserBans.svelte @@ -2,19 +2,18 @@ import { onMount } from "svelte"; import { formatDate } from "util/Formatting"; import Expandable from "util/Expandable.svelte"; -import LoadingIndicator from "util/LoadingIndicator.svelte"; import Button from "layout/Button.svelte" import UserFiles from "./UserFiles.svelte"; import BanDetails from "./BanDetails.svelte"; import UserLists from "./UserLists.svelte"; +import { loading_finish, loading_start } from "lib/Loading"; -let loading = true let rows = [] let total_offences = 0 let expanded = false const get_bans = async () => { - loading = true; + loading_start() try { const resp = await fetch(window.api_endpoint+"/admin/user_ban"); if(resp.status >= 400) { @@ -28,7 +27,7 @@ const get_bans = async () => { } catch (err) { alert(err); } finally { - loading = false; + loading_finish() } }; @@ -105,8 +104,6 @@ const block_all_files = async (row, reason) => { onMount(get_bans); - -
diff --git a/svelte/src/admin_panel/user_bans/UserFiles.svelte b/svelte/src/admin_panel/user_bans/UserFiles.svelte index 241cb92..3f7fb9b 100644 --- a/svelte/src/admin_panel/user_bans/UserFiles.svelte +++ b/svelte/src/admin_panel/user_bans/UserFiles.svelte @@ -1,16 +1,16 @@ - -
diff --git a/svelte/src/admin_panel/user_bans/UserLists.svelte b/svelte/src/admin_panel/user_bans/UserLists.svelte index 2f2ef61..4b36407 100644 --- a/svelte/src/admin_panel/user_bans/UserLists.svelte +++ b/svelte/src/admin_panel/user_bans/UserLists.svelte @@ -1,15 +1,15 @@ - -
diff --git a/svelte/src/filesystem/Breadcrumbs.svelte b/svelte/src/filesystem/Breadcrumbs.svelte index 24c7e6c..68ee491 100644 --- a/svelte/src/filesystem/Breadcrumbs.svelte +++ b/svelte/src/filesystem/Breadcrumbs.svelte @@ -1,5 +1,5 @@ -
-
- - -
- -
+
+
-
- {/if} - - -
-
{/if} -
- - -
- -

- When a file or directory is shared it can be accessed through a - unique link. You can get the URL with the 'Copy link' button on - the toolbar, or share the link with the 'Share' button. If you - share a directory all the files within the directory are also - accessible from the link. -

- + +
Embedding

@@ -108,7 +78,7 @@ const update_shared = () => {
Copy HTML -

diff --git a/svelte/src/filesystem/edit_window/ThemePresets.svelte b/svelte/src/filesystem/edit_window/ThemePresets.svelte index 79412ab..3835541 100644 --- a/svelte/src/filesystem/edit_window/ThemePresets.svelte +++ b/svelte/src/filesystem/edit_window/ThemePresets.svelte @@ -1,5 +1,5 @@ + + + + + + diff --git a/svelte/src/filesystem/filemanager/FilePicker.svelte b/svelte/src/filesystem/filemanager/FilePicker.svelte index 42c665a..24630b1 100644 --- a/svelte/src/filesystem/filemanager/FilePicker.svelte +++ b/svelte/src/filesystem/filemanager/FilePicker.svelte @@ -4,17 +4,15 @@ import ListView from "./ListView.svelte" import GalleryView from "./GalleryView.svelte" import CompactView from "./CompactView.svelte" import Modal from "util/Modal.svelte"; -import LoadingIndicator from "util/LoadingIndicator.svelte"; import Breadcrumbs from "filesystem/Breadcrumbs.svelte" import { FSNavigator } from "filesystem/FSNavigator"; -import type { FSNode } from "filesystem/FilesystemAPI"; +import type { FSNode } from "lib/FilesystemAPI"; import { FileAction, type FileEvent } from "./FileManagerLib"; let nav = new FSNavigator(false) let modal: Modal let dispatch = createEventDispatcher() let directory_view = "" -let loading = false let large_icons = false let show_hidden = false export let select_multiple = false @@ -194,8 +192,6 @@ onMount(() => { on:file={file_event} /> {/if} - - + diff --git a/svelte/src/layout/SortButton.svelte b/svelte/src/layout/SortButton.svelte index 31194cf..6674733 100644 --- a/svelte/src/layout/SortButton.svelte +++ b/svelte/src/layout/SortButton.svelte @@ -5,7 +5,7 @@ export let asc = true export let sort_func: (field: string) => void -