mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-28 21:18:54 +03:00
perf: Sort tags alphabetically (#683) @Larsluph
This commit is contained in:
parent
2784ab97cf
commit
3d1415deab
2 changed files with 3 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<v-dialog v-model="dialog" scrollable max-width="750px" :content-class="isPhone ? 'rounded-0' : 'rounded-form'" :fullscreen="isPhone">
|
||||
<v-dialog v-model="dialog" scrollable max-width="750px" :content-class="phoneLayout ? 'rounded-0' : 'rounded-form'" :fullscreen="phoneLayout">
|
||||
<v-card>
|
||||
<v-card-title class="pa-0">
|
||||
<v-toolbar-title class="ma-4 primarytext--text">
|
||||
|
@ -52,9 +52,6 @@ export default {
|
|||
...mapGetters(['getTorrent']),
|
||||
torrent() {
|
||||
return this.getTorrent(this.hash)
|
||||
},
|
||||
isPhone() {
|
||||
return this.$vuetify.breakpoint.xsOnly
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -75,7 +72,7 @@ export default {
|
|||
isUrl() {
|
||||
this.enableUrlDecode = false
|
||||
if (this.name.indexOf(' ') === -1) {
|
||||
const exp = /\+|%/
|
||||
const exp = /[+%]/
|
||||
if (exp.test(this.name)) this.enableUrlDecode = true
|
||||
}
|
||||
},
|
||||
|
|
|
@ -141,7 +141,7 @@ export class QBitApi {
|
|||
}
|
||||
|
||||
async getAvailableTags(): Promise<string[]> {
|
||||
return this.axios.get('/torrents/tags').then(res => res.data)
|
||||
return this.axios.get('/torrents/tags').then(res => res.data.sort((a: string, b: string) => a.localeCompare(b.toLowerCase(), undefined, {sensitivity: 'base'})))
|
||||
}
|
||||
|
||||
async getTorrentProperties(hash: string): Promise<TorrentProperties> {
|
||||
|
|
Loading…
Reference in a new issue