[web-src] "add podcast" dialog updates

This commit is contained in:
chme 2020-04-12 09:37:32 +02:00
parent af2c79a2f4
commit 1d24622c99
2 changed files with 15 additions and 10 deletions

View File

@ -6,20 +6,22 @@
<div class="modal-content fd-modal-card"> <div class="modal-content fd-modal-card">
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
<p class="title is-4">RSS feed</p> <p class="title is-4">Add Podcast RSS feed URL</p>
<form class="fd-has-margin-bottom"> <form @submit.prevent="add_stream">
<div class="field"> <div class="field">
<p class="control is-expanded has-icons-left"> <p class="control is-expanded has-icons-left">
<input class="input is-shadowless" type="text" placeholder="http://url-to-rss" v-model="url" :disabled="loading" ref="url_field"> <input class="input is-shadowless" type="text" placeholder="http://url-to-rss" v-model="url" :disabled="loading" ref="url_field">
<span class="icon is-left"> <span class="icon is-left">
<i class="mdi mdi-rss-box"></i> <i class="mdi mdi-rss"></i>
</span> </span>
</p> </p>
<p class="help">Adding a podcast includes creating an RSS playlist, that will allow forked-daapd to manage the podcast subscription.
</p>
</div> </div>
</form> </form>
</div> </div>
<footer class="card-footer" v-if="loading"> <footer class="card-footer" v-if="loading">
<a class="card-footer-item has-text-dark"> <a class="card-footer-item button is-loading">
<span class="icon"><i class="mdi mdi-web"></i></span> <span class="is-size-7">Processing ...</span> <span class="icon"><i class="mdi mdi-web"></i></span> <span class="is-size-7">Processing ...</span>
</a> </a>
</footer> </footer>
@ -27,7 +29,7 @@
<a class="card-footer-item has-text-danger" @click="$emit('close')"> <a class="card-footer-item has-text-danger" @click="$emit('close')">
<span class="icon"><i class="mdi mdi-cancel"></i></span> <span class="is-size-7">Cancel</span> <span class="icon"><i class="mdi mdi-cancel"></i></span> <span class="is-size-7">Cancel</span>
</a> </a>
<a class="card-footer-item has-text-dark" @click="add_stream"> <a class="card-footer-item has-background-info has-text-white has-text-weight-bold" @click="add_stream">
<span class="icon"><i class="mdi mdi-playlist-plus"></i></span> <span class="is-size-7">Add</span> <span class="icon"><i class="mdi mdi-playlist-plus"></i></span> <span class="is-size-7">Add</span>
</a> </a>
</footer> </footer>
@ -58,7 +60,7 @@ export default {
this.loading = true this.loading = true
webapi.library_add(this.url).then(() => { webapi.library_add(this.url).then(() => {
this.$emit('close') this.$emit('close')
this.$emit('rss_change') this.$emit('podcast_added')
this.url = '' this.url = ''
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false

View File

@ -43,11 +43,11 @@
</template> </template>
<template slot="heading-right"> <template slot="heading-right">
<div class="buttons is-centered"> <div class="buttons is-centered">
<a class="button is-small" @click="open_add_stream_dialog"> <a class="button is-small" @click="open_add_podcast_dialog">
<span class="icon"> <span class="icon">
<i class="mdi mdi-rss"></i> <i class="mdi mdi-rss"></i>
</span> </span>
<span>RSS Subscriptions</span> <span>Add Podcast</span>
</a> </a>
</div> </div>
</template> </template>
@ -77,7 +77,10 @@
<p class="is-size-7">(This will also remove the RSS playlist <b>{{ rss_playlist_to_remove.name }}</b>.)</p> <p class="is-size-7">(This will also remove the RSS playlist <b>{{ rss_playlist_to_remove.name }}</b>.)</p>
</template> </template>
</modal-dialog> </modal-dialog>
<modal-dialog-add-rss :show="show_url_modal" @close="show_url_modal = false" @rss_change="reload_podcasts"/> <modal-dialog-add-rss
:show="show_url_modal"
@close="show_url_modal = false"
@podcast_added="reload_podcasts" />
</template> </template>
</content-with-heading> </content-with-heading>
</div> </div>
@ -158,7 +161,7 @@ export default {
this.new_episodes.items = { } this.new_episodes.items = { }
}, },
open_add_stream_dialog: function (item) { open_add_podcast_dialog: function (item) {
this.show_url_modal = true this.show_url_modal = true
}, },