From bf90eb719e407b343638d8e3a0af7138f09b0ce3 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Sat, 22 Jan 2022 16:16:25 +0100 Subject: [PATCH 1/2] Remove obsolete loadConfig --- accounts/ui/store/index.js | 9 --------- settings/ui/store/index.js | 10 ---------- 2 files changed, 19 deletions(-) diff --git a/accounts/ui/store/index.js b/accounts/ui/store/index.js index a09e8532f2b..5c10837aa06 100644 --- a/accounts/ui/store/index.js +++ b/accounts/ui/store/index.js @@ -10,7 +10,6 @@ import { RoleService_ListRoles } from '../client/settings' import { injectAuthToken } from '../helpers/auth' const state = { - config: null, initialized: false, failed: false, accounts: {}, @@ -19,7 +18,6 @@ const state = { } const getters = { - config: state => state.config, isInitialized: state => state.initialized, hasFailed: state => state.failed, getAccountsSorted: state => { @@ -36,9 +34,6 @@ const getters = { } const mutations = { - LOAD_CONFIG (state, config) { - state.config = config - }, SET_INITIALIZED (state, value) { state.initialized = value }, @@ -81,10 +76,6 @@ const mutations = { } const actions = { - loadConfig ({ commit }, config) { - commit('LOAD_CONFIG', config) - }, - async initialize ({ commit, dispatch, getters }) { await Promise.all([ dispatch('fetchAccounts'), diff --git a/settings/ui/store/index.js b/settings/ui/store/index.js index 56271c40d7d..7aa1560f441 100644 --- a/settings/ui/store/index.js +++ b/settings/ui/store/index.js @@ -8,13 +8,11 @@ import axios from 'axios' import keyBy from 'lodash-es/keyBy' const state = { - config: null, initialized: false, bundles: {} } const getters = { - config: state => state.config, initialized: state => state.initialized, extensions: state => { return [...new Set(Object.values(state.bundles).map(bundle => bundle.extension))].sort() @@ -36,17 +34,9 @@ const mutations = { SET_BUNDLES (state, bundles) { state.bundles = keyBy(bundles, 'id') }, - LOAD_CONFIG (state, config) { - state.config = config - } } const actions = { - // Used by ocis-web. - loadConfig ({ commit }, config) { - commit('LOAD_CONFIG', config) - }, - async initialize ({ commit, dispatch }) { await dispatch('fetchBundles') commit('SET_INITIALIZED', true) From 0d207a9fcf2355bd3f663c5871161728ec754e0d Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Sun, 23 Jan 2022 20:49:53 +0100 Subject: [PATCH 2/2] Make linter happy --- settings/ui/store/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings/ui/store/index.js b/settings/ui/store/index.js index 7aa1560f441..c1e293104de 100644 --- a/settings/ui/store/index.js +++ b/settings/ui/store/index.js @@ -33,7 +33,7 @@ const mutations = { }, SET_BUNDLES (state, bundles) { state.bundles = keyBy(bundles, 'id') - }, + } } const actions = {