mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-03-31 05:43:33 +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-content>
|
||||||
<v-list-item-title v-text="item.name" />
|
<v-list-item-title v-text="item.name" />
|
||||||
</v-list-item-content>
|
</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)">
|
<v-icon @click="editFeed(item)">
|
||||||
{{ mdiPencil }}
|
{{ mdiPencil }}
|
||||||
</v-icon>
|
</v-icon>
|
||||||
</v-list-item-action>
|
</v-list-item-action>
|
||||||
<v-list-item-action>
|
<v-list-item-action class="icon">
|
||||||
<v-icon color="red" @click="deleteFeed(item)">
|
<v-icon color="red" @click="deleteFeed(item)">
|
||||||
{{ mdiDelete }}
|
{{ mdiDelete }}
|
||||||
</v-icon>
|
</v-icon>
|
||||||
|
@ -34,7 +39,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import qbit from '@/services/qbit'
|
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 { Tab, General, FullScreenModal } from '@/mixins'
|
||||||
import { Feed } from '@/types/vuetorrent'
|
import { Feed } from '@/types/vuetorrent'
|
||||||
|
@ -45,7 +50,8 @@ export default defineComponent({
|
||||||
mixins: [Tab, General, FullScreenModal],
|
mixins: [Tab, General, FullScreenModal],
|
||||||
data: () => ({
|
data: () => ({
|
||||||
mdiPencil,
|
mdiPencil,
|
||||||
mdiDelete
|
mdiDelete,
|
||||||
|
mdiSync
|
||||||
}),
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['getFeeds']),
|
...mapGetters(['getFeeds']),
|
||||||
|
@ -60,6 +66,9 @@ export default defineComponent({
|
||||||
activeMethod() {
|
activeMethod() {
|
||||||
this.$store.commit('FETCH_FEEDS')
|
this.$store.commit('FETCH_FEEDS')
|
||||||
},
|
},
|
||||||
|
async updateFeed(item: Feed) {
|
||||||
|
await qbit.refreshFeed(item.name)
|
||||||
|
},
|
||||||
editFeed(item: Feed) {
|
editFeed(item: Feed) {
|
||||||
this.createModal('FeedForm', { initialFeed: { url: item.url, name: item.name } })
|
this.createModal('FeedForm', { initialFeed: { url: item.url, name: item.name } })
|
||||||
},
|
},
|
||||||
|
@ -73,3 +82,9 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</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
|
// Post
|
||||||
|
|
||||||
async addTorrents(params: AddTorrentPayload, torrents: File[]): Promise<void> {
|
async addTorrents(params: AddTorrentPayload, torrents: File[]): Promise<void> {
|
||||||
|
|
Loading…
Add table
Reference in a new issue