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
41554002
Commit
41554002
authored
Nov 24, 2020
by
Richard Blechinger
Browse files
Normalize code style
parent
f3117536
Changes
40
Expand all
Hide whitespace changes
Inline
Side-by-side
package.json
View file @
41554002
...
@@ -51,7 +51,10 @@
...
@@ -51,7 +51,10 @@
"no-console"
:
"off"
,
"no-console"
:
"off"
,
"curly"
:
"error"
,
"curly"
:
"error"
,
"block-spacing"
:
"error"
,
"block-spacing"
:
"error"
,
"keyword-spacing"
:
"error"
"keyword-spacing"
:
"error"
,
"vue/html-indent"
:
[
"warning"
,
4
,
{
"baseIndent"
:
1
}]
},
},
"parserOptions"
:
{
"parserOptions"
:
{
"parser"
:
"babel-eslint"
"parser"
:
"babel-eslint"
...
...
src/App.vue
View file @
41554002
...
@@ -88,8 +88,7 @@
...
@@ -88,8 +88,7 @@
},
},
],
],
footer
:
[
footer
:
[]
]
}
}
}
}
...
...
src/Pages/AddOrEditPlaylist.vue
View file @
41554002
<
style
></
style
>
<
style
></
style
>
<
template
>
<
template
>
<div
v-if=
"!selectedShow"
class=
"tw-text-center tw-my-8"
>
Lädt...
</div>
<b-container
v-else
class=
"tw-mb-8"
>
<h1>
<template
v-if=
"id"
>
Playliste
{{
playlistEditor
.
id
}}
für Sendung '
{{
selectedShow
.
name
}}
' bearbeiten
</
template
>
<
template
v-else
>
Neue Playliste für Sendung '
{{
selectedShow
.
name
}}
' hinzufügen
</
template
>
</h1>
<b-row
class=
"tw-my-8 tw-items-center"
>
<b-col
cols=
"2"
>
Beschreibung:
</b-col>
<b-col>
<b-form-input
v-model=
"playlistEditor.description"
type=
"text"
placeholder=
"Beschreibung eingeben..."
/>
</b-col>
</b-row>
<!-- If no entries are here (i.e. we add a new playlist), only show
a hint that there's nothing here yet. -->
<div
<div
v-if=
"
playlistEditor.entries.length === 0
"
v-if=
"
!selectedShow
"
align=
"center
"
class=
"tw-text-center tw-my-8
"
>
>
Noch keine Einträge vorhanden. Füge doch welche hinzu!
Lädt...
</div>
</div>
<!-- As soon as we have at least one entry in our temporary playlist
we can display a table with all the info and action buttons -->
<b-container
<div
v-else
>
<b-table
ref=
"playlistEditTable"
striped
:items=
"playlistEditor.entries"
:fields=
"playlistEditTableFields"
>
<!-- Column: Index
Here we just use the array index, because the playlist entries
are ordered as an array, without the need for an extra id field
-->
<
template
v-slot:cell(id)=
"data"
>
{{
data
.
index
+
1
}}
.
</
template
>
<!-- Column: Type
Based on the entry content (either file or uri), we display
a small badge indicating which type of source this is
-->
<
template
v-slot:cell(type)=
"data"
>
<b-badge
v-if=
"data.item.file"
variant=
"success"
>
Datei
</b-badge>
<b-badge
v-else-if=
"data.item.uri.startsWith('line://')"
variant=
"info"
>
Line-in
</b-badge>
<b-badge
v-else-if=
"data.item.uri.startsWith('http://') || data.item.uri.startsWith('https://')"
variant=
"light"
>
Stream
</b-badge>
<b-badge
v-else
v-else
variant=
"dark"
class=
"tw-mb-8"
>
>
Andere
<h1>
</b-badge>
<template
v-if=
"id"
>
</
template
>
Playliste
{{
playlistEditor
.
id
}}
für Sendung '
{{
selectedShow
.
name
}}
' bearbeiten
</
template
>
<!-- Column: Source
<
template
v-else
>
Here we display where this playlist entry is coming from
Neue Playliste für Sendung '
{{
selectedShow
.
name
}}
' hinzufügen
-->
</
template
>
<
template
v-slot:cell(source)=
"data"
>
</h1>
<b-row
class=
"tw-my-8 tw-items-center"
>
<b-col
cols=
"2"
>
Beschreibung:
</b-col>
<b-col>
<b-form-input
v-model=
"playlistEditor.description"
type=
"text"
placeholder=
"Beschreibung eingeben..."
/>
</b-col>
</b-row>
<!-- If no entries are here (i.e. we add a new playlist), only show
a hint that there's nothing here yet. -->
<div
v-if=
"playlistEditor.entries.length === 0"
align=
"center"
>
Noch keine Einträge vorhanden. Füge doch welche hinzu!
</div>
<!-- As soon as we have at least one entry in our temporary playlist
we can display a table with all the info and action buttons -->
<div
v-else
>
<b-table
ref=
"playlistEditTable"
striped
:items=
"playlistEditor.entries"
:fields=
"playlistEditTableFields"
>
<!-- Column: Index
Here we just use the array index, because the playlist entries
are ordered as an array, without the need for an extra id field
-->
<
template
v-slot:cell(id)=
"data"
>
{{
data
.
index
+
1
}}
.
</
template
>
<!-- Column: Type
Based on the entry content (either file or uri), we display
a small badge indicating which type of source this is
-->
<
template
v-slot:cell(type)=
"data"
>
<b-badge
v-if=
"data.item.file"
variant=
"success"
>
Datei
</b-badge>
<b-badge
v-else-if=
"data.item.uri.startsWith('line://')"
variant=
"info"
>
Line-in
</b-badge>
<b-badge
v-else-if=
"data.item.uri.startsWith('http://') || data.item.uri.startsWith('https://')"
variant=
"light"
>
Stream
</b-badge>
<b-badge
v-else
variant=
"dark"
>
Andere
</b-badge>
</
template
>
<!-- Column: Source
Here we display where this playlist entry is coming from
-->
<
template
v-slot:cell(source)=
"data"
>
<span
v-if=
"data.item.file"
>
<span
v-if=
"data.item.file"
>
<span
class=
"tw-font-bold"
>
{{
getFileTitleForPlaylist
(
data
.
item
.
file
.
show
,
data
.
item
.
file
.
id
)
}}
</span><br>
<span
class=
"tw-font-bold"
>
{{
getFileTitleForPlaylist
(
data
.
item
.
file
.
show
,
data
.
item
.
file
.
id
)
}}
</span><br>
<span
class=
"tw-text-gray-700"
>
(file://
{{
data
.
item
.
file
.
show
}}
/
{{
data
.
item
.
file
.
id
}}
)
</span>
<span
class=
"tw-text-gray-700"
>
(file://
{{
data
.
item
.
file
.
show
}}
/
{{
data
.
item
.
file
.
id
}}
)
</span>
</span>
</span>
<span
v-else
>
<span
v-else
>
{{
data
.
item
.
uri
}}
{{
data
.
item
.
uri
}}
</span>
</span>
</
template
>
</
template
>
<!-- Column: Duration
<!-- Column: Duration
Here we give the user the ability to edit the duration of an entry.
Here we give the user the ability to edit the duration of an entry.
-->
-->
<
template
v-slot:cell(duration)=
"data"
>
<
template
v-slot:cell(duration)=
"data"
>
<span
v-if=
"playlistEditor.durationField === data.index"
>
<span
v-if=
"playlistEditor.durationField === data.index"
>
<input
<input
ref=
"durationField"
ref=
"durationField"
v-model=
"playlistEditor.newDuration"
v-model=
"playlistEditor.newDuration"
type=
"text"
type=
"text"
class=
"tw-w-24"
class=
"tw-w-24"
placeholder=
"hh:mm:ss"
placeholder=
"hh:mm:ss"
pattern=
"\d
{2}:\d{2}(:\d{2})?"
pattern=
"\d
{2}:\d{2}(:\d{2})?"
@blur="checkAndUpdateDuration"
@blur="checkAndUpdateDuration"
>
>
</span>
</span>
<span
v-else-if=
"data.item.file"
>
<span
v-else-if=
"data.item.file"
>
{{
prettyNanoseconds
(
getFileById
(
data
.
item
.
file
.
id
).
duration
)
}}
{{
prettyNanoseconds
(
getFileById
(
data
.
item
.
file
.
id
).
duration
)
}}
</span>
</span>
<span
<span
v-else-if=
"data.item.duration"
v-else-if=
"data.item.duration"
v-b-tooltip=
"'Klicken um zu bearbeiten'"
v-b-tooltip=
"'Klicken um zu bearbeiten'"
class=
"tw-underline hover:tw-no-underline tw-cursor-pointer"
class=
"tw-underline hover:tw-no-underline tw-cursor-pointer"
@
click=
"toggleDurationField(data.index)"
@
click=
"toggleDurationField(data.index)"
>
>
{{
prettyNanoseconds
(
data
.
item
.
duration
)
}}
{{
prettyNanoseconds
(
data
.
item
.
duration
)
}}
</span>
</span>
<span
v-else
>
<span
v-else
>
<span
<span
v-b-tooltip=
"'Klicken um zu bearbeiten'"
v-b-tooltip=
"'Klicken um zu bearbeiten'"
class=
"tw-text-gray-700 tw-underline hover:tw-no-underline tw-cursor-pointer"
class=
"tw-text-gray-700 tw-underline hover:tw-no-underline tw-cursor-pointer"
@
click=
"toggleDurationField(data.index)"
@
click=
"toggleDurationField(data.index)"
>
>
(Unbekannt)
(Unbekannt)
</span>
</span>
</span>
</span>
</
template
>
</
template
>
<!-- Column: Actions
<!-- Column: Actions
Finally some buttons to reorder or delete playlist entries
Finally some buttons to reorder or delete playlist entries
-->
-->
<
template
v-slot:cell(actions)=
"data"
>
<
template
v-slot:cell(actions)=
"data"
>
<b-button-group
size=
"sm"
>
<b-button-group
size=
"sm"
>
<b-button
<b-button
:disabled=
"data.index === 0"
:disabled=
"data.index === 0"
@
click=
"movePlaylistItemUp(data.index)"
@
click=
"movePlaylistItemUp(data.index)"
>
<b
class=
"upDownArrows"
>
↑
</b>
</b-button>
<b-button
:disabled=
"data.index === playlistEditor.entries.length - 1"
@
click=
"movePlaylistItemDown(data.index)"
>
<b
class=
"upDownArrows"
>
↓
</b>
</b-button>
<b-button
variant=
"danger"
@
click=
"deletePlaylistItem(data.index)"
>
Delete
</b-button>
</b-button-group>
</
template
>
</b-table>
<hr>
<p
class=
"d-flex justify-content-between border-t"
>
<span
class=
"font-weight-bold"
>
Playlisteinträge
</span>
<span>
Dauer: {{ playlistDuration }}
</span>
</p>
<hr>
<div
v-if=
"playlistExceedsAllowedUnknowns"
class=
"tw-text-red-600 tw-my-4"
>
>
<b
class=
"upDownArrows"
>
↑
</b>
Es gibt 2 oder mehr Einträge die eine unbekannte Dauer haben. Bitte korrigiere das, indem du auf die
</b-button>
Dauer
<b-button
in der Tabelle klickst und manuell eine einträgst. Es darf maximal ein Eintrag mit unbekannter Dauer
:disabled=
"data.index === playlistEditor.entries.length - 1"
vorhanden
@
click=
"movePlaylistItemDown(data.index)"
sein.
</div>
</div>
<!-- Below the table with the playlists entry we display buttons to
add new entries to the table - these can either be files from our
uploaded/imported files, or one of the preconfigured inputs, or a
stream.
TODO: should we disable choosing files that are still being imported?
TODO: make the inputs configurable
-->
<b-modal
id=
"modal-edit-playlist-add-stream"
title=
"Add stream to the playlist"
@
ok=
"addPlaylistItemStream('save')"
>
<b-input
v-model=
"playlistEditor.newStreamURL"
type=
"url"
>
>
<b
class=
"upDownArrows"
>
↓
</b>
...
</b-button>
</b-input>
</b-modal>
<div
class=
"tw-flex tw-justify-between"
>
<b-button-group>
<b-dropdown
text=
"Datei"
>
<b-dropdown-item
v-for=
"(file, index) in files"
:key=
"index"
@
click=
"addPlaylistItemFile(file.show, file.id)"
>
{{ file.id }}: {{ file.metadata.title ? file.metadata.title : "" }} ({{
prettyNanoseconds(file.duration) }}, {{ prettyFileSize(file.size) }}, {{ file.source.uri }})
</b-dropdown-item>
</b-dropdown>
<b-dropdown
text=
"Line-in"
>
<b-dropdown-item
@
click=
"addPlaylistItemLine('0')"
>
Studio 1
</b-dropdown-item>
<b-dropdown-item
@
click=
"addPlaylistItemLine('1')"
>
Preprod
</b-dropdown-item>
<b-dropdown-item
@
click=
"addPlaylistItemLine('2')"
>
Line 2
</b-dropdown-item>
</b-dropdown>
<b-button
@
click=
"addPlaylistItemStream('openModal')"
>
Stream
</b-button>
</b-button-group>
<b-button
<b-button
variant=
"danger"
variant=
"success"
@
click=
"deletePlaylistItem(data.index)"
:disabled=
"playlistExceedsAllowedUnknowns"
@
click=
"storePlaylist"
>
>
Delete
Speichern
</b-button>
</b-button>
</b-button-group>
</div>
</
template
>
</b-container>
</b-table>
<hr>
<p
class=
"d-flex justify-content-between border-t"
>
<span
class=
"font-weight-bold"
>
Playlisteinträge
</span>
<span>
Dauer: {{ playlistDuration }}
</span>
</p>
<hr>
<div
v-if=
"playlistExceedsAllowedUnknowns"
class=
"tw-text-red-600 tw-my-4"
>
Es gibt 2 oder mehr Einträge die eine unbekannte Dauer haben. Bitte korrigiere das, indem du auf die Dauer
in der Tabelle klickst und manuell eine einträgst. Es darf maximal ein Eintrag mit unbekannter Dauer vorhanden
sein.
</div>
</div>
<!-- Below the table with the playlists entry we display buttons to
add new entries to the table - these can either be files from our
uploaded/imported files, or one of the preconfigured inputs, or a
stream.
TODO: should we disable choosing files that are still being imported?
TODO: make the inputs configurable
-->
<b-modal
id=
"modal-edit-playlist-add-stream"
title=
"Add stream to the playlist"
@
ok=
"addPlaylistItemStream('save')"
>
<b-input
v-model=
"playlistEditor.newStreamURL"
type=
"url"
>
...
</b-input>
</b-modal>
<div
class=
"tw-flex tw-justify-between"
>
<b-button-group>
<b-dropdown
text=
"Datei"
>
<b-dropdown-item
v-for=
"(file, index) in files"
:key=
"index"
@
click=
"addPlaylistItemFile(file.show, file.id)"
>
{{ file.id }}: {{ file.metadata.title ? file.metadata.title : "" }} ({{
prettyNanoseconds(file.duration) }}, {{ prettyFileSize(file.size) }}, {{ file.source.uri }})
</b-dropdown-item>
</b-dropdown>
<b-dropdown
text=
"Line-in"
>
<b-dropdown-item
@
click=
"addPlaylistItemLine('0')"
>
Studio 1
</b-dropdown-item>
<b-dropdown-item
@
click=
"addPlaylistItemLine('1')"
>
Preprod
</b-dropdown-item>
<b-dropdown-item
@
click=
"addPlaylistItemLine('2')"
>
Line 2
</b-dropdown-item>
</b-dropdown>
<b-button
@
click=
"addPlaylistItemStream('openModal')"
>
Stream
</b-button>
</b-button-group>
<b-button
variant=
"success"
:disabled=
"playlistExceedsAllowedUnknowns"
@
click=
"storePlaylist"
>
Speichern
</b-button>
</div>
</b-container>
</template>
</template>
<
script
>
<
script
>
...
@@ -267,7 +268,7 @@
...
@@ -267,7 +268,7 @@
mixins
:
[
prettyDate
],
mixins
:
[
prettyDate
],
props
:
{
props
:
{
id
:
{
id
:
{
type
:
[
Number
,
Boolean
],
type
:
[
Number
,
Boolean
],
default
:
false
,
default
:
false
,
},
},
},
},
...
@@ -457,7 +458,7 @@
...
@@ -457,7 +458,7 @@
// add a line input to the playlist that is being edited
// add a line input to the playlist that is being edited
addPlaylistItemLine
(
line
)
{
addPlaylistItemLine
(
line
)
{
this
.
playlistEditor
.
entries
.
push
({
uri
:
'
line://
'
+
line
})
this
.
playlistEditor
.
entries
.
push
({
uri
:
'
line://
'
+
line
})
},
},
// controls sub-modal to add a new URI to the playlist editor
// controls sub-modal to add a new URI to the playlist editor
...
@@ -491,7 +492,7 @@
...
@@ -491,7 +492,7 @@
let
playlist
=
this
.
getPlaylistById
(
this
.
id
);
let
playlist
=
this
.
getPlaylistById
(
this
.
id
);
if
(
!
playlist
)
{
if
(
!
playlist
)
{
this
.
$router
.
push
({
name
:
'
addPlaylist
'
})
this
.
$router
.
push
({
name
:
'
addPlaylist
'
})
return
;
return
;
}
}
...
...
src/Pages/Credits.vue
View file @
41554002
<
template
>
<
template
>
<b-container>
<b-container>
<h1>
Credits
</h1>
<h1>
Credits
</h1>
<p>
<p>
AURA is developed under the GNU Affero General Public License v3. Current and former developers are:
<br>
AURA is developed under the GNU Affero General Public License v3. Current and former developers are:
<br>
</p>
</p>
<ul>
<ul>
<li>
<li>
Andrea Ida Malkah Klaura
Andrea Ida Malkah Klaura
<a
href=
"https://gitlab.servus.at/jackie"
>
@jackie
</a>
<a
href=
"https://gitlab.servus.at/jackie"
>
@jackie
</a>
<b-badge
variant=
"primary"
>
<b-badge
variant=
"primary"
>
dashboard
dashboard
</b-badge>
</b-badge>
<b-badge>
oidc
</b-badge>
<b-badge>
oidc
</b-badge>
</li>
</li>
<li>
<li>
Christian Pointner
Christian Pointner
<a
href=
"https://gitlab.servus.at/equinox"
>
@equinox
</a>
<a
href=
"https://gitlab.servus.at/equinox"
>
@equinox
</a>
<b-badge
variant=
"danger"
>
<b-badge
variant=
"danger"
>
tank
tank
</b-badge>
</b-badge>
<b-badge>
oidc
</b-badge>
<b-badge>
oidc
</b-badge>
</li>
</li>
<li>
<li>
David Trattnig
David Trattnig
<a
href=
"https://gitlab.servus.at/david"
>
@david
</a>
<a
href=
"https://gitlab.servus.at/david"
>
@david
</a>
<b-badge
variant=
"success"
>
<b-badge
variant=
"success"
>
engine
engine
</b-badge>
</b-badge>
</li>