diff --git a/components/Elements/Dropdown.vue b/components/Elements/Dropdown.vue index e1885c6..ae0bded 100644 --- a/components/Elements/Dropdown.vue +++ b/components/Elements/Dropdown.vue @@ -66,7 +66,7 @@ } .dropdown-link { - @apply w-full flex flex-row flex-no-wrap items-center justify-start; + @apply w-full h-full flex flex-row flex-no-wrap items-center justify-start; } .dropdown-link:hover>* { @@ -84,7 +84,6 @@ .dropdown-menu { @apply absolute z-10 overflow-y-auto py-4 my-4 bg-white; top: 100%; - left: 40px; background-clip: padding-box; } diff --git a/components/Lists/AppAll.vue b/components/Lists/AppAll.vue index 4b8ad9c..9fe610e 100644 --- a/components/Lists/AppAll.vue +++ b/components/Lists/AppAll.vue @@ -1,8 +1,8 @@ + diff --git a/pages/apps/index.vue b/pages/apps/index.vue index 8fa078a..cbe77c5 100644 --- a/pages/apps/index.vue +++ b/pages/apps/index.vue @@ -3,15 +3,15 @@
- +
@@ -31,81 +31,36 @@ return this.$store.getters.getPages.find((page) => page.page_id == 'apps') }, allApps() { - let list = this.$store.state.apps.list - if (this.active != 'all') { - let filteredList = list.filter((item) => { - return item.category.name == this.active - }) - return filteredList - } else { - return list - } + return this.$store.state.apps.list }, popularApps() { - let list = this.$store.state.apps.popular - if (this.active != 'all') { - let filteredList = list.filter((item) => { - return item.category.name == this.active - }) - return filteredList - } else { - return list - } + return this.$store.state.apps.popular }, spotlightApps() { - let list = this.$store.state.apps.spotlight - if (this.active != 'all') { - let filteredList = list.filter((item) => { - return item.category.name == this.active - }) - return filteredList - } else { - return list - } - }, - publishers() { - return this.$store.state.apps.publishers + return this.$store.state.apps.spotlight }, categories() { return this.$store.state.apps.categories }, activeCat() { - let hash = this.$route.hash.replace('#', '') - let cat = this.categories.find((cat) => { - return cat.name == hash - }) - if (cat && hash != '#all') { - this.active = hash - this.activeCatTitle = cat['title_' + this.$i18n.locale] - } else { - this.active = 'all' - this.activeCatTitle = this.$t('all') - } return this.active } }, async fetch() { let list = this.$store.state.apps.list let categories = this.$store.state.apps.categories - let publishers = this.$store.state.apps.publishers if (list.length < 1) { await this.$store.dispatch("apps/fetch") } if (categories.length < 1) { await this.$store.dispatch('apps/fetchCategories') } - if (publishers.length < 1) { - await this.$store.dispatch('apps/fetchPublishers') - } }, methods: { - setActiveCat(value, title) { - this.active = value - this.activeCatTitle = title - if (value == 'all') { - this.$router.push('') - } else { - this.$router.push('#' + value) + setActiveCat(value) { + if (value != 'all') { + let path = this.localePath('/apps/category/' + value) + this.$router.push(path) } } }