diff --git a/src/components/settings_modal/tabs/general_tab.js b/src/components/settings_modal/tabs/general_tab.js index 763a588d..bbff74b2 100644 --- a/src/components/settings_modal/tabs/general_tab.js +++ b/src/components/settings_modal/tabs/general_tab.js @@ -137,7 +137,7 @@ const GeneralTab = { createSettingsProfile () { this.$store.dispatch('setOption', { name: 'profile', value: this.newProfileName }) this.$store.dispatch('setOption', { name: 'profileVersion', value: 1 }) - this.$store.dispatch('syncSettings') + // this.$store.dispatch('syncSettings') this.newProfileName = '' }, forceSync () { diff --git a/src/modules/api.js b/src/modules/api.js index 352d7774..61a39c79 100644 --- a/src/modules/api.js +++ b/src/modules/api.js @@ -316,10 +316,10 @@ const api = { }) }, listSettingsProfiles (store) { - store.state.backendInteractor.listSettingsProfiles({ store }) - .then((data) => { - store.commit('setInstanceOption', { name: 'settingsProfiles', value: data }) - }) + // store.state.backendInteractor.listSettingsProfiles({ store }) + // .then((data) => { + // store.commit('setInstanceOption', { name: 'settingsProfiles', value: data }) + // }) }, // Pleroma websocket setWsToken (store, token) { diff --git a/src/modules/config.js b/src/modules/config.js index 45d42dc4..48a79ef3 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -216,7 +216,7 @@ const config = { setOption ({ commit, dispatch }, { name, value, manual }) { commit('setOption', { name, value }) if (manual === true) { - dispatch('syncSettings') + // dispatch('syncSettings') } switch (name) { case 'theme': @@ -237,34 +237,34 @@ const config = { } }, getSettingsProfile (store, forceUpdate = false) { - const profile = store.state.profile - store.rootState.api.backendInteractor.getSettingsProfile({ store, profileName: profile }) - .then(({ settings, version }) => { - console.log('found settings version', version) - if (forceUpdate || (version > store.state.profileVersion)) { - store.commit('setOption', { name: 'profileVersion', value: version }) - Object.entries(settings).forEach(([name, value]) => { - if (store.state[name] !== value) { - store.dispatch('setOption', { name, value }) - } - }) - } else { - console.log('settings are up to date') - } - }) - .catch((err) => { - console.error(`could not fetch profile ${profile}`, err) - if (err.statusCode === 404) { - // create profile - store.dispatch('pushGlobalNotice', { - level: 'warning', - messageKey: 'settings_profile.creating', - messageArgs: { profile }, - timeout: 5000 - }) - store.dispatch('syncSettings') - } - }) + // const profile = store.state.profile + // store.rootState.api.backendInteractor.getSettingsProfile({ store, profileName: profile }) + // .then(({ settings, version }) => { + // console.log('found settings version', version) + // if (forceUpdate || (version > store.state.profileVersion)) { + // store.commit('setOption', { name: 'profileVersion', value: version }) + // Object.entries(settings).forEach(([name, value]) => { + // if (store.state[name] !== value) { + // store.dispatch('setOption', { name, value }) + // } + // }) + // } else { + // console.log('settings are up to date') + // } + // }) + // .catch((err) => { + // console.error(`could not fetch profile ${profile}`, err) + // if (err.statusCode === 404) { + // // create profile + // store.dispatch('pushGlobalNotice', { + // level: 'warning', + // messageKey: 'settings_profile.creating', + // messageArgs: { profile }, + // timeout: 5000 + // }) + // // store.dispatch('syncSettings') + // } + // }) } } } diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 5adf1c66..7950b698 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -1548,15 +1548,15 @@ const getSettingsProfile = ({ profileName, credentials }) => { } const saveSettingsProfile = ({ profileName, credentials, settings, version }) => { - return promisedRequest({ - url: AKKOMA_SETTING_PROFILE_URL(profileName), - method: 'PUT', - credentials, - payload: { - settings, - version - } - }) + // return promisedRequest({ + // url: AKKOMA_SETTING_PROFILE_URL(profileName), + // method: 'PUT', + // credentials, + // payload: { + // settings, + // version + // } + // }) } const deleteSettingsProfile = ({ profileName, credentials }) => {