diff --git a/src/components/views/LocalModList/LocalModCard.vue b/src/components/views/LocalModList/LocalModCard.vue index bf4bc7082..05cbca581 100644 --- a/src/components/views/LocalModList/LocalModCard.vue +++ b/src/components/views/LocalModList/LocalModCard.vue @@ -23,6 +23,7 @@ export default class LocalModCard extends Vue { disabledDependencies: ManifestV2[] = []; missingDependencies: string[] = []; + disableChangePending = false; get donationLink() { return this.tsMod ? this.tsMod.getDonationLink() : undefined; @@ -69,11 +70,17 @@ export default class LocalModCard extends Vue { } async disableMod() { + if (this.disableChangePending) { + return; + } + + this.disableChangePending = true; const dependants = Dependants.getDependantList(this.mod, this.localModList); for (const mod of dependants) { if (mod.isEnabled()) { this.$store.commit('openDisableModModal', this.mod); + this.disableChangePending = false; return; } } @@ -89,9 +96,16 @@ export default class LocalModCard extends Vue { severity: LogSeverity.ACTION_STOPPED }); } + + this.disableChangePending = false; } async enableMod(mod: ManifestV2) { + if (this.disableChangePending) { + return; + } + + this.disableChangePending = true; const dependencies = Dependants.getDependencyList(mod, this.localModList); try { @@ -105,6 +119,8 @@ export default class LocalModCard extends Vue { severity: LogSeverity.ACTION_STOPPED }); } + + this.disableChangePending = false; } async uninstallMod() { @@ -220,12 +236,12 @@ function dependencyStringToModName(x: string) {
- - +