From 667acf54f23dec7bcbb2e1c868adc40ee8d1a280 Mon Sep 17 00:00:00 2001 From: "Jack W." Date: Fri, 13 Oct 2023 22:18:15 -0400 Subject: [PATCH] feat: :sparkles: Notifications button isn't as polished as i'd like --- src/svelte/elem/UploadWindow.svelte | 389 ++++++++++++++++++++-------- 1 file changed, 281 insertions(+), 108 deletions(-) diff --git a/src/svelte/elem/UploadWindow.svelte b/src/svelte/elem/UploadWindow.svelte index c32dd9f..49cffb3 100644 --- a/src/svelte/elem/UploadWindow.svelte +++ b/src/svelte/elem/UploadWindow.svelte @@ -1,22 +1,22 @@
-

monofile

+

+ monofile + {#if notificationPermission === "default"} + + {/if} +

- {$serverStats.version ? `v${$serverStats.version}` : "•••"}  —  Discord based file sharing + {$serverStats.version ? `v${$serverStats.version}` : "•••"}  —  Discord based file sharing

- +
{#each Object.entries(uploads) as upload (upload[0])}
-
-

{upload[1].name} {upload[1].type}{@html upload[1].type == "upload" ? ` (${Math.round(upload[1].file.size/1048576)}MiB)` : ""}

- +
+

+ {upload[1].name} + {upload[1].type}{@html upload[1].type == "upload" + ? ` (${Math.round( + upload[1].file.size / 1048576 + )}MiB)` + : ""} +

+ {#if upload[1].maximized && !uploadInProgress}
- +
- -
{:else if !uploadInProgress} - + -
{:else} -
- -
@@ -195,48 +343,73 @@
{/each}
- + {#if uploadInProgress == false} - - {#if ($serverStats.accounts||{}).requiredForUpload ? !!$account.username : true} - - -
+ {#if ($serverStats.accounts || {}).requiredForUpload ? !!$account.username : true} + +
{#if Object.keys(uploads).length > 0} - -
+ +
{/if} - {:else} - -

Please log in to upload files.

-
- +

+ Please log in to upload files. +

+
{/if} - {/if} - +

- Hosting {$serverStats.files || "•••"} files - — - Maximum filesize is {(($serverStats.maxDiscordFileSize || 0)*($serverStats.maxDiscordFiles || 0))/1048576 || "•••"}MiB + Hosting {$serverStats.files || "•••"} + files — Maximum filesize is + {(($serverStats.maxDiscordFileSize || 0) * + ($serverStats.maxDiscordFiles || 0)) / + 1048576 || "•••"}MiB

-

- Made with {Math.floor(Math.random()*10)==0 ? "🐟" : "❤"} by - - - - - - Etceterasource + Made with {Math.floor(Math.random() * 10) == 0 ? "🐟" : "❤"} by + + + + + + + Etcetera + — + source

-
\ No newline at end of file +