diff --git a/src/components/views/LocalModList.vue b/src/components/views/LocalModList.vue index 7f21172cd..97f4fa9aa 100644 --- a/src/components/views/LocalModList.vue +++ b/src/components/views/LocalModList.vue @@ -37,88 +37,33 @@ - - - - - + + + @@ -250,6 +195,9 @@ import ConflictManagementProvider from '../../providers/generic/installing/Confl import Draggable from 'vuedraggable'; import DonateButton from '../../components/buttons/DonateButton.vue'; import SearchUtils from '../../utils/SearchUtils'; +import AssociatedModsModal from './LocalModList/AssociatedModsModal.vue'; +import DisableModModal from './LocalModList/DisableModModal.vue'; +import UninstallModModal from './LocalModList/UninstallModModal.vue'; @Component({ components: { @@ -258,7 +206,10 @@ import SearchUtils from '../../utils/SearchUtils'; Link, ExpandableCard, Modal, - Draggable + Draggable, + AssociatedModsModal, + DisableModModal, + UninstallModModal, } }) export default class LocalModList extends Vue { @@ -282,6 +233,7 @@ import SearchUtils from '../../utils/SearchUtils'; private selectedManifestMod: ManifestV2 | null = null; private dependencyListDisplayType: string = 'view'; private modBeingUninstalled: string | null = null; + private modBeingDisabled: string | null = null; // Filtering private sortDisabledPosition: SortLocalDisabledMods = this.settings.getInstalledDisablePosition(); @@ -459,14 +411,18 @@ import SearchUtils from '../../utils/SearchUtils'; LoggerProvider.instance.Log(LogSeverity.ACTION_STOPPED, `${err.name}\n-> ${err.message}`); } this.selectedManifestMod = null; + this.modBeingDisabled = null; } async performDisable(mods: ManifestV2[]): Promise { + this.modBeingDisabled = null; for (let mod of mods) { + this.modBeingDisabled = mod.getName(); const disableErr: R2Error | void = await ProfileInstallerProvider.instance.disableMod(mod, this.contextProfile!); if (disableErr instanceof R2Error) { // Failed to disable this.showingDependencyList = false; + this.modBeingDisabled = null; this.$emit('error', disableErr); return disableErr; } @@ -477,9 +433,11 @@ import SearchUtils from '../../utils/SearchUtils'; if (updatedList instanceof R2Error) { // Failed to update mod list. this.showingDependencyList = false; + this.modBeingDisabled = null; this.$emit('error', updatedList); return updatedList; } + this.modBeingDisabled = null; await this.updateModListAfterChange(updatedList); } @@ -497,6 +455,7 @@ import SearchUtils from '../../utils/SearchUtils'; let lastSuccess: ManifestV2[] | null = null; try { for (const mod of modsToUninstall) { + this.modBeingUninstalled = mod.getName(); const result = await this.performUninstallMod(mod, false); if (result instanceof R2Error) { this.$emit('error', result); diff --git a/src/components/views/LocalModList/AssociatedModsModal.vue b/src/components/views/LocalModList/AssociatedModsModal.vue new file mode 100644 index 000000000..e5fbee4f1 --- /dev/null +++ b/src/components/views/LocalModList/AssociatedModsModal.vue @@ -0,0 +1,62 @@ + + + + diff --git a/src/components/views/LocalModList/DisableModModal.vue b/src/components/views/LocalModList/DisableModModal.vue new file mode 100644 index 000000000..5f68d1a57 --- /dev/null +++ b/src/components/views/LocalModList/DisableModModal.vue @@ -0,0 +1,77 @@ + + + + diff --git a/src/components/views/LocalModList/UninstallModModal.vue b/src/components/views/LocalModList/UninstallModModal.vue new file mode 100644 index 000000000..b0b205280 --- /dev/null +++ b/src/components/views/LocalModList/UninstallModModal.vue @@ -0,0 +1,79 @@ + + + +