From 268ca6c818c2a3bc458633a44cc2947bfa3dfc24 Mon Sep 17 00:00:00 2001
From: Wim Brand
Date: Mon, 27 Sep 2021 14:57:00 +0200
Subject: [PATCH] Increase upload timeout and other fixes
---
res/include/md/api_file.md | 5 +++--
.../script/file_viewer/viewer_scripts/VideoViewer.js | 2 ++
res/include/style/layout.css | 2 +-
res/template/home.html | 12 ++++++------
svelte/src/admin_panel/Router.svelte | 2 +-
svelte/src/home_page/HomePage.svelte | 5 ++++-
svelte/src/home_page/UploadProgressBar.svelte | 2 +-
svelte/src/user_home/Home.svelte | 3 +++
webcontroller/templates.go | 2 +-
9 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/res/include/md/api_file.md b/res/include/md/api_file.md
index f683840..12c69d7 100644
--- a/res/include/md/api_file.md
+++ b/res/include/md/api_file.md
@@ -86,12 +86,13 @@ instead of inline rendering, which causes the browser to show a 'Save File'
dialog.
Warning: If a file is using too much bandwidth it can be rate limited. The rate
-limit will be enabled if a file has ten times more downloads than views. The
+limit will be enabled if a file has three times more downloads than views. The
owner of a file can always download it. When a file is rate limited the user
will need to fill out a captcha in order to continue downloading the file. The
captcha will only appear on the file viewer page (pixeldrain.com/u/{id}). Rate
limiting has been added to prevent the spread of viruses and to stop direct
-linking.
+linking. Direct linking is only allowed when files are uploaded using a Pro
+account.
Pixeldrain also includes a virus scanner. If a virus has been detected in a file
the user will also have to fill in a captcha to download it.
diff --git a/res/include/script/file_viewer/viewer_scripts/VideoViewer.js b/res/include/script/file_viewer/viewer_scripts/VideoViewer.js
index 7a0e3f7..10f020b 100644
--- a/res/include/script/file_viewer/viewer_scripts/VideoViewer.js
+++ b/res/include/script/file_viewer/viewer_scripts/VideoViewer.js
@@ -8,6 +8,7 @@ function VideoViewer(viewer, file, next) {
this.vidElement = document.createElement("video")
this.vidElement.controls = "controls"
+ this.vidElement.playsInline = "playsInline"
this.vidElement.classList = "center drop_shadow"
this.vidElement.addEventListener("ended", () => { this.next() }, false)
if (!embeddedViewer) {
@@ -16,6 +17,7 @@ function VideoViewer(viewer, file, next) {
this.videoSource = document.createElement("source")
this.videoSource.src = this.file.get_href
+ this.videoSource.type = this.file.mime_type
this.vidElement.appendChild(this.videoSource)
this.vidContainer.appendChild(this.vidElement)
diff --git a/res/include/style/layout.css b/res/include/style/layout.css
index 186d4fa..f7d833a 100644
--- a/res/include/style/layout.css
+++ b/res/include/style/layout.css
@@ -305,7 +305,7 @@ p, .indent {
}
li {
- margin-bottom: 0.5em;
+ margin-bottom: 0.3em;
}
hr{
diff --git a/res/template/home.html b/res/template/home.html
index 79ab99d..83a70db 100644
--- a/res/template/home.html
+++ b/res/template/home.html
@@ -88,8 +88,8 @@
window.api_endpoint = '{{.APIEndpoint}}';
window.user_subscription = {{.User.Subscription}};
-
-
+
+
{{template "page_top" .}}
@@ -135,10 +135,10 @@
Pixeldrain uses
- SI
- standard units for measuring file sizes. If you are using
- Windows your files may appear smaller than they actually are.
+ SI standard units for measuring file sizes.
+ If you are using Microsoft Windows your files may appear smaller
+ than they actually are.