From ca096ff2e7c44a3c37cdd7cb36740d2954927e7f Mon Sep 17 00:00:00 2001
From: Wim Brand
Date: Tue, 14 Apr 2020 16:00:24 +0200
Subject: [PATCH] update some icons and stuff
---
res/include/script/file_viewer/Viewer.js | 4 ++--
.../file_viewer/viewer_scripts/ImageViewer.js | 2 +-
res/include/script/homepage.js | 2 +-
res/include/script/textupload.js | 2 +-
res/include/style/layout.css | 3 ++-
res/include/style/viewer.css | 2 +-
res/template/about.html | 13 +++++++------
res/template/home.html | 16 ++++++++++------
res/template/paste.html | 10 +++++++---
9 files changed, 32 insertions(+), 22 deletions(-)
diff --git a/res/include/script/file_viewer/Viewer.js b/res/include/script/file_viewer/Viewer.js
index e69eb6e..08f26f0 100644
--- a/res/include/script/file_viewer/Viewer.js
+++ b/res/include/script/file_viewer/Viewer.js
@@ -145,7 +145,7 @@ Viewer.prototype.renderSponsorsSimple = function() {
if (window.innerHeight < minWindowHeight) {
scaleHeight = window.innerHeight/minWindowHeight
}
-
+
let scale = scaleWidth < scaleHeight ? scaleWidth : scaleHeight
document.querySelector(".sponsors").style.height = (scale*bannerHeight)+"px"
}
@@ -186,7 +186,7 @@ Viewer.prototype.renderSponsorsSimple = function() {
// }
Viewer.prototype.keyboardEvent = function(evt) {
- if (evt.ctrlKey || evt.altKey) {
+ if (evt.ctrlKey || evt.altKey || evt.metaKey) {
return // prevent custom shortcuts from interfering with system shortcuts
}
diff --git a/res/include/script/file_viewer/viewer_scripts/ImageViewer.js b/res/include/script/file_viewer/viewer_scripts/ImageViewer.js
index 85deb79..a1ba3d2 100644
--- a/res/include/script/file_viewer/viewer_scripts/ImageViewer.js
+++ b/res/include/script/file_viewer/viewer_scripts/ImageViewer.js
@@ -18,7 +18,7 @@ function ImageViewer(viewer, file) {
this.element.addEventListener("doubletap", (e) => { return this.doubleclick(e) })
this.element.addEventListener("mousedown", (e) => { return this.mousedown(e) })
this.element.addEventListener("mousedown", (e) => { return this.mousedown(e) })
- this.element.addEventListener("wheel", (e) => { return this.scroll(e) })
+ // this.element.addEventListener("wheel", (e) => { return this.scroll(e) })
document.addEventListener("mousemove", (e) => { return this.mousemove(e) })
document.addEventListener("mouseup", (e) => { return this.mouseup(e) })
diff --git a/res/include/script/homepage.js b/res/include/script/homepage.js
index d81fafa..72f39ad 100644
--- a/res/include/script/homepage.js
+++ b/res/include/script/homepage.js
@@ -383,7 +383,7 @@ btnCopyMarkdown.addEventListener("click", function(){
* Keyboard shortcuts
*/
document.addEventListener("keydown", function(event){
- if (event.ctrlKey || event.altKey) {
+ if (event.ctrlKey || event.altKey || event.metaKey) {
return // prevent custom shortcuts from interfering with system shortcuts
}
if (event.keyCode === 67) { // c
diff --git a/res/include/script/textupload.js b/res/include/script/textupload.js
index dee090e..d0043a1 100644
--- a/res/include/script/textupload.js
+++ b/res/include/script/textupload.js
@@ -23,7 +23,7 @@ function uploadText() {
// Upload the file when ctrl + s is pressed
document.addEventListener("keydown", function(event) {
- if (event.ctrlKey && (event.keyCode === 83)) {
+ if ((event.ctrlKey || event.metaKey) && event.keyCode === 83) {
event.preventDefault();
uploadText();
return false;
diff --git a/res/include/style/layout.css b/res/include/style/layout.css
index 590ecce..cbae61f 100644
--- a/res/include/style/layout.css
+++ b/res/include/style/layout.css
@@ -43,6 +43,7 @@
white-space: nowrap;
direction: ltr;
text-rendering: optimizeLegibility;
+ vertical-align: middle;
}
.icon.small {
font-size: 16px;
@@ -320,7 +321,7 @@ pre{
.big_button{
width: 40%;
- min-width: 200px;
+ min-width: 250px;
max-width: 400px;
margin: 10px !important;
border-radius: 5px;
diff --git a/res/include/style/viewer.css b/res/include/style/viewer.css
index ef6c588..2fb9ed9 100644
--- a/res/include/style/viewer.css
+++ b/res/include/style/viewer.css
@@ -226,7 +226,7 @@
height: 24px;
}
.toolbar_button > span {
- vertical-align: 6px;
+ vertical-align: middle;
}
.toolbar_label {
diff --git a/res/template/about.html b/res/template/about.html
index 24ad4a2..fb48492 100644
--- a/res/template/about.html
+++ b/res/template/about.html
@@ -19,12 +19,13 @@
file is included in (pixeldrain.com/l/somelist).
- You cannot delete files yourself. Once a file has been uploaded
- to pixeldrain it will stay there for at least 30 days. If you
- accidentally upload something you shouldn't have, just don't
- share the link. The file will expire eventually. File links are
- not indexed or published anywhere. As long as you don't share it
- nobody will see it.
+ If you upload a file while logged into your pixeldrain account
+ you will be able to delete the file yourself from the download
+ page of the file. If you are not logged in and you accidentally
+ upload something you shouldn't have, just don't share the link.
+ The file will expire eventually. File links are not indexed or
+ published anywhere. As long as you don't share it nobody will
+ see it.
Does pixeldrain cost any money?
diff --git a/res/template/home.html b/res/template/home.html
index b6277ed..67f7f13 100644
--- a/res/template/home.html
+++ b/res/template/home.html
@@ -56,8 +56,12 @@
manager
- U pload Files
- Upload T ext
+
+ cloud_upload
+ U pload Files
+
+ text_fields
+ Upload T ext
By uploading files to pixeldrain you accept that a cookie will
@@ -104,10 +108,10 @@
- Create list with uploaded files
- Copy all links to clipboard
- Copy markdown to clipboard
- Copy BBCode to clipboard
+ list Create list with uploaded files
+ content_copy Copy all links to clipboard
+ content_copy Copy markdown to clipboard
+ content_copy Copy BBCode to clipboard
diff --git a/res/template/paste.html b/res/template/paste.html
index 9319466..68f2f6e 100644
--- a/res/template/paste.html
+++ b/res/template/paste.html
@@ -20,6 +20,7 @@
right: 0;
bottom: 0;
display: inline-block;
+ line-height: 0;
}
.textarea{
position: relative;
@@ -27,12 +28,15 @@
width: 100%;
background: var(--layer_1_color);
color: var(--text_color);
+ margin: 0;
+ border-radius: 0;
}
.toolbar_button{
text-align: left;
}
- .toolbar_button > img {
+ .toolbar_button > img,
+ .toolbar_button > svg {
width: 24px;
height: 24px;
}
@@ -45,11 +49,11 @@