diff options
Diffstat (limited to 'src-vue/src')
-rw-r--r-- | src-vue/src/components/LanguageSelector.vue | 8 | ||||
-rw-r--r-- | src-vue/src/components/ThunderstoreModCard.vue | 4 | ||||
-rw-r--r-- | src-vue/src/i18n/lang/da.json | 166 | ||||
-rw-r--r-- | src-vue/src/i18n/lang/de.json | 12 | ||||
-rw-r--r-- | src-vue/src/i18n/lang/en.json | 17 | ||||
-rw-r--r-- | src-vue/src/i18n/lang/es.json | 166 | ||||
-rw-r--r-- | src-vue/src/i18n/lang/fr.json | 22 | ||||
-rw-r--r-- | src-vue/src/i18n/lang/pl.json | 18 | ||||
-rw-r--r-- | src-vue/src/i18n/lang/ru.json | 23 | ||||
-rw-r--r-- | src-vue/src/i18n/lang/vi.json | 1 | ||||
-rw-r--r-- | src-vue/src/i18n/lang/zh_Hans.json | 16 | ||||
-rw-r--r-- | src-vue/src/main.ts | 4 | ||||
-rw-r--r-- | src-vue/src/plugins/store.ts | 24 | ||||
-rw-r--r-- | src-vue/src/utils/InstallType.ts | 8 | ||||
-rw-r--r-- | src-vue/src/views/ChangelogView.vue | 4 | ||||
-rw-r--r-- | src-vue/src/views/DeveloperView.vue | 14 | ||||
-rw-r--r-- | src-vue/src/views/RepairView.vue | 14 | ||||
-rw-r--r-- | src-vue/src/views/SettingsView.vue | 74 |
18 files changed, 557 insertions, 38 deletions
diff --git a/src-vue/src/components/LanguageSelector.vue b/src-vue/src/components/LanguageSelector.vue index 4f275369..0c47e674 100644 --- a/src-vue/src/components/LanguageSelector.vue +++ b/src-vue/src/components/LanguageSelector.vue @@ -35,6 +35,10 @@ export default defineComponent({ label: 'Deutsch' }, { + value: 'es', + label: 'Español' + }, + { value: 'pl', label: 'polski' }, @@ -47,6 +51,10 @@ export default defineComponent({ label: 'Italiano' }, { + value: 'da', + label: 'Dansk' + }, + { value: 'zh_Hans', label: '简体中文' }, diff --git a/src-vue/src/components/ThunderstoreModCard.vue b/src-vue/src/components/ThunderstoreModCard.vue index 30ffbc68..54241e85 100644 --- a/src-vue/src/components/ThunderstoreModCard.vue +++ b/src-vue/src/components/ThunderstoreModCard.vue @@ -312,4 +312,8 @@ export default defineComponent({ margin-left: 10px; height: auto; } + +.image { + background-color: lightgray; +} </style> diff --git a/src-vue/src/i18n/lang/da.json b/src-vue/src/i18n/lang/da.json new file mode 100644 index 00000000..33486bce --- /dev/null +++ b/src-vue/src/i18n/lang/da.json @@ -0,0 +1,166 @@ +{ + "menu": { + "changelog": "Ændringslog", + "mods": "Mods", + "settings": "Indstillinger", + "dev": "Dev", + "play": "Spil" + }, + "generic": { + "yes": "Ja", + "no": "Nej", + "error": "Fejl", + "cancel": "afbryd", + "informationShort": "Info", + "downloading": "Henter", + "success": "Succes", + "extracting": "Udpakker", + "done": "Færdig" + }, + "play": { + "button": { + "select_game_dir": "Vælg Titanfall2 spil mappe", + "install": "Installere", + "installing": "Installer...", + "update": "Opdater", + "updating": "Opdatere...", + "ready_to_play": "Start spil", + "northstar_is_running": "Spillet køre" + }, + "unknown_version": "Ukendt version", + "see_patch_notes": "Se patch noter", + "players": "Spillere", + "servers": "Servere", + "northstar_running": "Northstar køre", + "ea_app_running": "EA appen køre", + "unable_to_load_playercount": "Kan ikke hente antallet af spillere" + }, + "mods": { + "local": { + "no_mods": "Ingen mods blev fundet.", + "delete_confirm": "Er du sikker på at du vil slette dette mod?", + "delete": "Slet", + "success_deleting": "Sletningen af {modName} lykkedes", + "part_of_ts_mod": "Dette Northstar mod er en del af et Thunderstore mod" + }, + "online": { + "no_match": "Der er ikke fundet nogen matchende mod.", + "try_another_search": "Prøv en anden søgning!" + }, + "menu": { + "local": "Lokal", + "online": "Online", + "filter": "Filter", + "search": "Søg", + "sort_mods": "Sorter mods", + "select_categories": "Vælg kategorier", + "sort": { + "name_asc": "navn (A til Z)", + "name_desc": "navn (Z til A)", + "date_asc": "Dato (fra ældste)", + "most_downloaded": "Mest hentet", + "top_rated": "bedst bedømt", + "date_desc": "Dato (fra nyeste)" + } + }, + "card": { + "button": { + "being_installed": "Installerer...", + "being_updated": "Opdaterer...", + "installed": "Installeret", + "install": "Installere", + "outdated": "Opdater" + }, + "by": "af", + "more_info": "Mere info", + "remove": "Fjern mod", + "remove_dialog_title": "Advarsel", + "remove_success": "Fjernet {modName}", + "install_success": "Installeret {modName}", + "remove_dialog_text": "Fjern Thunderstore mod?" + } + }, + "settings": { + "manage_install": "Administrer installation", + "choose_folder": "Vælg installationsmappe", + "open_game_folder": "Åben mappe", + "nb_ts_mods_per_page": "Antal Thunderstore-mods pr. side", + "nb_ts_mods_reset": "Nulstil til standard", + "language": "Sprog", + "language_select": "Vælg dit yndlingssprog", + "about": "Om:", + "flightcore_version": "FlightCore version:", + "testing": "Tester:", + "enable_test_channels": "Aktiver testudgivelseskanaler", + "dev_mode_enabled_title": "Pas på!", + "dev_mode_enabled_text": "Udviklertilstand aktiveret.", + "show_deprecated_mods": "Vis forældede Thunderstore-mods", + "show_deprecated_mods_desc2": "Pas på, sådanne mods er normalt forældet af en god grund.", + "profile": { + "active": "Aktiv profil", + "edit": "Rediger profiler", + "dialog": { + "title": "Profiler" + } + }, + "repair": { + "title": "Reparere", + "open_window": "Åbn reparationsvinduet", + "window": { + "title": "FlightCore reparationsvinduet", + "disable_all_but_core": "Deaktiver alle undtagen kernemods", + "disable_all_but_core_success": "Deaktiverede alle mods undtagen kernemods", + "disable_modsettings": "Deaktiver ModSettings mod", + "disable_modsettings_success": "Deaktiver ModSettings mod", + "force_reinstall_ns": "Tving geninstallation Northstar", + "force_delete_temp_dl": "Tving sletning af midlertidig download-mappe", + "delete_persistent_store": "Slet FlightCore persistent indhold", + "reinstall_title": "Tving geninstallation af Northstar", + "reinstall_text": "Vent lidt", + "reinstall_success": "Northstar blev geninstalleret", + "warning": "Dette vindue indeholder forskellige funktioner til at reparere almindelige problemer med Northstar og FlightCore.", + "kill_northstar_process": "Dræb, der kører Northstar/Titanfall2-processen" + } + }, + "nb_ts_mods_per_page_desc1": "Dette har en indvirkning på skærmydelsen, når du gennemser Thunderstore-mods.", + "nb_ts_mods_per_page_desc2": "Indstil denne værdi til 0 for at deaktivere paginering.", + "show_deprecated_mods_desc1": "Dette giver dig mulighed for at se forældede mods i online-mods-samlingen." + }, + "notification": { + "game_folder": { + "new": { + "title": "Ny spil mappe", + "text": "Spilmappen blev opdateret." + }, + "wrong": { + "title": "Forkert mappe", + "text": "Den valgte mappe er ikke en gyldig Titanfall2 Installation." + }, + "not_found": { + "title": "Titanfall2 ikke fundet!", + "text": "Vælg venligst installationsstedet manuelt" + } + }, + "profile": { + "invalid": { + "title": "Ugyldig profil", + "text": "Den profil, du forsøgte at skifte til, er ikke længere gyldig." + } + }, + "flightcore_outdated": { + "title": "FlightCore forældet!", + "text": "Opdater venligst FlightCore.\nKører forældet version {oldVersion}.\nNyeste er {newVersion}!" + } + }, + "channels": { + "release": { + "switch": { + "text": "Skiftet udgivelseskanal til \"{canal}\"." + } + }, + "names": { + "Northstar": "Northstar", + "NorthstarReleaseCandidate": "Northstar udgivelseskandidat" + } + } +} diff --git a/src-vue/src/i18n/lang/de.json b/src-vue/src/i18n/lang/de.json index e8392452..c830ae5a 100644 --- a/src-vue/src/i18n/lang/de.json +++ b/src-vue/src/i18n/lang/de.json @@ -107,14 +107,22 @@ "force_reinstall_ns": "Northstar reinstallieren", "force_delete_temp_dl": "Temporären FlightCore Downloadordner löschen", "delete_persistent_store": "FlightCore Einstellungen zurücksetzen", + "kill_northstar_process": "Laufenden Northstar/Titanfall2 Prozess beenden", "reinstall_title": "Northstar wird neu installiert", "reinstall_text": "Bitte warten", - "reinstall_success": "Northstar erfolgreich neu installiert" + "reinstall_success": "Northstar erfolgreich neu installiert", + "disable_modsettings_success": "Der Mod ModSettings wurde deaktiviert", + "disable_modsettings": "Deaktiviere den ModSettings Mod" } }, "show_deprecated_mods_desc1": "Damit werden veraltete Mods in der Online-Mods-Ansicht sichtbar.", "show_deprecated_mods_desc2": "Aber Vorsicht, solche Mods sind normalerweise aus gutem Grund als veraltet markiert.", - "show_deprecated_mods": "Veraltete Thunderstore mods anzeigen" + "show_deprecated_mods": "Veraltete Thunderstore mods anzeigen", + "profile": { + "dialog": { + "title": "Profile" + } + } }, "notification": { "game_folder": { diff --git a/src-vue/src/i18n/lang/en.json b/src-vue/src/i18n/lang/en.json index 470e98be..2b056655 100644 --- a/src-vue/src/i18n/lang/en.json +++ b/src-vue/src/i18n/lang/en.json @@ -110,6 +110,15 @@ "show_deprecated_mods_desc1": "This allows you to see deprecated mods in the online mods collection.", "show_deprecated_mods_desc2": "Watch out, such mods are usually deprecated for a good reason.", + "profile": { + "active": "Active Profile", + "edit": "Edit Profiles", + + "dialog": { + "title": "Profiles" + } + }, + "repair": { "title": "Repair", "open_window": "Open repair window", @@ -124,6 +133,7 @@ "force_reinstall_ns": "Force reinstall Northstar", "force_delete_temp_dl": "Force delete temp download folder", "delete_persistent_store": "Delete FlightCore persistent store", + "kill_northstar_process": "Kill running Northstar/Titanfall2 process", "reinstall_title": "Force reinstalling Northstar", "reinstall_text": "Please wait", "reinstall_success": "Successfully reinstalled Northstar" @@ -149,6 +159,13 @@ } }, + "profile": { + "invalid": { + "title": "Invalid Profile", + "text": "The profile you tried to switch to is no longer valid." + } + }, + "flightcore_outdated": { "title": "FlightCore outdated!", "text": "Please update FlightCore.\nRunning outdated version {oldVersion}.\nNewest is {newVersion}!" diff --git a/src-vue/src/i18n/lang/es.json b/src-vue/src/i18n/lang/es.json new file mode 100644 index 00000000..ac34fcd4 --- /dev/null +++ b/src-vue/src/i18n/lang/es.json @@ -0,0 +1,166 @@ +{ + "menu": { + "mods": "Modificaciones", + "settings": "Opciones", + "dev": "Desarrollador", + "play": "Jugar", + "changelog": "Cambios" + }, + "generic": { + "yes": "Sí", + "no": "No", + "error": "Error", + "cancel": "Cancelar", + "informationShort": "Información", + "extracting": "Extrayendo", + "done": "Listo", + "success": "Éxito", + "downloading": "Descargando" + }, + "play": { + "button": { + "northstar_is_running": "El juego ya se está ejecutando", + "install": "Instalar", + "update": "Actualizar", + "select_game_dir": "Seleccione carpeta base de Titanfall 2", + "ready_to_play": "Jugar ahora", + "installing": "Instalando...", + "updating": "Actualizando..." + }, + "ea_app_running": "La aplicación de EA ya se está ejecutando:", + "unknown_version": "Versión Desconocida", + "see_patch_notes": "Ver las notas del parche", + "players": "jugadores", + "servers": "servidores", + "northstar_running": "Northstar ya se está ejecutando:", + "unable_to_load_playercount": "Cantidad de jugadores no disponible" + }, + "mods": { + "local": { + "no_mods": "No hay mods encontrados.", + "delete_confirm": "¿Estás segur@ que quieres eliminar este mod?", + "delete": "Eliminar", + "success_deleting": "{modName} Ha sido eliminado correctamente", + "part_of_ts_mod": "Este mod de Northstar es parte de un mod de la ThunderStore" + }, + "online": { + "no_match": "No hay mods coincidentes.", + "try_another_search": "Intente otra busqueda!" + }, + "menu": { + "local": "Local", + "online": "En línea", + "filter": "FIltro", + "search": "Búsqueda", + "sort_mods": "Ordenar mods", + "select_categories": "Seleccionar categorías", + "sort": { + "name_asc": "Por nombre (de la A a la Z)", + "date_asc": "Por fecha (desde la más antigua)", + "date_desc": "Por fecha (desde la más reciente)", + "most_downloaded": "Los más descargados", + "top_rated": "Mejor valorados", + "name_desc": "Por nombre (de la Z a la A)" + } + }, + "card": { + "button": { + "being_installed": "Instalando...", + "being_updated": "Actualizando...", + "installed": "Instalado", + "outdated": "Actualizar", + "install": "Instalar" + }, + "by": "por", + "remove": "Quitar mod", + "remove_dialog_title": "Advertencia", + "remove_dialog_text": "Eliminar mod de la ThunderStore?", + "install_success": "{modName} Instalado", + "more_info": "Mas información", + "remove_success": "{modName} Ha sido eliminado" + } + }, + "settings": { + "manage_install": "Administrar instalación", + "choose_folder": "Elegir carpeta de instalación", + "open_game_folder": "Abrir carpeta", + "nb_ts_mods_per_page": "Numero de mods por página de ThunderStore", + "nb_ts_mods_per_page_desc2": "Poner valor en 0 para desactivar la paginación.", + "nb_ts_mods_reset": "Reestablecer por defecto", + "language": "Idioma", + "language_select": "Seleccionar idioma favorito", + "about": "Acerca de:", + "flightcore_version": "Versión de FlightCore:", + "testing": "Probando:", + "enable_test_channels": "Activar liberación de canales", + "dev_mode_enabled_title": "¡Cuidado!", + "dev_mode_enabled_text": "Modo de desarrollador activado.", + "show_deprecated_mods_desc1": "Esto permite ver mods obsoletos de la colección online de ThunderStore.", + "show_deprecated_mods_desc2": "Cuidado, estos mods suelen estar obsoletos por una buena razón.", + "profile": { + "active": "Perfil activo", + "edit": "Editar perfiles", + "dialog": { + "title": "Perfiles" + } + }, + "repair": { + "title": "Reparar", + "window": { + "title": "Ventana de reparación de FlightCore", + "disable_all_but_core": "Desactivar todos los mods excepto los principales", + "disable_all_but_core_success": "Desactivados todos los mods excepto el núcleo", + "disable_modsettings": "Desactivar ModSettings", + "disable_modsettings_success": "ModSettings desactivado", + "force_reinstall_ns": "Forzar reinstalación de Northstar", + "force_delete_temp_dl": "Forzar la eliminación de la carpeta temporal de descargas", + "delete_persistent_store": "Borrar el almacén persistente de FlightCore", + "reinstall_title": "Forzar la reinstalación de Northstar", + "reinstall_text": "Espere, por favor", + "reinstall_success": "Northstar reinstalado con éxito", + "warning": "Esta ventana tiene varias funciones para reparar problemas comunes con Northstar y FlightCore.", + "kill_northstar_process": "Finalizar proceso de Northstar/Titanfall 2" + }, + "open_window": "Abrir la ventana de reparación" + }, + "nb_ts_mods_per_page_desc1": "Esto puede tener impactos en fluidez al buscar mods en la ThunderStore.", + "show_deprecated_mods": "Mostrar mods the ThunderStore obsoletos" + }, + "notification": { + "game_folder": { + "new": { + "title": "Nueva carpeta de juego", + "text": "La carpeta de juego fue actualizada exitosamente." + }, + "wrong": { + "title": "Carpeta equivocada", + "text": "La carpeta seleccionada no es una carpeta de Titanfall2 válida." + }, + "not_found": { + "title": "Titanfall 2 no encontrado!", + "text": "Por favor seleccione manualmente el lugar de instalación" + } + }, + "profile": { + "invalid": { + "title": "Perfil inválido", + "text": "El perfil de cambio anterior ya no es válido." + } + }, + "flightcore_outdated": { + "title": "FlightCore desactualizado!", + "text": "Por favor actualize FlightCore.\nEsta versión esta desactualizada {oldVersion}\nLa versión mas nueva es {newVersion}!" + } + }, + "channels": { + "release": { + "switch": { + "text": "El canal seleccionado se cambió a \"{canal}\"." + } + }, + "names": { + "Northstar": "Northstar", + "NorthstarReleaseCandidate": "Candidato de nueva versión de Northstar" + } + } +} diff --git a/src-vue/src/i18n/lang/fr.json b/src-vue/src/i18n/lang/fr.json index 1ba1b679..dbb34e80 100644 --- a/src-vue/src/i18n/lang/fr.json +++ b/src-vue/src/i18n/lang/fr.json @@ -74,7 +74,7 @@ "by": "par", "more_info": "Plus d'informations", "remove": "Supprimer le mod", - "remove_dialog_title": "Attention !", + "remove_dialog_title": "Attention", "remove_dialog_text": "Voulez-vous vraiment supprimer ce mod Thunderstore ?", "remove_success": "{modName} supprimé", "install_success": "{modName} installé" @@ -111,12 +111,20 @@ "reinstall_text": "Veuillez patienter", "reinstall_success": "Northstar réinstallé avec succès", "disable_modsettings": "Désactiver le mod ModSettings", - "disable_modsettings_success": "Mod ModSettings désactivé" + "disable_modsettings_success": "Mod ModSettings désactivé", + "kill_northstar_process": "Arrêter le processus en cous de Northstar/Titanfall2" } }, "show_deprecated_mods": "Montrer les mods Thunderstore dépréciés", "show_deprecated_mods_desc1": "Ce paramètre vous permet d'afficher les mods Thunderstore dépréciés dans la collection de mods.", - "show_deprecated_mods_desc2": "Attention, les mods dépréciés le sont généralement pour une bonne raison." + "show_deprecated_mods_desc2": "Attention, les mods dépréciés le sont généralement pour une bonne raison.", + "profile": { + "active": "Profile actif", + "edit": "Éditer les profiles", + "dialog": { + "title": "Profiles" + } + } }, "notification": { "game_folder": { @@ -135,7 +143,13 @@ }, "flightcore_outdated": { "title": "Mise à jour disponible !", - "text": "Veuillez mettre à jour FlightCore.\nVersion actuelle : {oldVersion}.\nNouvelle version : {newVersion}." + "text": "Veuillez mettre à jour FlightCore.\nVersion actuelle : {oldVersion}.\nNouvelle version : {newVersion} !" + }, + "profile": { + "invalid": { + "text": "Le profile sur lequel vous essayez de basculer n'est plus valide.", + "title": "Profile invalide" + } } }, "channels": { diff --git a/src-vue/src/i18n/lang/pl.json b/src-vue/src/i18n/lang/pl.json index f13d9ae3..c11c7f06 100644 --- a/src-vue/src/i18n/lang/pl.json +++ b/src-vue/src/i18n/lang/pl.json @@ -109,14 +109,22 @@ "title": "Okno naprawy FlightCore", "warning": "To okno zawiera różne funkcje do naprawy typowych problemów z Northstar i FlightCore.", "disable_modsettings": "Wyłącz moda ModSettings", - "disable_modsettings_success": "Wyłączono moda ModSettings" + "disable_modsettings_success": "Wyłączono moda ModSettings", + "kill_northstar_process": "Zamknij uruchomiony proces Northstar/Titanfall2" } }, "nb_ts_mods_per_page_desc1": "Ma to wpływ na wydajność wyświetlania podczas przeglądania modów Thunderstore.", "open_game_folder": "Otwórz folder", "show_deprecated_mods_desc2": "Ostrożnie, mody są zazwyczaj oznaczone jako przestarzałe nie bez powodu.", "show_deprecated_mods": "Pokaż przestarzałe mody Thunderstore", - "show_deprecated_mods_desc1": "Pozwala to zobaczyć przestarzałe mody w kolekcji modów online." + "show_deprecated_mods_desc1": "Pozwala to zobaczyć przestarzałe mody w kolekcji modów online.", + "profile": { + "active": "Aktywny profil", + "dialog": { + "title": "Profile" + }, + "edit": "Edytuj profile" + } }, "notification": { "game_folder": { @@ -136,6 +144,12 @@ "flightcore_outdated": { "title": "FlightCore nieaktualny!", "text": "Proszę zaktualizować FlightCore.\nUruchomiono przestarzałą wersję {oldVersion}.\nNajnowsza to {newVersion}!" + }, + "profile": { + "invalid": { + "title": "Nieprawidłowy profil", + "text": "Profil, na który próbowano się przełączyć, nie jest już prawidłowy." + } } }, "channels": { diff --git a/src-vue/src/i18n/lang/ru.json b/src-vue/src/i18n/lang/ru.json index c17cb388..7fadd0a7 100644 --- a/src-vue/src/i18n/lang/ru.json +++ b/src-vue/src/i18n/lang/ru.json @@ -102,7 +102,10 @@ "disable_all_but_core": "Выключить все моды, кроме главных", "warning": "Это окно содержит различные функции для устранения часто возникающих проблем с Northstar и FlightCore.", "force_delete_temp_dl": "Принудительно удалить папку с временными загрузками", - "reinstall_success": "Нордстар успешно переустановлен" + "reinstall_success": "Нордстар успешно переустановлен", + "disable_modsettings": "Выключить мод ModSettings", + "disable_modsettings_success": "Выключен мод ModSettings", + "kill_northstar_process": "Закрыть запущенный Northstar/Titanfall 2" }, "title": "Починка" }, @@ -111,7 +114,17 @@ "nb_ts_mods_per_page": "Количество модов Thunderstore на каждую страницу", "nb_ts_mods_per_page_desc2": "Установите это значение на 0, чтобы отключить страницы.", "flightcore_version": "Версия FlightCore:", - "dev_mode_enabled_text": "Включен режим разработчика." + "dev_mode_enabled_text": "Включен режим разработчика.", + "show_deprecated_mods": "Показать устаревшие моды Thunderstore", + "show_deprecated_mods_desc1": "Это позволяет вам видеть устаревшие моды в меню онлайн модов.", + "show_deprecated_mods_desc2": "Внимание, такие моды обычно устаревшие по хорошей причине.", + "profile": { + "active": "Активный Профиль", + "edit": "Редактировать Профили", + "dialog": { + "title": "Профили" + } + } }, "notification": { "game_folder": { @@ -131,6 +144,12 @@ "flightcore_outdated": { "title": "FlightCore устарел!", "text": "Пожалуйста, обновите FlightCore\nСейчас запущена старая версия - {oldVersion}.\nНовейшая версия - {newVersion}!" + }, + "profile": { + "invalid": { + "title": "Некорректный Профиль", + "text": "Профиль, на который вы пытаетесь переключиться, больше не является корректным." + } } }, "channels": { diff --git a/src-vue/src/i18n/lang/vi.json b/src-vue/src/i18n/lang/vi.json deleted file mode 100644 index 0967ef42..00000000 --- a/src-vue/src/i18n/lang/vi.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/src-vue/src/i18n/lang/zh_Hans.json b/src-vue/src/i18n/lang/zh_Hans.json index 6447a6cf..57221973 100644 --- a/src-vue/src/i18n/lang/zh_Hans.json +++ b/src-vue/src/i18n/lang/zh_Hans.json @@ -113,9 +113,17 @@ "reinstall_text": "请耐心等待", "reinstall_success": "成功重装Northstar", "force_reinstall_ns": "强制重装Northstar", - "reinstall_title": "正在强制重装Northstar" + "reinstall_title": "正在强制重装Northstar", + "kill_northstar_process": "终止正在运行的 Northstar/Titanfall2 进程" }, "open_window": "打开修复工具" + }, + "profile": { + "active": "当前用户配置", + "edit": "编辑用户配置", + "dialog": { + "title": "用户配置" + } } }, "notification": { @@ -136,6 +144,12 @@ "flightcore_outdated": { "title": "FlightCore需要更新!", "text": "请更新FlightCore.\n正在运行旧版本 {oldVersion}.\n最新版本为 {newVersion}!" + }, + "profile": { + "invalid": { + "title": "无效用户配置", + "text": "您尝试切换到的用户配置已失效。" + } } }, "channels": { diff --git a/src-vue/src/main.ts b/src-vue/src/main.ts index b595f21c..73219c9d 100644 --- a/src-vue/src/main.ts +++ b/src-vue/src/main.ts @@ -13,7 +13,9 @@ import RepairView from "./views/RepairView.vue"; import {createRouter, createWebHashHistory} from "vue-router"; import en from "./i18n/lang/en.json"; import fr from "./i18n/lang/fr.json"; +import da from "./i18n/lang/da.json"; import de from "./i18n/lang/de.json"; +import es from "./i18n/lang/es.json"; import pl from "./i18n/lang/pl.json"; import ru from "./i18n/lang/ru.json"; import it from "./i18n/lang/it.json"; @@ -27,7 +29,7 @@ export const i18n = createI18n({ locale: 'en', fallbackLocale: 'en', messages: { - en, fr, de, pl, ru, it, zh_Hans + en, fr, da, de, es, pl, ru, it, zh_Hans } }); app.use(i18n); diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts index b28dd5a8..b0eaaf65 100644 --- a/src-vue/src/plugins/store.ts +++ b/src-vue/src/plugins/store.ts @@ -1,7 +1,7 @@ import { createStore } from 'vuex'; import { listen, Event as TauriEvent } from "@tauri-apps/api/event"; import { Tabs } from "../utils/Tabs"; -import { InstallType } from "../utils/InstallType"; +import { InstallType } from "../../../src-tauri/bindings/InstallType"; import { invoke } from "@tauri-apps/api"; import { GameInstall } from "../utils/GameInstall"; import { LaunchObject } from "../utils/LaunchObject.d"; @@ -39,6 +39,7 @@ export interface FlightCoreStore { thunderstoreMods: ThunderstoreMod[], thunderstoreModsCategories: string[], installed_mods: NorthstarMod[], + available_profiles: string[], northstar_is_running: boolean, origin_is_running: boolean, @@ -63,6 +64,8 @@ export const store = createStore<FlightCoreStore>({ developer_mode: false, game_install: {} as unknown as GameInstall, + available_profiles: [], + flightcore_version: "", installed_northstar_version: "", @@ -143,7 +146,7 @@ export const store = createStore<FlightCoreStore>({ catch { console.warn("Nothing to close"); } - state.game_install.install_type = InstallType.UNKNOWN; + state.game_install.install_type = "UNKNOWN"; // Save change in persistent store await persistentStore.set('game-install', { value: state.game_install }); @@ -288,6 +291,9 @@ export const store = createStore<FlightCoreStore>({ return; } + // Clear installed mod list first so we don't end up with leftovers + state.installed_mods = []; + // Call back-end for installed mods await invoke("get_installed_mods_and_properties", { gameInstall: state.game_install }) .then((message) => { @@ -316,6 +322,16 @@ export const store = createStore<FlightCoreStore>({ i18n.global.tc(`channels.names.${state.northstar_release_canal}`), i18n.global.tc('channels.release.switch.text', {canal: state.northstar_release_canal}), ); + }, + async fetchProfiles(state: FlightCoreStore) { + await invoke("fetch_profiles", { gameInstall: state.game_install }) + .then((message) => { + state.available_profiles = message as string[]; + }) + .catch((error) => { + console.error(error); + showErrorNotification(error); + }); } } }); @@ -419,6 +435,8 @@ async function _initializeApp(state: any) { await _get_northstar_version_number(state); } + store.commit('fetchProfiles'); + await invoke<[number, number]>("get_server_player_count") .then((message) => { state.player_count = message[0]; @@ -469,6 +487,8 @@ function _initializeListeners(state: any) { * state, for it to be displayed in UI. */ async function _get_northstar_version_number(state: any) { + state.installed_northstar_version = ""; + await invoke("get_northstar_version_number", { gameInstall: state.game_install }) .then((message) => { let northstar_version_number: string = message as string; diff --git a/src-vue/src/utils/InstallType.ts b/src-vue/src/utils/InstallType.ts deleted file mode 100644 index 797f4077..00000000 --- a/src-vue/src/utils/InstallType.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Enumerates the way Titanfall2 could be installed (Steam/Origin/EA-Desktop) -// Needs to be synced with `pub enum InstallType` in /src-tauri/src/lib.rs -export enum InstallType { - STEAM = 'STEAM', - ORIGIN = 'ORIGIN', - EAPLAY = 'EAPLAY', - UNKNOWN = 'UNKNOWN', // used when the install location was manually selected -} diff --git a/src-vue/src/views/ChangelogView.vue b/src-vue/src/views/ChangelogView.vue index 7ab50903..f75d869c 100644 --- a/src-vue/src/views/ChangelogView.vue +++ b/src-vue/src/views/ChangelogView.vue @@ -63,6 +63,10 @@ export default defineComponent({ padding: 20px 30px; } +.el-table .el-scrollbar__view { + padding: 0; +} + .fc__changelog__container { padding: 20px 30px; } diff --git a/src-vue/src/views/DeveloperView.vue b/src-vue/src/views/DeveloperView.vue index 8adc7587..206d425b 100644 --- a/src-vue/src/views/DeveloperView.vue +++ b/src-vue/src/views/DeveloperView.vue @@ -89,10 +89,6 @@ Get installed mods </el-button> - <el-button type="primary" @click="killNorthstar"> - Kill Northstar - </el-button> - <h3>Testing</h3> <pull-requests-selector /> @@ -251,16 +247,6 @@ export default defineComponent({ showErrorNotification(error); }); }, - async killNorthstar() { - await invoke("kill_northstar") - .then((message) => { - // Just a visual indicator that it worked - showNotification('Success'); - }) - .catch((error) => { - showErrorNotification(error); - }); - }, async installMod() { let mod_to_install = this.mod_to_install_field_string; await invoke<string>("install_mod_caller", { gameInstall: this.$store.state.game_install, thunderstoreModString: mod_to_install }).then((message) => { diff --git a/src-vue/src/views/RepairView.vue b/src-vue/src/views/RepairView.vue index 65c533d2..ce7e154d 100644 --- a/src-vue/src/views/RepairView.vue +++ b/src-vue/src/views/RepairView.vue @@ -17,6 +17,10 @@ {{ $t('settings.repair.window.force_reinstall_ns') }} </el-button> + <el-button type="primary" @click="killNorthstar"> + {{ $t('settings.repair.window.kill_northstar_process') }} + </el-button> + <el-button type="primary" @click="disableModsettingsMod"> {{ $t('settings.repair.window.disable_modsettings') }} </el-button> @@ -121,6 +125,16 @@ export default defineComponent({ showErrorNotification(error); }); }, + async killNorthstar() { + await invoke("kill_northstar") + .then((message) => { + // Just a visual indicator that it worked + showNotification('Success'); + }) + .catch((error) => { + showErrorNotification(error); + }); + }, }, watch: { // Lang value is propagated to repair view after it's mounted, so we need to watch diff --git a/src-vue/src/views/SettingsView.vue b/src-vue/src/views/SettingsView.vue index dcc787ae..b1a62c56 100644 --- a/src-vue/src/views/SettingsView.vue +++ b/src-vue/src/views/SettingsView.vue @@ -1,4 +1,14 @@ <template> + <el-dialog + v-model="showProfileDialog" + :title="$t('settings.profile.dialog.title')" + width="75%" + > + <el-table :data="availableProfiles" > + <el-table-column prop="name" label="Name" /> + </el-table> + </el-dialog> + <div class="fc-container"> <el-scrollbar> <div class="fc_settings__container"> @@ -21,6 +31,22 @@ </el-input> </div> + <!-- Northstar Active Profile --> + <div class="fc_parameter__panel" v-if="$store.state.developer_mode"> + <h3>{{ $t('settings.profile.active') }}</h3> + <el-dropdown trigger="click"> + <el-button> + {{ $store.state.game_install.profile }} <el-icon class="el-icon--right"><arrow-down /></el-icon> + </el-button> + <template #dropdown> + <el-dropdown-menu> + <el-dropdown-item v-for="profile in $store.state.available_profiles" @click="switchProfile(profile)">{{ profile }}</el-dropdown-item> + <el-dropdown-item divided @click="showProfileDialog = true">{{ $t('settings.profile.edit') }}</el-dropdown-item> + </el-dropdown-menu> + </template> + </el-dropdown> + </div> + <!-- Thunderstore mods per page configuration --> <div class="fc_parameter__panel"> <h3>{{ $t('settings.nb_ts_mods_per_page') }}</h3> @@ -96,6 +122,7 @@ import { showErrorNotification, showNotification } from "../utils/ui"; import LanguageSelector from "../components/LanguageSelector.vue"; const persistentStore = new Store('flight-core-settings.json'); import { open } from '@tauri-apps/api/shell'; +import { i18n } from '../main'; export default defineComponent({ name: "SettingsView", @@ -104,7 +131,8 @@ export default defineComponent({ }, data() { return { - developerModeClicks: 0 + developerModeClicks: 0, + showProfileDialog: false, } }, computed: { @@ -144,6 +172,17 @@ export default defineComponent({ persistentStore.set('thunderstore-mods-per-page', { value }); await persistentStore.save(); // explicit save to disk } + }, + availableProfiles(): Object { + let profiles = this.$store.state.available_profiles + + // convert string array to object array so we can fill a table + let data = profiles.reduce( + (a: Object[], v: string) => [...a, {"name": v}], + [] + ); + + return data; } }, methods: { @@ -172,6 +211,39 @@ export default defineComponent({ async openGameInstallFolder() { // Opens the folder in default file explorer application await open(`${this.$store.state.game_install.game_path}`); + }, + async switchProfile(value: string) { + let store = this.$store; + let state = store.state; + + await invoke("validate_profile", { gameInstall: state.game_install, profile: value }) + .then(async (message) => { + if (!message) + { + // Profile is no longer valid, inform the user... + showErrorNotification( + i18n.global.tc('notification.profile.invalid.text'), + i18n.global.tc('notification.profile.invalid.title') + ); + + // ...and refresh + store.commit('fetchProfiles'); + return; + } + + state.game_install.profile = value; + + // Check for Northstar updates + store.commit('checkNorthstarUpdates'); + + // Save change in persistent store + await persistentStore.set('game-install', { value: state.game_install }); + await persistentStore.save(); // explicit save to disk + }) + .catch((error) => { + console.error(error); + showErrorNotification(error); + }); } }, mounted() { |