diff options
| author | James Mills <prologic@shortcircuit.net.au> | 2020-03-27 21:04:10 +1000 |
|---|---|---|
| committer | James Mills <prologic@shortcircuit.net.au> | 2020-03-27 21:04:10 +1000 |
| commit | 299df65290ef028a997bcfed888b2230ee750f36 (patch) | |
| tree | efb2121a68fc45e100adff16988168281d373ef8 /static | |
| parent | 9af98b0382bb8d58b12d45860afd861ec8b04cb4 (diff) | |
Add optional title and description to video upload
Diffstat (limited to 'static')
| -rw-r--r-- | static/theme.css | 14 | ||||
| -rw-r--r-- | static/upload.js | 6 |
2 files changed, 18 insertions, 2 deletions
diff --git a/static/theme.css b/static/theme.css index e65094b..13c5e12 100644 --- a/static/theme.css +++ b/static/theme.css @@ -99,7 +99,7 @@ main { background: #282a2e; box-shadow: 0 3px 7px 0 rgba(0, 0, 0, 0.2); overflow-x: hidden; - overflow-x: auto; + overflow-y: auto; } #playlist > a { @@ -239,6 +239,18 @@ main { .clear_both { clear:both; } + +textarea { + border-radius:10px; + -moz-border-radius:10px; + -ms-border-radius:10px; + -o-border-radius:10px; + -webkit-border-radius:10px; + border:1px solid #ccc; + font-size:14pt; + padding:5px 10px; +} + input { border-radius:10px; -moz-border-radius:10px; diff --git a/static/upload.js b/static/upload.js index b65684e..457f01e 100644 --- a/static/upload.js +++ b/static/upload.js @@ -12,6 +12,8 @@ let file = null const uploadForm = document.getElementById('upload-form') const videoInput = document.getElementById('video-input') +const videoTitle = document.getElementById('video-title') +const videoDescription = document.getElementById('video-description') const uploadMessageLabel = document.getElementById('upload-message') const uploadFileContainer = document.getElementById('upload-file') const uploadFilenameLabel = document.getElementById('upload-filename') @@ -161,6 +163,8 @@ const startUploading = () => { const formData = new FormData() formData.append('video_file', file) + formData.append('video_title', videoTitle.value) + formData.append('video_description', videoDescription.value) const xhr = new XMLHttpRequest() xhr.upload.addEventListener('progress', uploadProgress, false) @@ -236,4 +240,4 @@ const uploadAbort = () => { // upload abort setMessage('The upload has been canceled by the user or the browser dropped the connection.', true) setProgress(0) setUploadState(false) -}
\ No newline at end of file +} |
