mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-25 10:55:50 +03:00
perf: add refresh icon to RSS feeds (#709)
This commit is contained in:
parent
97f77050f0
commit
a583b42d68
2 changed files with 25 additions and 4 deletions
|
@ -8,12 +8,17 @@
|
|||
<v-list-item-content>
|
||||
<v-list-item-title v-text="item.name" />
|
||||
</v-list-item-content>
|
||||
<v-list-item-action>
|
||||
<v-list-item-action class="icon">
|
||||
<v-icon @click="updateFeed(item)">
|
||||
{{ mdiSync }}
|
||||
</v-icon>
|
||||
</v-list-item-action>
|
||||
<v-list-item-action class="icon">
|
||||
<v-icon @click="editFeed(item)">
|
||||
{{ mdiPencil }}
|
||||
</v-icon>
|
||||
</v-list-item-action>
|
||||
<v-list-item-action>
|
||||
<v-list-item-action class="icon">
|
||||
<v-icon color="red" @click="deleteFeed(item)">
|
||||
{{ mdiDelete }}
|
||||
</v-icon>
|
||||
|
@ -34,7 +39,7 @@
|
|||
<script lang="ts">
|
||||
import { mapGetters } from 'vuex'
|
||||
import qbit from '@/services/qbit'
|
||||
import { mdiDelete, mdiPencil } from '@mdi/js'
|
||||
import { mdiDelete, mdiPencil, mdiSync } from '@mdi/js'
|
||||
|
||||
import { Tab, General, FullScreenModal } from '@/mixins'
|
||||
import { Feed } from '@/types/vuetorrent'
|
||||
|
@ -45,7 +50,8 @@ export default defineComponent({
|
|||
mixins: [Tab, General, FullScreenModal],
|
||||
data: () => ({
|
||||
mdiPencil,
|
||||
mdiDelete
|
||||
mdiDelete,
|
||||
mdiSync
|
||||
}),
|
||||
computed: {
|
||||
...mapGetters(['getFeeds']),
|
||||
|
@ -60,6 +66,9 @@ export default defineComponent({
|
|||
activeMethod() {
|
||||
this.$store.commit('FETCH_FEEDS')
|
||||
},
|
||||
async updateFeed(item: Feed) {
|
||||
await qbit.refreshFeed(item.name)
|
||||
},
|
||||
editFeed(item: Feed) {
|
||||
this.createModal('FeedForm', { initialFeed: { url: item.url, name: item.name } })
|
||||
},
|
||||
|
@ -73,3 +82,9 @@ export default defineComponent({
|
|||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.icon {
|
||||
margin-left: 16px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -210,6 +210,12 @@ export class QBitApi {
|
|||
})
|
||||
}
|
||||
|
||||
async refreshFeed(itemPath: string) {
|
||||
await this.execute('rss/refreshItem', {
|
||||
itemPath
|
||||
})
|
||||
}
|
||||
|
||||
// Post
|
||||
|
||||
async addTorrents(params: AddTorrentPayload, torrents: File[]): Promise<void> {
|
||||
|
|
Loading…
Reference in a new issue