Lots of fixes - see trello (#347)

* A ton of fixes

* Fix project deletion message
This commit is contained in:
Geometrically
2022-01-28 18:11:34 -07:00
committed by GitHub
parent 643cd87706
commit 86f37863a7
25 changed files with 1132 additions and 741 deletions

35
store/cosmetics.js Normal file
View File

@@ -0,0 +1,35 @@
const parameters = {
maxAge: 60 * 60 * 24 * 365 * 10, // Ten years
sameSite: 'Strict',
secure: true,
httpOnly: false,
path: '/',
}
export const state = () => ({
searchLayout: false,
projectLayout: false,
})
export const mutations = {
SET_SEARCH_LAYOUT(state, searchLayout) {
state.searchLayout = searchLayout
},
SET_PROJECT_LAYOUT(state, projectLayout) {
state.projectLayout = projectLayout
},
}
export const actions = {
fetchCosmetics({ commit }, $cookies) {
commit('SET_PROJECT_LAYOUT', $cookies.get('project-layout'))
commit('SET_SEARCH_LAYOUT', $cookies.get('search-layout'))
},
save({ commit }, { projectLayout, searchLayout, $cookies }) {
commit('SET_PROJECT_LAYOUT', projectLayout)
commit('SET_SEARCH_LAYOUT', searchLayout)
$cookies.set('project-layout', projectLayout, parameters)
$cookies.set('search-layout', searchLayout, parameters)
},
}