mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-11 14:30:20 -05:00
[web-src] Add option to only update a single library source
This commit is contained in:
@@ -26,33 +26,7 @@
|
||||
<!-- Right side -->
|
||||
<div class="level-right">
|
||||
<div v-if="library.updating"><a class="button is-small is-loading">Update</a></div>
|
||||
<div v-else class="dropdown is-right" :class="{ 'is-active': show_update_dropdown }" v-click-outside="onClickOutside">
|
||||
<div class="dropdown-trigger">
|
||||
<div class="buttons has-addons">
|
||||
<a @click="update" class="button is-small">Update</a>
|
||||
<a @click="show_update_dropdown = !show_update_dropdown" class="button is-small">
|
||||
<span class="icon"><i class="mdi" :class="{ 'mdi-chevron-down': !show_update_dropdown, 'mdi-chevron-up': show_update_dropdown }"></i></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown-menu" id="dropdown-menu" role="menu">
|
||||
<div class="dropdown-content">
|
||||
<div class="dropdown-item">
|
||||
<a @click="update" class="has-text-dark">
|
||||
<strong>Update</strong><br>
|
||||
<span class="is-size-7">Adds new, removes deleted and updates modified files.</span>
|
||||
</a>
|
||||
</div>
|
||||
<hr class="dropdown-divider">
|
||||
<div class="dropdown-item">
|
||||
<a @click="update_meta" class="has-text-dark">
|
||||
<strong>Rescan metadata</strong><br>
|
||||
<span class="is-size-7">Same as update, but also rescans unmodified files.</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else><a @click="showUpdateDialog()" class="button is-small">Update</a></div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -105,14 +79,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import webapi from '@/webapi'
|
||||
import * as types from '@/store/mutation_types'
|
||||
|
||||
export default {
|
||||
name: 'PageAbout',
|
||||
|
||||
data () {
|
||||
return {
|
||||
show_update_dropdown: false
|
||||
show_update_dropdown: false,
|
||||
show_update_library: false
|
||||
}
|
||||
},
|
||||
|
||||
@@ -129,15 +104,8 @@ export default {
|
||||
onClickOutside (event) {
|
||||
this.show_update_dropdown = false
|
||||
},
|
||||
|
||||
update: function () {
|
||||
this.show_update_dropdown = false
|
||||
webapi.library_update()
|
||||
},
|
||||
|
||||
update_meta: function () {
|
||||
this.show_update_dropdown = false
|
||||
webapi.library_rescan()
|
||||
showUpdateDialog () {
|
||||
this.$store.commit(types.SHOW_UPDATE_DIALOG, true)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -43,6 +43,12 @@
|
||||
</template>
|
||||
<template slot="heading-right">
|
||||
<div class="buttons is-centered">
|
||||
<a v-if="rss.tracks > 0" class="button is-small" @click="update_rss">
|
||||
<span class="icon">
|
||||
<i class="mdi mdi-refresh"></i>
|
||||
</span>
|
||||
<span>Update</span>
|
||||
</a>
|
||||
<a class="button is-small" @click="open_add_podcast_dialog">
|
||||
<span class="icon">
|
||||
<i class="mdi mdi-rss"></i>
|
||||
@@ -72,6 +78,7 @@ import ListItemTrack from '@/components/ListItemTrack'
|
||||
import ListAlbums from '@/components/ListAlbums'
|
||||
import ModalDialogTrack from '@/components/ModalDialogTrack'
|
||||
import ModalDialogAddRss from '@/components/ModalDialogAddRss'
|
||||
import * as types from '@/store/mutation_types'
|
||||
import RangeSlider from 'vue-range-slider'
|
||||
import webapi from '@/webapi'
|
||||
|
||||
@@ -106,6 +113,12 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
rss () {
|
||||
return this.$store.state.rss_count
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
play_track: function (track) {
|
||||
webapi.player_play_uri(track.uri, false)
|
||||
@@ -138,6 +151,11 @@ export default {
|
||||
this.albums = data
|
||||
this.reload_new_episodes()
|
||||
})
|
||||
},
|
||||
|
||||
update_rss: function () {
|
||||
this.$store.commit(types.UPDATE_DIALOG_SCAN_KIND, 'rss')
|
||||
this.$store.commit(types.SHOW_UPDATE_DIALOG, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user