1
0

feat: move user settings to multiple components (#889)

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/889
Co-authored-by: konrad <k@knt.li>
Co-committed-by: konrad <k@knt.li>
This commit is contained in:
konrad
2021-10-26 20:58:02 +00:00
parent e1a7fb4999
commit 5040a76781
16 changed files with 703 additions and 477 deletions

View File

@ -2,6 +2,7 @@ import {CONFIG} from '../mutation-types'
import {HTTPFactory} from '@/http-common'
import {objectToCamelCase} from '@/helpers/case'
import {redirectToProvider} from '../../helpers/redirectToProvider'
import {parseURL} from 'ufo'
export default {
namespaced: true,
@ -35,6 +36,13 @@ export default {
},
},
}),
getters: {
migratorsEnabled: state => state.availableMigrators?.length > 0,
apiBase() {
const {host, protocol} = parseURL(window.API_URL)
return protocol + '//' + host
},
},
mutations: {
[CONFIG](state, config) {
state.version = config.version
@ -63,7 +71,7 @@ export default {
async update(ctx) {
const HTTP = HTTPFactory()
const { data: info } = await HTTP.get('info')
const {data: info} = await HTTP.get('info')
ctx.commit(CONFIG, info)
return info
},