From 5c1cf84931e846980eae25084dc02b6fa85f6b63 Mon Sep 17 00:00:00 2001 From: O3H Date: Tue, 12 Nov 2024 15:57:50 +0000 Subject: [PATCH] get rid of old dev tools view --- frontend/src/i18n/locales/de.json | 3 +- frontend/src/i18n/locales/en.json | 1 + frontend/src/i18n/locales/es.json | 3 +- frontend/src/i18n/locales/fr.json | 3 +- frontend/src/i18n/locales/it.json | 3 +- frontend/src/util.ts | 6 +- frontend/src/views/ModDevTools.vue | 75 ------------------- frontend/src/views/SelectedGame.vue | 13 ++-- .../src/views/mod-dev-tools/Thunderstore.vue | 61 +++++++++------ 9 files changed, 55 insertions(+), 113 deletions(-) delete mode 100644 frontend/src/views/ModDevTools.vue diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.json index 7260ee6..150df09 100644 --- a/frontend/src/i18n/locales/de.json +++ b/frontend/src/i18n/locales/de.json @@ -51,7 +51,8 @@ "install": "Installieren", "cancel": "Stornieren", "import": "Import", - "export": "Export" + "export": "Export", + "refresh": "Aktualisieren" }, "languages": { "en": "Englisch", diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index a14475e..f85ece8 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -55,6 +55,7 @@ "reset-all-default": "Reset all to default" }, "keywords": { + "refresh": "Refresh", "favourite": "Favourite", "installed": "Installed", "setup": "Setup", diff --git a/frontend/src/i18n/locales/es.json b/frontend/src/i18n/locales/es.json index d2ede0b..3886d57 100644 --- a/frontend/src/i18n/locales/es.json +++ b/frontend/src/i18n/locales/es.json @@ -51,7 +51,8 @@ "install": "Instalar", "cancel": "Cancelar", "import": "Importar", - "export": "Exportar" + "export": "Exportar", + "refresh": "Refrescar" }, "languages": { "en": "Inglés", diff --git a/frontend/src/i18n/locales/fr.json b/frontend/src/i18n/locales/fr.json index 3b6a51e..74fbaa1 100644 --- a/frontend/src/i18n/locales/fr.json +++ b/frontend/src/i18n/locales/fr.json @@ -51,7 +51,8 @@ "install": "Installer", "cancel": "Annuler", "import": "Importer", - "export": "Exporter" + "export": "Exporter", + "refresh": "Rafraîchir" }, "languages": { "en": "Anglais", diff --git a/frontend/src/i18n/locales/it.json b/frontend/src/i18n/locales/it.json index 99bfbd1..87bd2e2 100644 --- a/frontend/src/i18n/locales/it.json +++ b/frontend/src/i18n/locales/it.json @@ -51,7 +51,8 @@ "install": "Installare", "cancel": "Cancellare", "import": "Importare", - "export": "Esportare" + "export": "Esportare", + "refresh": "Aggiorna" }, "languages": { "en": "Inglese", diff --git a/frontend/src/util.ts b/frontend/src/util.ts index 4deda96..4ce7ebe 100644 --- a/frontend/src/util.ts +++ b/frontend/src/util.ts @@ -1,11 +1,11 @@ import { OpenExternal } from "@backend/app/Application.js" -import Aura from '@primevue/themes/aura' -import { definePreset } from "@primevue/themes" import type { PresetOptions } from "@types" - import { type TooltipOptions } from "primevue/tooltip" +import Aura from '@primevue/themes/aura' +import { definePreset } from "@primevue/themes" + type AuraOptions = PresetOptions // PrimeVue v4 does not provide typings for actions currently. diff --git a/frontend/src/views/ModDevTools.vue b/frontend/src/views/ModDevTools.vue deleted file mode 100644 index d927a76..0000000 --- a/frontend/src/views/ModDevTools.vue +++ /dev/null @@ -1,75 +0,0 @@ - - - - - \ No newline at end of file diff --git a/frontend/src/views/SelectedGame.vue b/frontend/src/views/SelectedGame.vue index b8fe0dc..908f7ae 100644 --- a/frontend/src/views/SelectedGame.vue +++ b/frontend/src/views/SelectedGame.vue @@ -96,12 +96,12 @@ onMounted(async () => { configEditorDialog.setVisible(false) installingModDialog.setVisible(false) - //await refreshMods(true) + await refreshMods(true) }) const latestModVersion = (mod: thunderstore.StrippedPackage) => GetLatestPackageVersion(selectedGame.identifier, mod.owner, mod.name) - + const gameThumbnail = () => selectedGame.image ? `https://raw.githubusercontent.com/ebkr/r2modmanPlus/develop/src/assets/images/game_selection/${selectedGame.image}` : "https://raw.githubusercontent.com/ebkr/r2modmanPlus/develop/src/assets/images/game_selection/Titanfall2.jpg" @@ -130,17 +130,15 @@ const filterBySearch = (mods: thunderstore.StrippedPackage[]) => { const input = searchInput.value.trim() if (input == "") return mods - const lowerInput = input.toLowerCase() - return mods.filter(mod => { const lowerTitle = mod.name?.toLowerCase() ?? "" // Necessary to not show irrelevent mods with only 1 letter input. - if (input.length == 1 && !lowerTitle.startsWith(lowerInput)) { + if (input.length == 1 && !lowerTitle.startsWith(input.toLowerCase())) { return false } - return lowerTitle.includes(lowerInput) + return lowerTitle.includes(input.toLowerCase()) }) } @@ -312,7 +310,8 @@ const handleScroll = (e: WheelEvent) => {

No mods available! Something probably went wrong.

-