aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/views/mods
diff options
context:
space:
mode:
Diffstat (limited to 'src-vue/src/views/mods')
-rw-r--r--src-vue/src/views/mods/LocalModsView.vue22
1 files changed, 4 insertions, 18 deletions
diff --git a/src-vue/src/views/mods/LocalModsView.vue b/src-vue/src/views/mods/LocalModsView.vue
index 2cd253ae..3fb90bdc 100644
--- a/src-vue/src/views/mods/LocalModsView.vue
+++ b/src-vue/src/views/mods/LocalModsView.vue
@@ -35,10 +35,10 @@
<script lang="ts">
import { invoke } from '@tauri-apps/api';
-import { ElNotification } from 'element-plus';
import { defineComponent } from 'vue';
import { GameInstall } from '../../utils/GameInstall';
import { NorthstarMod } from "../../../../src-tauri/bindings/NorthstarMod";
+import { showErrorNotification, showNotification } from '../../utils/ui';
export default defineComponent({
name: 'LocalModsView',
@@ -85,12 +85,7 @@ export default defineComponent({
})
}
catch (error) {
- ElNotification({
- title: this.$t('generic.error'),
- message: `${error}`,
- type: 'error',
- position: 'bottom-right'
- });
+ showErrorNotification(`${error}`);
this.global_load_indicator = false;
return false;
}
@@ -106,19 +101,10 @@ export default defineComponent({
await invoke("delete_northstar_mod", { gameInstall: game_install, nsmodName: mod.name })
.then((message) => {
// Just a visual indicator that it worked
- ElNotification({
- title: this.$t('mods.local.success_deleting', {modName: mod.name}),
- type: 'success',
- position: 'bottom-right'
- });
+ showNotification(this.$t('mods.local.success_deleting', {modName: mod.name}));
})
.catch((error) => {
- ElNotification({
- title: this.$t('generic.error'),
- message: error,
- type: 'error',
- position: 'bottom-right'
- });
+ showErrorNotification(error);
})
.finally(() => {
this.$store.commit('loadInstalledMods');