logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 947b73f8702ff4b7c5f74620204e86a4f375315c
parent ac32997f8b17ba3f2209c992c27394c48a1594c7
Author: Henry Jameson <me@hjkos.com>
Date:   Sun, 12 Mar 2023 16:55:39 +0200

minimize the rest of the sharedcomputedobject

Diffstat:

Msrc/components/settings_modal/helpers/shared_computed_object.js14+++-----------
1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/components/settings_modal/helpers/shared_computed_object.js b/src/components/settings_modal/helpers/shared_computed_object.js @@ -1,18 +1,10 @@ -import { defaultState as configDefaultState } from 'src/modules/config.js' - const SharedComputedObject = () => ({ user () { return this.$store.state.users.currentUser }, - // Generating computed values for vuex properties - ...Object.keys(configDefaultState) - .map(key => [key, { - get () { return this.$store.getters.mergedConfig[key] }, - set (value) { - this.$store.dispatch('setOption', { name: key, value }) - } - }]) - .reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {}) + expertLevel () { + return this.$store.getters.mergedConfig.expertLevel > 0 + } }) export default SharedComputedObject