Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix mutating prop directly by removing loading spinner #1812

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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