Skip to content

Commit

Permalink
fix mutating prop directly by removing loading spinner
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hartmann <[email protected]>
  • Loading branch information
Chartman123 committed Nov 30, 2023
1 parent 0283add commit 7a44402
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/FormsSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,35 +87,21 @@ export default {
/**
* Similar procedures on**Change:
*
* - Show corresponding switch as loading
* - Update value via api
* - Only after everything is done (incl. possible reload on failure), unset loading.
*
* @param {boolean|Array} newVal The resp. new Value to store.
*/
async onRestrictCreationChange(newVal) {
const el = this.$refs.switchRestrictCreation
el.loading = true
await this.saveAppConfig('restrictCreation', newVal)
el.loading = false
},
async onCreationAllowedGroupsChange(newVal) {
const el = this.$refs.switchRestrictCreation
el.loading = true
await this.saveAppConfig('creationAllowedGroups', newVal.map(group => group.groupId))
el.loading = false
},
async onAllowPublicLinkChange(newVal) {
const el = this.$refs.switchAllowPublicLink
el.loading = true
await this.saveAppConfig('allowPublicLink', newVal)
el.loading = false
},
async onAllowPermitAllChange(newVal) {
const el = this.$refs.switchAllowPermitAll
el.loading = true
await this.saveAppConfig('allowPermitAll', newVal)
el.loading = false
},

/**
Expand Down

0 comments on commit 7a44402

Please sign in to comment.