aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/views/mods/LocalModsView.vue
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2024-12-22 23:55:52 +0100
committerGeckoEidechse <gecko.eidechse+git@pm.me>2024-12-22 23:55:52 +0100
commitf1dee718da95836ffa5c0985c9e8f5643e0f3f6f (patch)
tree24967a28bcae1fc1e5b08da9f58bcc678ed52937 /src-vue/src/views/mods/LocalModsView.vue
parentcc5ae684221d3165479d7a68556a2bb6fa81cf3a (diff)
downloadFlightCore-f1dee718da95836ffa5c0985c9e8f5643e0f3f6f.tar.gz
FlightCore-f1dee718da95836ffa5c0985c9e8f5643e0f3f6f.zip
dev: Replace with sample Tauri 2.0 project
as a first step to convert FlightCore to Tauri 2.0
Diffstat (limited to 'src-vue/src/views/mods/LocalModsView.vue')
-rw-r--r--src-vue/src/views/mods/LocalModsView.vue72
1 files changed, 0 insertions, 72 deletions
diff --git a/src-vue/src/views/mods/LocalModsView.vue b/src-vue/src/views/mods/LocalModsView.vue
deleted file mode 100644
index 3979ca14..00000000
--- a/src-vue/src/views/mods/LocalModsView.vue
+++ /dev/null
@@ -1,72 +0,0 @@
-<template>
- <!-- Message displayed if no mod matched searched words -->
- <div v-if="mods.length === 0" class="noModMessage">
- {{ $t('mods.local.no_mods') }}
- </div>
-
- <el-scrollbar v-else>
- <el-button class="disableModsBtn" type="primary" @click="disableAllModsButCore">
- {{ $t('settings.repair.window.disable_all_but_core') }}
- </el-button>
- <local-mod-card v-for="mod of mods" v-bind:key="mod.name" :mod="mod" />
- </el-scrollbar>
-</template>
-
-<script lang="ts">
-import { defineComponent } from 'vue';
-import { invoke } from "@tauri-apps/api";
-import { NorthstarMod } from "../../../../src-tauri/bindings/NorthstarMod";
-import { fuzzy_filter } from "../../utils/filter";
-import { showErrorNotification, showNotification } from "../../utils/ui";
-import LocalModCard from "../../components/LocalModCard.vue";
-
-export default defineComponent({
- name: 'LocalModsView',
- components: { LocalModCard },
- computed: {
- installedMods(): NorthstarMod[] {
- return this.$store.state.installed_mods;
- },
- searchValue(): string {
- return this.$store.getters.searchWords;
- },
- mods(): NorthstarMod[] {
- if (this.searchValue.length === 0) {
- return this.installedMods;
- }
-
- return this.installedMods.filter((mod: NorthstarMod) => {
- return fuzzy_filter(mod.name, this.searchValue);
- });
- }
- },
- data() {
- return {
- global_load_indicator: false,
- };
- },
- methods: {
- async disableAllModsButCore() {
- await invoke("disable_all_but_core", { gameInstall: this.$store.state.game_install })
- .then((message) => {
- showNotification(this.$t('generic.success'), this.$t('settings.repair.window.disable_all_but_core_success'));
- this.$store.commit('loadInstalledMods');
- })
- .catch((error) => {
- showErrorNotification(error);
- });
- },
- },
- mounted() {
- this.$store.commit('loadInstalledMods');
- }
-})
-</script>
-
-<style scoped>
-.disableModsBtn {
- margin-bottom: 10px;
- top: 10px;
- position: sticky;
-}
-</style>