Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AURA
dashboard
Commits
b9f610ab
Commit
b9f610ab
authored
Apr 23, 2019
by
jackie / Andrea Ida Malkah Klaura
Browse files
add modal for adding new file
parent
b1c883f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/components/FileManager.vue
View file @
b9f610ab
...
...
@@ -39,11 +39,35 @@
</b-row>
</div>
<div
v-else
>
<b-modal
id=
"modal-add-file"
title=
"Add new file"
@
ok=
"addFile"
>
<div
v-if=
"addNewFileURI"
>
<b-row>
<b-col
md=
"2"
>
<b>
Link:
</b>
</b-col>
<b-col>
<b-form-input
type=
"url"
v-model=
"uploadSourceURI"
placeholder=
"Insert a HTTP(S) link here"
></b-form-input>
</b-col>
</b-row>
</div>
<div
v-else
>
<b-form-file
v-model=
"uploadSourceFile"
accept=
"audio/*"
placeholder=
"Choose a file..."
drop-placeholder=
"Drop file here..."
></b-form-file>
</div>
<hr>
<div
align=
"center"
>
<b-form-checkbox
v-model=
"addNewFileURI"
value=
"true"
unchecked_value=
"false"
>
Download from remote source instead of uploading a file
</b-form-checkbox>
</div>
</b-modal>
<div
v-if=
"files.length === 0"
align=
"center"
>
<b-alert
show
variant=
"warning"
>
There are no files for this show yet.
</b-alert>
<b-button
variant=
"success"
@
click=
"notYetImplemented"
>
Uploa
d a file
</b-button>
<b-button
variant=
"success"
v-b-modal.modal-add-file
>
Upload or ad
d a file
</b-button>
</div>
<div
v-else
>
<div
align=
"center"
style=
"padding-bottom: 1.5em;"
>
<b-button
variant=
"success"
v-b-modal.modal-add-file
>
Upload or add a file
</b-button>
</div>
<b-table
striped
:items=
"filesTable"
/>
</div>
</div>
...
...
@@ -84,6 +108,9 @@ export default {
files
:
[],
playlists
:
[],
mode
:
'
files
'
,
addNewFileURI
:
false
,
uploadSourceURI
:
''
,
uploadSourceFile
:
null
,
loaded
:
{
shows
:
false
,
files
:
false
,
...
...
@@ -130,6 +157,9 @@ export default {
notYetImplemented
:
function
()
{
alert
(
'
By the mighty witchcraftry of the mother of time!
\n\n
This feature is not implemented yet.
'
)
},
addFile
:
function
()
{
this
.
notYetImplemented
()
},
switchShow
:
function
(
index
)
{
// set the current show and its ID to whatever we want to switch to now
this
.
currentShow
=
index
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment