diff --git a/src/lang/en.js b/src/lang/en.js index cb82b4cd..f1ef9c8a 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -438,7 +438,8 @@ export default { removeSettingConfirmation: 'Are you sure you want to remove this setting\'s value from the database?', changeImage: 'Change image', uploadImage: 'Upload image', - remove: 'Remove' + remove: 'Remove', + instancePanel: 'Instance Panel Document' }, invites: { inviteTokens: 'Invite tokens', diff --git a/src/store/modules/settings.js b/src/store/modules/settings.js index f6ea4873..eac8a161 100644 --- a/src/store/modules/settings.js +++ b/src/store/modules/settings.js @@ -85,7 +85,7 @@ const settings = { actions: { async FetchInstanceDocument({ commit, getters }, name) { const { data } = await getInstanceDocument(name, getters.authHost, getters.token) - commit('SET_INSTANCE_PANEL', data.url) + commit('SET_INSTANCE_PANEL', data) }, async FetchSettings({ commit, getters }) { commit('SET_LOADING', true) @@ -105,8 +105,9 @@ const settings = { commit('TOGGLE_TABS', false) commit('SET_LOADING', false) }, - async RemoveInstanceDocument({ getters }, name) { + async RemoveInstanceDocument({ dispatch, getters }, name) { await deleteInstanceDocument(name, getters.authHost, getters.token) + await dispatch('FetchInstanceDocument', 'instance-panel') }, async RemoveSetting({ commit, getters }, configs) { await removeSettings(configs, getters.authHost, getters.token) @@ -130,7 +131,8 @@ const settings = { commit('TOGGLE_REBOOT', response.data.need_reboot) commit('CLEAR_UPDATED_SETTINGS') }, - async UpdateInstanceDocs({ getters }, { name, content }) { + async UpdateInstanceDocs({ commit, getters }, { name, content }) { + commit('SET_INSTANCE_PANEL', content) const formData = new FormData() const blob = new Blob([content], { type: 'text/html' }) formData.append('file', blob) diff --git a/src/views/settings/components/Instance.vue b/src/views/settings/components/Instance.vue index c3f7fece..2e897c55 100644 --- a/src/views/settings/components/Instance.vue +++ b/src/views/settings/components/Instance.vue @@ -1,9 +1,9 @@