Add grab file button

This commit is contained in:
2021-03-16 17:19:03 +01:00
parent e137c424c2
commit d5597f2d25
6 changed files with 62 additions and 28 deletions

View File

@@ -63,13 +63,13 @@
</button>
<button id="btn_copy" class="toolbar_button button_full_width">
<i class="icon">content_copy</i>
<span><u>C</u>opy Link</span>
<span><u>C</u>opy link</span>
</button>
<button id="btn_share" class="toolbar_button button_full_width">
<i class="icon">share</i>
<span>Share</span>
</button>
<button id="btn_shuffle" class="toolbar_button button_full_width" style="display: none;">
<button id="btn_shuffle" class="toolbar_button button_full_width" style="display: none;" title="Randomize the order of the files in this list">
<i class="icon">shuffle</i>
<span>Shuffle &#x2610;</span>
</button>
@@ -77,14 +77,19 @@
<i class="icon">help</i>
<span>Deta<u>i</u>ls</span>
</button>
<button id="btn_embed" class="toolbar_button button_full_width">
<i class="icon">code</i>
<span>E<u>m</u>bed</span>
</button>
<hr/>
<button id="btn_edit" class="toolbar_button button_full_width" style="display: none;">
<i class="icon">edit</i>
<span><u>E</u>dit</span>
</button>
<button id="btn_grab" class="toolbar_button button_full_width" style="display: none;" title="Copy this file to your own pixeldrain account">
<i class="icon">save_alt</i>
<span><u>G</u>rab file</span>
</button>
<button id="btn_embed" class="toolbar_button button_full_width" title="Include this file in your own webpages">
<i class="icon">code</i>
<span>E<u>m</u>bed</span>
</button>
<br/>
{{ if and .Other.FileAdsEnabled .Other.UserAdsEnabled }}
@@ -279,27 +284,26 @@
<br/>
<div class="captcha_popup_captcha" style="text-align: center;"></div>
</template>
</template>
<template id="tpl_embed_popup">
<p>
You can embed pixeldrain's file viewer in your own web pages. We
have created a special HTML code which renders a minimalistic
version of the file viewer where the title bar is a bit thinner and
the toolbar is collapsed by default.
</p>
<p>
Unless it was uploaded using a pixeldrain Pro account the embedded
file will also show advertisements.
</p>
<h3>Code</h3>
<textarea class="embed_html_code" style="width: 100%; height: 4em; margin: 0;"></textarea>
<br/>
<button class="embed_copy_html"><i class="icon">content_copy</i> Copy HTML</button>
<button class="embed_show_preview"><i class="icon">visibility</i> Show example</button>
<h3>Example</h3>
<div class="embed_preview_area" style="text-align: center;"></div>
</template>
<template id="tpl_embed_popup">
<p>
You can embed pixeldrain's file viewer in your own web pages. We
have created a special HTML code which renders a minimalistic
version of the file viewer where the title bar is a bit thinner and
the toolbar is collapsed by default.
</p>
<p>
Unless it was uploaded using a pixeldrain Pro account the embedded
file will also show advertisements.
</p>
<h3>Code</h3>
<textarea class="embed_html_code" style="width: 100%; height: 4em; margin: 0;"></textarea>
<br/>
<button class="embed_copy_html"><i class="icon">content_copy</i> Copy HTML</button>
<button class="embed_show_preview"><i class="icon">visibility</i> Show example</button>
<h3>Example</h3>
<div class="embed_preview_area" style="text-align: center;"></div>
</template>
<script src="/res/script/Chart.min.js"></script>
<script>
@@ -307,6 +311,7 @@
let apiEndpoint = '{{.APIEndpoint}}';
let captchaKey = '{{.Other.CaptchaKey}}';
let embeddedViewer = {{.Other.Embedded}};
let userAuthenticated = {{.Authenticated}};
let highlightColor = '#{{.Style.HighlightColor.RGB}}';
{{template `util.js`}}
{{template `drawGraph.js`}}