1
0

Refactor app component (#283)

Fix redirect to home

Move redirect to home to no auth component

Move setup stuff to separate functions

Renew token in authenticated component

Use vue's router object

Move auth type checks to computed properties

Move after route stuff to authenticated content component

More Cleanup

Cleanup

Hide the navigation on mobile in the navigation component

Load namespaces from inside the navigation component

Fix logout

Move not authenticated content to separate component

Fix favoriting lists

Move link share authenticated stuff to separate component

Move authenticated stuff to separate component

Move side navigation to separate component

Move top navigation bar to separate component

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/283
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
This commit is contained in:
konrad
2020-11-01 17:36:00 +00:00
parent 237a914dee
commit 588b4f507a
11 changed files with 627 additions and 479 deletions

View File

@ -1,6 +1,15 @@
import Vue from 'vue'
import Vuex from 'vuex'
import {CURRENT_LIST, ERROR_MESSAGE, HAS_TASKS, IS_FULLPAGE, LOADING, ONLINE} from './mutation-types'
import {
CURRENT_LIST,
ERROR_MESSAGE,
HAS_TASKS,
IS_FULLPAGE,
KEYBOARD_SHORTCUTS_ACTIVE,
LOADING,
MENU_ACTIVE,
ONLINE,
} from './mutation-types'
import config from './modules/config'
import auth from './modules/auth'
import namespaces from './modules/namespaces'
@ -33,6 +42,8 @@ export const store = new Vuex.Store({
currentList: {id: 0},
background: '',
hasTasks: false,
menuActive: true,
keyboardShortcutsActive: false,
},
mutations: {
[LOADING](state, loading) {
@ -97,5 +108,14 @@ export const store = new Vuex.Store({
[HAS_TASKS](state, hasTasks) {
state.hasTasks = hasTasks
},
[MENU_ACTIVE](state, menuActive) {
state.menuActive = menuActive
},
toggleMenu(state) {
state.menuActive = !state.menuActive
},
[KEYBOARD_SHORTCUTS_ACTIVE](state, active) {
state.keyboardShortcutsActive = active
},
},
})

View File

@ -4,6 +4,8 @@ export const ONLINE = 'online'
export const IS_FULLPAGE = 'isFullpage'
export const CURRENT_LIST = 'currentList'
export const HAS_TASKS = 'hasTasks'
export const MENU_ACTIVE = 'menuActive'
export const KEYBOARD_SHORTCUTS_ACTIVE = 'keyboardShortcutsActive'
export const CONFIG = 'config'
export const AUTH = 'auth'