diff --git a/svelte/package-lock.json b/svelte/package-lock.json index c4b82bb..3bbe68f 100644 --- a/svelte/package-lock.json +++ b/svelte/package-lock.json @@ -11,6 +11,7 @@ "behave-js": "^1.5.0", "chart.js": "^4.2.0", "pure-color": "^1.3.0", + "rollup-plugin-includepaths": "^0.2.4", "svelte-preprocess": "^6.0.2", "tslib": "^2.7.0" }, @@ -3460,6 +3461,12 @@ "fsevents": "~2.3.2" } }, + "node_modules/rollup-plugin-includepaths": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/rollup-plugin-includepaths/-/rollup-plugin-includepaths-0.2.4.tgz", + "integrity": "sha512-iZen+XKVExeCzk7jeSZPJKL7B67slZNr8GXSC5ROBXtDGXDBH8wdjMfdNW5hf9kPt+tHyIvWh3wlE9bPrZL24g==", + "license": "MIT" + }, "node_modules/rollup-plugin-livereload": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/rollup-plugin-livereload/-/rollup-plugin-livereload-2.0.5.tgz", diff --git a/svelte/package.json b/svelte/package.json index 3db464d..67731ff 100644 --- a/svelte/package.json +++ b/svelte/package.json @@ -24,6 +24,7 @@ "behave-js": "^1.5.0", "chart.js": "^4.2.0", "pure-color": "^1.3.0", + "rollup-plugin-includepaths": "^0.2.4", "svelte-preprocess": "^6.0.2", "tslib": "^2.7.0" } diff --git a/svelte/rollup.config.js b/svelte/rollup.config.js index 5486a3f..f831b35 100644 --- a/svelte/rollup.config.js +++ b/svelte/rollup.config.js @@ -5,6 +5,7 @@ import livereload from 'rollup-plugin-livereload'; import terser from '@rollup/plugin-terser'; import babel from '@rollup/plugin-babel' import typescript from '@rollup/plugin-typescript' +import includePaths from 'rollup-plugin-includepaths'; import { sveltePreprocess } from 'svelte-preprocess'; const production = !process.env.ROLLUP_WATCH; @@ -39,7 +40,7 @@ export default [ }), babel({ - extensions: [".js", ".html", ".svelte"], + extensions: [".js", ".ts", ".html", ".svelte"], babelHelpers: "bundled", }), @@ -59,6 +60,9 @@ export default [ compilerOptions: { lib: ["es2015", "dom"] }, verbatimModuleSyntax: true, }), + includePaths({ + paths: ["."], + }), // In dev mode, call `npm run start` once // the bundle has been generated diff --git a/svelte/src/file_viewer/FileStats.svelte b/svelte/src/file_viewer/FileStats.svelte index 9c49795..784925c 100644 --- a/svelte/src/file_viewer/FileStats.svelte +++ b/svelte/src/file_viewer/FileStats.svelte @@ -1,6 +1,6 @@ Yea, I'm gonna need you to slow down a bit

- Pixeldrain's free tier is supported by my Patrons (be grateful). There's - only so much that you can do with the budget they provide. - {formatDataVolume($stats.limits.transfer_limit, 3)} per day is about - the most I can give away for free while keeping it fair for everyone, - and according to our records you have already downloaded + Pixeldrain's free tier is supported by my Patrons. There's only so much + that you can do with the budget they provide. + {formatDataVolume($stats.limits.transfer_limit, 3)} per day is about the + most I can give away for free while keeping it fair for everyone, and + according to our records you have already downloaded {formatDataVolume($stats.limits.transfer_limit_used, 3)}.

@@ -36,9 +33,8 @@ export let file = { Come back tomorrow when your free transfer limit resets

  • - Download the file at a rate of {file.download_speed_limit/(1<<10)} - kiB/s. This will take at least - {formatDuration((file.size/file.download_speed_limit)*1000)} + Download the file at a limited rate of 1 MiB/s. This will take at + least {formatDuration((file_size/(1<<20))*1000, 0)}
  • @@ -53,9 +49,12 @@ export let file = { - - Name: {file.name}
    - Type: {file.mime_type}
    + + + + + +
    {file_name}
    Type{file_type}
    Size{formatDataVolume(file_size, 3)}
    diff --git a/svelte/src/file_viewer/viewers/TextBlock.svelte b/svelte/src/layout/TextBlock.svelte similarity index 100% rename from svelte/src/file_viewer/viewers/TextBlock.svelte rename to svelte/src/layout/TextBlock.svelte diff --git a/svelte/src/file_viewer/StatsSocket.js b/svelte/src/util/StatsSocket.js similarity index 100% rename from svelte/src/file_viewer/StatsSocket.js rename to svelte/src/util/StatsSocket.js diff --git a/svelte/src/file_viewer/viewers/SwipeNavigate.ts b/svelte/src/util/SwipeNavigate.ts similarity index 100% rename from svelte/src/file_viewer/viewers/SwipeNavigate.ts rename to svelte/src/util/SwipeNavigate.ts