update some icons and stuff

This commit is contained in:
2020-04-14 16:00:24 +02:00
parent 17edc20c90
commit ca096ff2e7
9 changed files with 32 additions and 22 deletions

View File

@@ -145,7 +145,7 @@ Viewer.prototype.renderSponsorsSimple = function() {
if (window.innerHeight < minWindowHeight) { if (window.innerHeight < minWindowHeight) {
scaleHeight = window.innerHeight/minWindowHeight scaleHeight = window.innerHeight/minWindowHeight
} }
let scale = scaleWidth < scaleHeight ? scaleWidth : scaleHeight let scale = scaleWidth < scaleHeight ? scaleWidth : scaleHeight
document.querySelector(".sponsors").style.height = (scale*bannerHeight)+"px" document.querySelector(".sponsors").style.height = (scale*bannerHeight)+"px"
} }
@@ -186,7 +186,7 @@ Viewer.prototype.renderSponsorsSimple = function() {
// } // }
Viewer.prototype.keyboardEvent = function(evt) { 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 return // prevent custom shortcuts from interfering with system shortcuts
} }

View File

@@ -18,7 +18,7 @@ function ImageViewer(viewer, file) {
this.element.addEventListener("doubletap", (e) => { return this.doubleclick(e) }) 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("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("mousemove", (e) => { return this.mousemove(e) })
document.addEventListener("mouseup", (e) => { return this.mouseup(e) }) document.addEventListener("mouseup", (e) => { return this.mouseup(e) })

View File

@@ -383,7 +383,7 @@ btnCopyMarkdown.addEventListener("click", function(){
* Keyboard shortcuts * Keyboard shortcuts
*/ */
document.addEventListener("keydown", function(event){ 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 return // prevent custom shortcuts from interfering with system shortcuts
} }
if (event.keyCode === 67) { // c if (event.keyCode === 67) { // c

View File

@@ -23,7 +23,7 @@ function uploadText() {
// Upload the file when ctrl + s is pressed // Upload the file when ctrl + s is pressed
document.addEventListener("keydown", function(event) { document.addEventListener("keydown", function(event) {
if (event.ctrlKey && (event.keyCode === 83)) { if ((event.ctrlKey || event.metaKey) && event.keyCode === 83) {
event.preventDefault(); event.preventDefault();
uploadText(); uploadText();
return false; return false;

View File

@@ -43,6 +43,7 @@
white-space: nowrap; white-space: nowrap;
direction: ltr; direction: ltr;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
vertical-align: middle;
} }
.icon.small { .icon.small {
font-size: 16px; font-size: 16px;
@@ -320,7 +321,7 @@ pre{
.big_button{ .big_button{
width: 40%; width: 40%;
min-width: 200px; min-width: 250px;
max-width: 400px; max-width: 400px;
margin: 10px !important; margin: 10px !important;
border-radius: 5px; border-radius: 5px;

View File

@@ -226,7 +226,7 @@
height: 24px; height: 24px;
} }
.toolbar_button > span { .toolbar_button > span {
vertical-align: 6px; vertical-align: middle;
} }
.toolbar_label { .toolbar_label {

View File

@@ -19,12 +19,13 @@
file is included in (pixeldrain.com/l/somelist). file is included in (pixeldrain.com/l/somelist).
</p> </p>
<p> <p>
You cannot delete files yourself. Once a file has been uploaded If you upload a file while logged into your pixeldrain account
to pixeldrain it will stay there for at least 30 days. If you you will be able to delete the file yourself from the download
accidentally upload something you shouldn't have, just don't page of the file. If you are not logged in and you accidentally
share the link. The file will expire eventually. File links are upload something you shouldn't have, just don't share the link.
not indexed or published anywhere. As long as you don't share it The file will expire eventually. File links are not indexed or
nobody will see it. published anywhere. As long as you don't share it nobody will
see it.
</p> </p>
<h3>Does pixeldrain cost any money?</h3> <h3>Does pixeldrain cost any money?</h3>

View File

@@ -56,8 +56,12 @@
manager manager
</div></div> </div></div>
<input id="file_input_field" type="file" name="file" multiple="multiple"/> <input id="file_input_field" type="file" name="file" multiple="multiple"/>
<button id="upload_file_button" class="big_button button_highlight"><u>U</u>pload Files</button> <button id="upload_file_button" class="big_button button_highlight">
<button id="upload_text_button" class="big_button button_highlight">Upload <u>T</u>ext</button> <i class="icon">cloud_upload</i>
<u>U</u>pload Files</button>
<button id="upload_text_button" class="big_button button_highlight">
<i class="icon">text_fields</i>
Upload <u>T</u>ext</button>
<br/> <br/>
<p> <p>
By uploading files to pixeldrain you accept that a cookie will By uploading files to pixeldrain you accept that a cookie will
@@ -104,10 +108,10 @@
</button> </button>
</div> </div>
<br/> <br/>
<button id="btn_create_list">Create list with uploaded files</button> <button id="btn_create_list"><i class="icon small">list</i> Create list with uploaded files</button>
<button id="btn_copy_links">Copy all links to clipboard</button> <button id="btn_copy_links"><i class="icon small">content_copy</i> Copy all links to clipboard</button>
<button id="btn_copy_markdown">Copy markdown to clipboard</button> <button id="btn_copy_markdown"><i class="icon small">content_copy</i> Copy markdown to clipboard</button>
<button id="btn_copy_bbcode">Copy BBCode to clipboard</button> <button id="btn_copy_bbcode"><i class="icon small">content_copy</i> Copy BBCode to clipboard</button>
<br/> <br/>
<div id="created_lists"></div> <div id="created_lists"></div>
</div> </div>

View File

@@ -20,6 +20,7 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
display: inline-block; display: inline-block;
line-height: 0;
} }
.textarea{ .textarea{
position: relative; position: relative;
@@ -27,12 +28,15 @@
width: 100%; width: 100%;
background: var(--layer_1_color); background: var(--layer_1_color);
color: var(--text_color); color: var(--text_color);
margin: 0;
border-radius: 0;
} }
.toolbar_button{ .toolbar_button{
text-align: left; text-align: left;
} }
.toolbar_button > img { .toolbar_button > img,
.toolbar_button > svg {
width: 24px; width: 24px;
height: 24px; height: 24px;
} }
@@ -45,11 +49,11 @@
<body> <body>
<div id="toolbar"> <div id="toolbar">
<button class="toolbar_button button_full_width button_highlight" onclick="uploadText();"> <button class="toolbar_button button_full_width button_highlight" onclick="uploadText();">
{{template `upload.svg` .}} <i class="icon">save</i>
<span>Upload</span> <span>Upload</span>
</button> </button>
<a href="/" class="button toolbar_button button_full_width"> <a href="/" class="button toolbar_button button_full_width">
<img src="{{template `pixeldrain_icon.png`}}" alt="Back to the Home page"/> {{template `pixeldrain.svg` .}}
<span>Home</span> <span>Home</span>
</a> </a>
<br/><br/> <br/><br/>