Skip to content

Commit

Permalink
fix: fix "<Add Booru>" option missing if user is not Premium
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Sep 1, 2021
1 parent 1261b54 commit fefbb0b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,31 +57,37 @@ export default {
booruGroupList() {
const BOORU_GROUP_LIST = []
// Default Booru list
const DOMAINS_FROM_DEFAULT_BOORU_LIST = this.getDefaultBooruList.map(
(BOORU) => BOORU.domain
)
// Default Booru list
const DEFAULT_BOORU_GROUP = {
name: 'Default',
domains: DOMAINS_FROM_DEFAULT_BOORU_LIST,
}
BOORU_GROUP_LIST.push(DEFAULT_BOORU_GROUP)
// Premium Booru list
const DOMAINS_FROM_PREMIUM_BOORU_LIST = this.getPremiumBooruList.map(
(BOORU) => BOORU.domain
)
// Premium Booru list
const PREMIUM_BOORU_GROUP = {
name: 'Custom',
domains: [...DOMAINS_FROM_PREMIUM_BOORU_LIST, '<Add Booru>'],
domains: ['<Add Booru>'],
}
if (this.isUserPremium) {
BOORU_GROUP_LIST.push(PREMIUM_BOORU_GROUP)
PREMIUM_BOORU_GROUP.domains = [
...DOMAINS_FROM_PREMIUM_BOORU_LIST,
...PREMIUM_BOORU_GROUP.domains,
]
}
BOORU_GROUP_LIST.push(PREMIUM_BOORU_GROUP)
return BOORU_GROUP_LIST
},
},
Expand Down

0 comments on commit fefbb0b

Please sign in to comment.