Improve import UI

This commit is contained in:
James Mills 2020-03-28 10:34:53 +10:00
parent fd3f210a36
commit 5100a10863
No known key found for this signature in database
GPG key ID: AC4C014F1440EBD6
5 changed files with 27 additions and 32 deletions

File diff suppressed because one or more lines are too long

1
go.mod
View file

@ -11,6 +11,7 @@ require (
github.com/disintegration/imaging v1.6.2 // indirect
github.com/dustin/go-humanize v1.0.0
github.com/fsnotify/fsnotify v1.4.7
github.com/gen2brain/vidextr v0.0.0-20150926113638-1f7bdc5fda96
github.com/gorilla/feeds v1.1.1
github.com/gorilla/handlers v1.4.2
github.com/gorilla/mux v1.7.2

2
go.sum
View file

@ -49,6 +49,8 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/gen2brain/vidextr v0.0.0-20150926113638-1f7bdc5fda96 h1:v/IiN+jqKVPtoxNshXT+bYMozNKrj1VW31QnovklMp0=
github.com/gen2brain/vidextr v0.0.0-20150926113638-1f7bdc5fda96/go.mod h1:c8JjiWjpl1dDlPnv8MwS5pqBpEO5J+m1+OkUqBmuOSc=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=

12
static/import.css vendored
View file

@ -13,22 +13,12 @@
}
.import-form {
padding: 20px;
border: 5px dashed #676867;
border-radius: 10px;
cursor: pointer;
}
.import-box {
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
justify-content: center;
align-items: center;
min-width: 300px;
min-height: 300px;
}
.import-details {
display: flex;
flex-direction: column;

View file

@ -3,7 +3,7 @@
<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()" />
<input id="import-input" type="text" placeholder="Enter a valid URL or ID" 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">
@ -22,6 +22,8 @@
</form>
</div>
</label>
<p>ID is of the form provider:video_id</p>
<p>Examples:<br />youtube:Hks6Nq7g6P4<br />vimeo:374624356</p>
</div>
{{end}}
{{define "scripts"}}