summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJames Mills <prologic@shortcircuit.net.au>2020-03-27 14:24:44 +1000
committerJames Mills <prologic@shortcircuit.net.au>2020-03-27 14:24:44 +1000
commit00ecbee8b93e80e4ccb39249c33a8afebef6cdb6 (patch)
tree2dc3fb2d3e3b5a262bb08354dd0428cbe0f3782a /templates
parente6d35fd8c6624f84c38040015266ecb90a155d61 (diff)
Added UI/UX for Importing artbitrary videos from a URL
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html1
-rw-r--r--templates/import.html29
-rw-r--r--templates/upload.html1
3 files changed, 31 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html
index 46ed508..df76171 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -7,6 +7,7 @@
<link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico">
<link rel="stylesheet" type="text/css" href="/static/theme.css">
<link rel="stylesheet" type="text/css" href="/static/upload.css">
+ <link rel="stylesheet" type="text/css" href="/static/import.css">
{{ template "stylesheets" . }}
{{ template "css" . }}
diff --git a/templates/import.html b/templates/import.html
new file mode 100644
index 0000000..84f0652
--- /dev/null
+++ b/templates/import.html
@@ -0,0 +1,29 @@
+{{define "content"}}
+ <div style="text-align: center;">
+ <label class="import-container" onclick="labelClicked(event)">
+ <div class="import-wrapper">
+ <form id="import-form" class="import-form" enctype="multipart/form-data" method="POST" action="/import">
+ <input id="import-input" type="url" required onchange="urlSelected()" />
+ <div class="import-details">
+ <span id="import-message" class="import-message">No URL entered</span>
+ <div id="import-button-wrapper" class="import-button-wrapper">
+ <button id="import-button" class="import-button" onclick="startImporting()" type="button">
+ <span id="import-stopped">Import</span>
+ <span id="import-started" class="loader" style="display: none;"></span>
+ </button>
+ </div>
+ <div id="import-progress-container" class="import-progress-container">
+ <div id="import-progress" class="import-progress">
+ <span id="import-progress-label" class="import-progress-label"></span>
+ </div>
+ <div style="flex-grow: 1;"></div>
+ </div>
+ </div>
+ </form>
+ </div>
+ </label>
+ </div>
+{{end}}
+{{define "scripts"}}
+ <script type="application/javascript" src="/static/import.js"></script>
+{{end}}
diff --git a/templates/upload.html b/templates/upload.html
index 1716b65..12aea6c 100644
--- a/templates/upload.html
+++ b/templates/upload.html
@@ -30,6 +30,7 @@
</form>
</div>
</label>
+ <p>Need to import a video from another source? Click <a href="/import">Import</a></p>
</div>
{{end}}
{{define "scripts"}}