mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-29 05:28:53 +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>
|
<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>
|
||||||
<v-card-title class="pa-0">
|
<v-card-title class="pa-0">
|
||||||
<v-toolbar-title class="ma-4 primarytext--text">
|
<v-toolbar-title class="ma-4 primarytext--text">
|
||||||
|
@ -52,9 +52,6 @@ export default {
|
||||||
...mapGetters(['getTorrent']),
|
...mapGetters(['getTorrent']),
|
||||||
torrent() {
|
torrent() {
|
||||||
return this.getTorrent(this.hash)
|
return this.getTorrent(this.hash)
|
||||||
},
|
|
||||||
isPhone() {
|
|
||||||
return this.$vuetify.breakpoint.xsOnly
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -75,7 +72,7 @@ export default {
|
||||||
isUrl() {
|
isUrl() {
|
||||||
this.enableUrlDecode = false
|
this.enableUrlDecode = false
|
||||||
if (this.name.indexOf(' ') === -1) {
|
if (this.name.indexOf(' ') === -1) {
|
||||||
const exp = /\+|%/
|
const exp = /[+%]/
|
||||||
if (exp.test(this.name)) this.enableUrlDecode = true
|
if (exp.test(this.name)) this.enableUrlDecode = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -141,7 +141,7 @@ export class QBitApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAvailableTags(): Promise<string[]> {
|
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> {
|
async getTorrentProperties(hash: string): Promise<TorrentProperties> {
|
||||||
|
|
Loading…
Reference in a new issue