mirror of
https://github.com/CzBiX/qb-web.git
synced 2026-02-03 10:34:23 +08:00
support qb without tags feature, fix #151
This commit is contained in:
@@ -111,7 +111,8 @@ const store = new Vuex.Store<RootState>({
|
||||
}
|
||||
|
||||
const finalTags: any[] = []
|
||||
for (const tag of state.mainData.tags) {
|
||||
const tags = state.mainData.tags ?? [];
|
||||
for (const tag of tags) {
|
||||
finalTags.push({
|
||||
"key": tag,
|
||||
"name": tag,
|
||||
@@ -125,6 +126,10 @@ const store = new Vuex.Store<RootState>({
|
||||
torrentGroupByTag(state, getters) {
|
||||
const result: Record<string, Torrent[]> = {}
|
||||
for (const torrent of getters.allTorrents) {
|
||||
if (!torrent.tags) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const tags: string[] = torrent.tags.split(', ');
|
||||
tags.forEach(tag => {
|
||||
let list: Torrent[] = result[tag]
|
||||
|
||||
Reference in New Issue
Block a user