From 94cc04b7463953693251a62848f0a5004cf658b7 Mon Sep 17 00:00:00 2001 From: Wim Brand Date: Thu, 11 Jul 2024 13:30:46 +0200 Subject: [PATCH] Add filesystem card to dashboard --- res/static/style/layout.css | 2 +- res/template/apps.html | 47 ++++++++-------- .../filesystem/filemanager/ListView.svelte | 10 ++-- svelte/src/home_page/AddressReputation.svelte | 5 -- .../src/user_home/dashboard/CardFSHome.svelte | 32 +++++++++++ .../dashboard/CardPrepaidTransactions.svelte | 3 ++ .../user_home/dashboard/CardStatistics.svelte | 54 ++++++++++++------- .../src/user_home/dashboard/CardUpload.svelte | 4 +- .../src/user_home/dashboard/Dashboard.svelte | 23 +++++--- 9 files changed, 116 insertions(+), 64 deletions(-) create mode 100644 svelte/src/user_home/dashboard/CardFSHome.svelte diff --git a/res/static/style/layout.css b/res/static/style/layout.css index 181e4a5..baa6bb4 100644 --- a/res/static/style/layout.css +++ b/res/static/style/layout.css @@ -336,7 +336,7 @@ h1 { } h2 { - font-size: 2em; + font-size: 1.8em; border-bottom: 1px var(--separator) solid; } diff --git a/res/template/apps.html b/res/template/apps.html index e7c5194..203bbcc 100644 --- a/res/template/apps.html +++ b/res/template/apps.html @@ -17,11 +17,10 @@

Apps

-
+

ShareX

- Platform: Windows 7, 8.1 and 10 | - License: GPL-3.0 | + Platform: Windows | License: GPL-3.0 | Website | GitHub
@@ -35,25 +34,11 @@ here.

- Here you can download our custom ShareX uploader which uses - pixeldrain to upload your files. + You can download a custom ShareX uploader profile which uses + your pixeldrain account for uploading files on the account apps page.

-
- - save - Download ShareX Uploader -
- - {{if .Authenticated}} - This uploader is configured to upload files to your personal - pixeldrain account. Do not share the configuration file with - anyone, it contains your account credentials. - {{else}} - Log in to use ShareX with your own - pixeldrain account. {{end}} -
-

Setting pixeldrain as default uploader

Download the uploader config and choose 'Open file'
@@ -61,7 +46,9 @@ Set pixeldrain.com as active uploader. Choose Yes

- +
+
+

Drainy

Platform: Windows, Linux, Android | @@ -74,7 +61,9 @@ pixeldrain. Supports uploading to accounts, copying download links to the clipboard and has an upload history screen.

- +
+
+

Pixeldrain Android

Platform: Android | @@ -87,7 +76,9 @@ href="https://github.com/wimvdputten/Pixeldrain_android/releases"> GitHub releases page.

- +
+
+

go-pd

Platform: Linux, Mac OS, Windows (CLI) | @@ -104,7 +95,9 @@ href="https://github.com/ManuelReschke/go-pd/releases"> GitHub releases page.

- +
+
+

go-pixeldrain

Platform: Linux, Mac OS, Windows (CLI) | @@ -120,7 +113,9 @@ href="https://github.com/jkawamoto/go-pixeldrain/releases"> GitHub releases page.

- +
+
+

pdup

Platform: Linux, BSD, Mac OS (CLI) | @@ -133,7 +128,9 @@ href="https://github.com/Fornax96/pdup">from GitHub.

+
+

More apps

If you know more open source apps which work with pixeldrain diff --git a/svelte/src/filesystem/filemanager/ListView.svelte b/svelte/src/filesystem/filemanager/ListView.svelte index 83287ee..75e62e2 100644 --- a/svelte/src/filesystem/filemanager/ListView.svelte +++ b/svelte/src/filesystem/filemanager/ListView.svelte @@ -8,6 +8,8 @@ let dispatch = createEventDispatcher() export let state export let show_hidden = false export let large_icons = false +export let hide_edit = false +export let hide_branding = false

@@ -20,8 +22,8 @@ export let large_icons = false {#each state.children as child, index (child.path)} {dispatch("node_click", index)}} - on:contextmenu={e => {dispatch("node_context", {event: e, index: index})}} + on:click|preventDefault={() => dispatch("node_click", index)} + on:contextmenu={e => dispatch("node_context", {event: e, index: index})} class="node" class:node_selected={child.fm_selected} class:hidden={child.name.startsWith(".") && !show_hidden} @@ -50,12 +52,12 @@ export let large_icons = false share {/if} - {#if child.properties && child.properties.branding_enabled} + {#if child.properties && child.properties.branding_enabled && !hide_branding} {/if} - {#if state.permissions.update} + {#if state.permissions.update && !hide_edit} diff --git a/svelte/src/home_page/AddressReputation.svelte b/svelte/src/home_page/AddressReputation.svelte index 1d37011..d17c51a 100644 --- a/svelte/src/home_page/AddressReputation.svelte +++ b/svelte/src/home_page/AddressReputation.svelte @@ -4,7 +4,6 @@ import Expandable from "../util/Expandable.svelte"; import { formatDate } from "../util/Formatting.svelte"; let result = null; -let offences = 0 onMount(async () => { try { @@ -19,7 +18,6 @@ onMount(async () => { }) - {#if result !== null && result.user_banned}
@@ -149,10 +147,7 @@ onMount(async () => {
{/if} - - diff --git a/svelte/src/user_home/dashboard/CardUpload.svelte b/svelte/src/user_home/dashboard/CardUpload.svelte index bfaaaed..b11a267 100644 --- a/svelte/src/user_home/dashboard/CardUpload.svelte +++ b/svelte/src/user_home/dashboard/CardUpload.svelte @@ -1,10 +1,12 @@ + +
- +
{/if}{/each} @@ -129,13 +136,13 @@ onMount(() => { flex: 1 0 auto; display: flex; flex-direction: column; - width: 25em; + width: 26em; max-width: 100%; background: var(--body_background); border-radius: 8px; padding: 8px; text-align: initial; - max-height: 600px; + max-height: 500px; } .card_component { flex: 1 1 auto;