From 7adc2f6d1634f487be69b846244e905305127adb Mon Sep 17 00:00:00 2001 From: Fornax Date: Mon, 28 Feb 2022 16:35:51 +0100 Subject: [PATCH] Update feature table with new transfer limits --- res/include/md/limits.md | 19 ++++++++++ res/include/style/layout.css | 4 +-- .../viewers/LargeFileMessage.svelte | 4 +-- svelte/src/file_viewer/viewers/Text.svelte | 12 +++++-- svelte/src/home_page/FeatureTable.svelte | 36 ++++++++++--------- webcontroller/web_controller.go | 1 + 6 files changed, 52 insertions(+), 24 deletions(-) create mode 100644 res/include/md/limits.md diff --git a/res/include/md/limits.md b/res/include/md/limits.md new file mode 100644 index 0000000..0b2eb59 --- /dev/null +++ b/res/include/md/limits.md @@ -0,0 +1,19 @@ +# Limits + +We need to limit the features of pixeldrain to avoid abuse and encourage you to +get a subscription. Here's an overview of all limits which are currently in +place on pixeldrain. + +| | Anonymous | Registered | Pro | Prepaid | +|-----------------------|--------------|-----------------|---------------|---------------------| +| Download speed | 2 MiB/s | 2 MiB/s | Unlimited | Unlimited | +| File storage | Unlimited | 500 GB | 1 TB | Unlimited (€4 / TB) | +| File expiry | 30 days | 30 days | 90 days | Unlimited | +| File size | 10 GB | 10 GB | 20 GB | 20 GB | +| File downloads | 1000 / day | Unlimited | Unlimited | Unlimited | +| Free data transfer | 100 GB / day | Unlimited | Unlimited | Unlimited | +| Premium data transfer | No | 10 GB / month | 1 TB / month | Unlimited (€2 / TB) | +| Video streaming | No | Within data cap | Yes | Yes | +| Ad-free file viewing | No | No | Yes | Yes | +| Kickback fees | No | No | No | Yes | +| File viewer branding | No | No | From €8/month | Yes | diff --git a/res/include/style/layout.css b/res/include/style/layout.css index d5ea1b7..4002139 100644 --- a/res/include/style/layout.css +++ b/res/include/style/layout.css @@ -150,7 +150,7 @@ section { width: 100%; height: auto; padding: 0; - text-align: left; + text-align: initial; clear: both; } @@ -318,7 +318,7 @@ tr > td, tr > th {padding: 0.2em 0.5em;} } pre { - margin: 16px; + padding: 10px; border-bottom: 1px var(--layer_2_color_border) solid; overflow-x: auto; } diff --git a/svelte/src/file_viewer/viewers/LargeFileMessage.svelte b/svelte/src/file_viewer/viewers/LargeFileMessage.svelte index c4cc0d7..dc92898 100644 --- a/svelte/src/file_viewer/viewers/LargeFileMessage.svelte +++ b/svelte/src/file_viewer/viewers/LargeFileMessage.svelte @@ -13,9 +13,9 @@ export let file = { {#if file.show_ads && file.size > 1e8} - Your download speed is currently limited to 4 MiB/s. Downloading this + Your download speed is currently limited to 2 MiB/s. Downloading this file for free will take at least - {formatDuration((file.size/4194304)*1000)} (under ideal conditions). + {formatDuration((file.size/2097152)*1000)} (under ideal conditions). You can upgrade to Pro diff --git a/svelte/src/file_viewer/viewers/Text.svelte b/svelte/src/file_viewer/viewers/Text.svelte index 4bbff25..a5c54f2 100644 --- a/svelte/src/file_viewer/viewers/Text.svelte +++ b/svelte/src/file_viewer/viewers/Text.svelte @@ -87,9 +87,9 @@ const code = async file => {
{#if text_type === "markdown"} -
+
Loading... -
+ {:else if text_type === "text"}
 			Loading...
@@ -110,13 +110,19 @@ const code = async file => {
 	width: 100%;
 	font-size: 0.9em;
 	line-height: 1.5em;
-	padding: 5px 5px 5px 20px;
 	overflow-y: auto;
 	overflow-x: hidden;
 }
 .container > pre {
+	margin: 0;
+	padding: 10px;
 	white-space: pre-wrap;
 	overflow: hidden;
 	border: none;
 }
+.container > .md {
+	display: block;
+	padding: 10px;
+	margin: auto;
+}
 
diff --git a/svelte/src/home_page/FeatureTable.svelte b/svelte/src/home_page/FeatureTable.svelte
index 059b97d..8699d2f 100644
--- a/svelte/src/home_page/FeatureTable.svelte
+++ b/svelte/src/home_page/FeatureTable.svelte
@@ -45,12 +45,14 @@ onMount(() => {
 			Data transfer limit
 		
- Rate limiting mode will be enabled when a file has 3 - times more downloads than views + Up to 1000 files or 50 GB data transfer per day. Rate limiting mode + will be enabled if a file has 5 times more downloads than views, and + you will be asked to complete a CAPTCHA
- Transfer limit of 1 terabyte. If - the transfer limit is exceeded advertisements will be enabled again + Transfer limit of 1 terabyte per + month. If the transfer limit is exceeded the restrictions of the + free plan will apply
+
+
+ Download speed +
+
+ Up to 2 MiB/s, may be slower during busy periods +
+
+ High priority + bandwidth for files you download and files on your + account +
+
Adver­tise­ments @@ -94,19 +109,6 @@ onMount(() => { 1 terabyte
-
-
- Download speed -
-
- Up to 4 MiB/s, may be slower during busy periods -
-
- High priority - bandwidth for files you download and files on your - account -
-
Online file previews diff --git a/webcontroller/web_controller.go b/webcontroller/web_controller.go index 55eb555..20dd057 100644 --- a/webcontroller/web_controller.go +++ b/webcontroller/web_controller.go @@ -159,6 +159,7 @@ func New( {GET, "brave" /* */, wc.serveMarkdown("brave.md", handlerOpts{})}, {GET, "acknowledgements" /**/, wc.serveMarkdown("acknowledgements.md", handlerOpts{})}, {GET, "business" /* */, wc.serveMarkdown("business.md", handlerOpts{})}, + {GET, "limits" /* */, wc.serveMarkdown("limits.md", handlerOpts{})}, {GET, "apps" /* */, wc.serveTemplate("apps", handlerOpts{})}, {GET, "directory_upload" /**/, wc.serveTemplate("directory_upload", handlerOpts{})},