diff --git a/webapp/components/Dropdown.vue b/webapp/components/Dropdown.vue
index 9df50cb3f..e10a45bf0 100644
--- a/webapp/components/Dropdown.vue
+++ b/webapp/components/Dropdown.vue
@@ -33,7 +33,7 @@ export default {
data() {
return {
isPopoverOpen: false,
- developperNoAutoClosing: true, // Wolle // stops automatic closing of menu for developper purposes: default is 'false'
+ developperNoAutoClosing: false, // stops automatic closing of menu for developper purposes: default is 'false'
}
},
computed: {
diff --git a/webapp/components/FilterMenu/FilterMenu.vue b/webapp/components/FilterMenu/FilterMenu.vue
index d65815346..9b12aa5f2 100644
--- a/webapp/components/FilterMenu/FilterMenu.vue
+++ b/webapp/components/FilterMenu/FilterMenu.vue
@@ -16,7 +16,7 @@
diff --git a/webapp/pages/index.spec.js b/webapp/pages/index.spec.js
index 79deb3b80..740bf535c 100644
--- a/webapp/pages/index.spec.js
+++ b/webapp/pages/index.spec.js
@@ -24,23 +24,6 @@ describe('PostIndex', () => {
store = new Vuex.Store({
getters: {
'posts/filter': () => ({}),
- // Wolle
- // 'posts/orderOptions': () => () => [
- // {
- // key: 'store.posts.orderBy.oldest.label',
- // label: 'store.posts.orderBy.oldest.label',
- // icon: 'sort-amount-asc',
- // value: 'createdAt_asc',
- // },
- // {
- // key: 'store.posts.orderBy.newest.label',
- // label: 'store.posts.orderBy.newest.label',
- // icon: 'sort-amount-desc',
- // value: 'createdAt_desc',
- // },
- // ],
- // 'posts/selectedOrder': () => () => 'createdAt_desc',
- // 'posts/orderIcon': () => 'sort-amount-desc',
'posts/orderBy': () => 'createdAt_desc',
'auth/user': () => {
return { id: 'u23' }
@@ -119,11 +102,6 @@ describe('PostIndex', () => {
localVue,
})
})
-
- // Wolle it('calls store when using order by menu', () => {
- // wrapper.findAll('li').at(0).trigger('click')
- // expect(mutations['posts/SELECT_ORDER']).toHaveBeenCalledWith({}, 'createdAt_asc')
- // })
})
})
})
diff --git a/webapp/pages/index.vue b/webapp/pages/index.vue
index 4d2168fa4..7041f0fa5 100644
--- a/webapp/pages/index.vue
+++ b/webapp/pages/index.vue
@@ -97,7 +97,6 @@ import HcEmpty from '~/components/Empty/Empty'
import PostTeaser from '~/components/PostTeaser/PostTeaser.vue'
import MasonryGrid from '~/components/MasonryGrid/MasonryGrid.vue'
import MasonryGridItem from '~/components/MasonryGrid/MasonryGridItem.vue'
-// Wolle import { mapGetters, mapMutations } from 'vuex'
import { mapGetters } from 'vuex'
import { filterPosts } from '~/graphql/PostQuery.js'
import UpdateQuery from '~/components/utils/UpdateQuery'
@@ -130,24 +129,8 @@ export default {
computed: {
...mapGetters({
postsFilter: 'posts/filter',
- // Wolle care for the store !!! orderOptions: 'posts/orderOptions',
orderBy: 'posts/orderBy',
- // Wolle selectedOrder: 'posts/selectedOrder',
- // Wolle sortingIcon: 'posts/orderIcon',
}),
- // Wolle selected: {
- // get() {
- // return this.selectedOrder(this)
- // },
- // set({ value }) {
- // this.offset = 0
- // this.posts = []
- // this.selectOrder(value)
- // },
- // },
- // Wolle sortingOptions() {
- // return this.orderOptions(this)
- // },
finalFilters() {
let filter = this.postsFilter
if (this.hashtag) {
@@ -164,9 +147,6 @@ export default {
},
watchQuery: ['hashtag'],
methods: {
- // Wolle ...mapMutations({
- // selectOrder: 'posts/SELECT_ORDER',
- // }),
clearSearch() {
this.$router.push({ path: '/' })
this.hashtag = null
diff --git a/webapp/store/posts.js b/webapp/store/posts.js
index b9efe1870..5d9891eff 100644
--- a/webapp/store/posts.js
+++ b/webapp/store/posts.js
@@ -7,25 +7,11 @@ import clone from 'lodash/clone'
const defaultFilter = {}
-// Wolle const orderOptions = {
-// createdAt_asc: {
-// value: 'createdAt_asc',
-// key: 'store.posts.orderBy.oldest.label',
-// icon: 'sort-amount-asc',
-// },
-// createdAt_desc: {
-// value: 'createdAt_desc',
-// key: 'store.posts.orderBy.newest.label',
-// icon: 'sort-amount-desc',
-// },
-// }
-
export const state = () => {
return {
filter: {
...defaultFilter,
},
- // Wolle order: orderOptions.createdAt_desc,
order: 'createdAt_desc',
}
}
@@ -78,7 +64,6 @@ export const mutations = {
state.filter = filter
},
TOGGLE_ORDER(state, value) {
- // Wolle state.order = orderOptions[value]
state.order = value
},
}
@@ -102,24 +87,7 @@ export const getters = {
filteredByEmotions(state) {
return get(state.filter, 'emotions_some.emotion_in') || []
},
- // Wolle orderOptions: (state) => ({ $t }) =>
- // Object.values(orderOptions).map((option) => {
- // return {
- // ...option,
- // label: $t(option.key),
- // }
- // }),
- // Wolle selectedOrder: (state) => ({ $t }) => {
- // return {
- // ...state.order,
- // label: $t(state.order.key),
- // }
- // },
orderBy(state) {
- // return state.order.value
return state.order
},
- // Wolle orderIcon(state) {
- // return state.order.icon
- // },
}
diff --git a/webapp/store/posts.spec.js b/webapp/store/posts.spec.js
index b74798c84..ed728bdd8 100644
--- a/webapp/store/posts.spec.js
+++ b/webapp/store/posts.spec.js
@@ -80,35 +80,9 @@ describe('getters', () => {
})
})
- // Wolle describe('orderByOptions', () => {
- // it('returns all options regardless of current state', () => {
- // const $t = jest.fn((t) => t)
- // expect(getters.orderOptions()({ $t })).toEqual([
- // {
- // key: 'store.posts.orderBy.oldest.label',
- // label: 'store.posts.orderBy.oldest.label',
- // icon: 'sort-amount-asc',
- // value: 'createdAt_asc',
- // },
- // {
- // key: 'store.posts.orderBy.newest.label',
- // label: 'store.posts.orderBy.newest.label',
- // icon: 'sort-amount-desc',
- // value: 'createdAt_desc',
- // },
- // ])
- // })
- // })
-
describe('orderBy', () => {
it('returns value for graphql query', () => {
state = {
- // Wolle order: {
- // key: 'store.posts.orderBy.newest.label',
- // label: 'store.posts.orderBy.newest.label',
- // icon: 'sort-amount-desc',
- // value: 'createdAt_desc',
- // },
order: 'createdAt_desc',
}
expect(getters.orderBy(state)).toEqual('createdAt_desc')