parent
c04da22518
commit
279c941ee1
|
@ -1,29 +1,29 @@
|
||||||
<template>
|
<template>
|
||||||
<form class="ui form" @submit.prevent="submit()">
|
<form class="ui form" @submit.prevent="submit()">
|
||||||
<h4 v-if="title" class="ui header"><translate>Create a new playlist</translate></h4>
|
<h4 v-if="title" class="ui header"><translate :translate-context="'Popup/Playlist/Title/Verb'">Create a new playlist</translate></h4>
|
||||||
<div v-if="success" class="ui positive message">
|
<div v-if="success" class="ui positive message">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<template v-if="playlist">
|
<template v-if="playlist">
|
||||||
<translate>Playlist updated</translate>
|
<translate :translate-context="'Content/Playlist/Message'">Playlist updated</translate>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<translate>Playlist created</translate>
|
<translate :translate-context="'Content/Playlist/Message'">Playlist created</translate>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="errors.length > 0" class="ui negative message">
|
<div v-if="errors.length > 0" class="ui negative message">
|
||||||
<div class="header"><translate>We cannot create the playlist</translate></div>
|
<div class="header"><translate :translate-context="'Content/Playlist/Error message.Title'">The playlist could not be created</translate></div>
|
||||||
<ul class="list">
|
<ul class="list">
|
||||||
<li v-for="error in errors">{{ error }}</li>
|
<li v-for="error in errors">{{ error }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="three fields">
|
<div class="three fields">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label><translate>Playlist name</translate></label>
|
<label><translate :translate-context="'Content/Playlist/Input.Label'">Playlist name</translate></label>
|
||||||
<input name="name" v-model="name" required type="text" :placeholder="labels.placeholder" />
|
<input name="name" v-model="name" required type="text" :placeholder="labels.placeholder" />
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label><translate>Playlist visibility</translate></label>
|
<label><translate :translate-context="'Content/Playlist/Dropdown.Label'">Playlist visibility</translate></label>
|
||||||
<select class="ui dropdown" v-model="privacyLevel">
|
<select class="ui dropdown" v-model="privacyLevel">
|
||||||
<option :value="c.value" v-for="c in privacyLevelChoices">{{ c.label }}</option>
|
<option :value="c.value" v-for="c in privacyLevelChoices">{{ c.label }}</option>
|
||||||
</select>
|
</select>
|
||||||
|
@ -31,8 +31,8 @@
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label> </label>
|
<label> </label>
|
||||||
<button :class="['ui', 'fluid', {'loading': isLoading}, 'button']" type="submit">
|
<button :class="['ui', 'fluid', {'loading': isLoading}, 'button']" type="submit">
|
||||||
<template v-if="playlist"><translate>Update playlist</translate></template>
|
<template v-if="playlist"><translate :translate-context="'Content/Playlist/Button.Label/Verb'">Update playlist</translate></template>
|
||||||
<template v-else><translate>Create playlist</translate></template>
|
<template v-else><translate :translate-context="'Content/Playlist/Button.Label/Verb'">Create playlist</translate></template>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -71,22 +71,22 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
labels () {
|
labels () {
|
||||||
return {
|
return {
|
||||||
placeholder: this.$gettext('My awesome playlist')
|
placeholder: this.$pgettext('Content/Playlist/Input.Placeholder', 'My awesome playlist')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
privacyLevelChoices: function () {
|
privacyLevelChoices: function () {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
value: 'me',
|
value: 'me',
|
||||||
label: this.$gettext('Nobody except me')
|
label: this.$pgettext('Content/Playlist/Dropdown', 'Nobody except me')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'instance',
|
value: 'instance',
|
||||||
label: this.$gettext('Everyone on this instance')
|
label: this.$pgettext('Content/Playlist/Dropdown', 'Everyone on this instance')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'everyone',
|
value: 'everyone',
|
||||||
label: this.$gettext('Everyone')
|
label: this.$pgettext('Content/Playlist/Dropdown', 'Everyone')
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue