diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2024-12-22 23:55:52 +0100 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2024-12-22 23:55:52 +0100 |
commit | f1dee718da95836ffa5c0985c9e8f5643e0f3f6f (patch) | |
tree | 24967a28bcae1fc1e5b08da9f58bcc678ed52937 /src-vue/src | |
parent | cc5ae684221d3165479d7a68556a2bb6fa81cf3a (diff) | |
download | FlightCore-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')
46 files changed, 0 insertions, 5490 deletions
diff --git a/src-vue/src/App.vue b/src-vue/src/App.vue deleted file mode 100644 index 9db6c488..00000000 --- a/src-vue/src/App.vue +++ /dev/null @@ -1,213 +0,0 @@ -<script lang="ts"> -import ChangelogView from './views/ChangelogView.vue'; -import DeveloperView from './views/DeveloperView.vue'; -import PlayView from './views/PlayView.vue'; -import ModsView from './views/ModsView.vue'; -import SettingsView from './views/SettingsView.vue'; -import { appWindow } from '@tauri-apps/api/window'; -import { store } from './plugins/store'; -import { Store } from 'tauri-plugin-store-api'; -import { invoke } from "@tauri-apps/api"; -import NotificationButton from "./components/NotificationButton.vue"; - -export default { - components: { - NotificationButton, - ChangelogView, - DeveloperView, - PlayView, - SettingsView, - ModsView - }, - data() { - return {} - }, - mounted: async function() { - store.commit('initialize'); - - // Initialize interface language - const persistentStore = new Store('flight-core-settings.json'); - let lang: string | null = await persistentStore.get('lang'); - if (lang === null) { - lang = navigator.language.substring(0, 2); - persistentStore.set('lang', lang); - await persistentStore.save(); - } - this.$root!.$i18n.locale = lang; - }, - methods: { - minimize() { - appWindow.minimize() - }, - close() { - invoke("close_application"); - } - }, - computed: { - bgStyle(): string { - // @ts-ignore - const shouldBlur = this.$route.path !== "/"; - return `filter: brightness(0.8) ${shouldBlur ? 'blur(5px)' : ''};`; - } - } -} -</script> - -<template> - <div class="app-inner"> - <div id="fc_bg__container" :style="bgStyle"/> - - <nav id="fc_menu-bar" v-if="$route.path !== '/repair'"><!-- Hide menu bar in repair view --> - <!-- Navigation items --> - <el-menu - :default-active="$route.path" - router - mode="horizontal" - id="fc__menu_items" - data-tauri-drag-region - > - <el-menu-item index="/">{{ $t('menu.play') }}</el-menu-item> - <el-menu-item index="/mods">{{ $t('menu.mods') }}</el-menu-item> - <el-menu-item index="/changelog">{{ $t('menu.changelog') }}</el-menu-item> - <el-menu-item index="/settings">{{ $t('menu.settings') }}</el-menu-item> - <el-menu-item index="/dev" v-if="$store.state.developer_mode">{{ $t('menu.dev') }}</el-menu-item> - </el-menu> - - <!-- Window controls --> - <div id="fc_window__controls"> - <NotificationButton /> - <el-button color="white" icon="SemiSelect" @click="minimize" circle /> - <el-button color="white" icon="CloseBold" @click="close" circle /> - </div> - </nav> - - <router-view></router-view> - </div> -</template> - -<style> -#fc_menu-bar { - position: fixed; - z-index: 1; - top: 0; - width: 100%; - height: var(--fc-menu_height); -} - -#fc__menu_bar::before { - position: absolute; - content: ""; - inset: 0; /* same as { top: 0; right: 0; bottom: 0; left: 0; } */ - background-image: linear-gradient(to bottom, red, orange); - z-index: 1; - opacity: 0; - transition: opacity 1s linear; -} - -#fc__menu_bar:hover::before { - opacity: 1; -} - -/* Borders reset */ -#fc__menu_bar, #fc__menu_items { - border: none !important; -} -.app-inner { - height: 100%; - width: 100%; -} - -/* Header item */ -#fc__menu_items { - height: 100%; - background-color: transparent; - float: left; - width: calc(100% - 168px); /* window controls container width */ -} - -#fc__menu_items .el-menu-item, #fc__menu_items .el-sub-menu__title { - color: #b4b6b9; - border-color: white; -} - -#fc__menu_items > .el-menu-item { - text-transform: uppercase; - border: none !important; - font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; - font-weight: bold; - font-size: large; - background-color: transparent !important; - - border-width: 2px !important; - border-style: solid !important; - border-color: transparent !important; - border-radius: 10px !important; - transition: none; -} - -#fc__menu_items .el-menu-item:hover, #fc__menu_items .el-sub-menu__title { - color: #c6c9ce; - background-color: transparent; -} - -#fc__menu_items .el-menu-item:focus-visible { - border-color: rgb(160, 207, 255) !important; -} - -#fc__menu_items .el-menu-item.is-active, #fc__menu_items .el-sub-menu.is-active > .el-sub-menu__title { - color: white !important; -} - -.app-inner > .fc__mods__container { - overflow-y: auto; - height: calc(100% - var(--fc-menu_height)); -} - -/* Header menu */ -.developer_build { - background: repeating-linear-gradient( - 45deg, - rgba(0, 0, 0, 0.2), - rgba(0, 0, 0, 0.2) 20px, - rgba(0, 0, 0, 0.3) 20px, - rgba(0, 0, 0, 0.3) 40px - ); -} - -/* Window controls */ -#fc_window__controls { - float: right; - height: 100%; -} - -#fc_window__controls > button, -#fc_window__controls > .el-dropdown > button, -#fc_window__controls > .el-dropdown > .el-badge > button { - color: white; - font-size: 20px; - margin: auto 5px; - background: none; - border: none; - height: 100%; -} - -#fc_window__controls > button:hover, -#fc_window__controls > .el-dropdown > button:hover, -#fc_window__controls > .el-dropdown > .el-badge > button:hover { - color: #c6c9ce; -} - -#fc_window__controls > button:active, -#fc_window__controls > .el-dropdown > button:active { - color: #56585a; -} - -#fc_window__controls > button:last-of-type { - margin-right: 15px; -} - -sup { - border: none !important; -} - -</style> diff --git a/src-vue/src/assets/mp_colony020033.jpg b/src-vue/src/assets/mp_colony020033.jpg Binary files differdeleted file mode 100644 index ed44eca9..00000000 --- a/src-vue/src/assets/mp_colony020033.jpg +++ /dev/null diff --git a/src-vue/src/assets/thunderstore-icon.png b/src-vue/src/assets/thunderstore-icon.png Binary files differdeleted file mode 100644 index c286ab11..00000000 --- a/src-vue/src/assets/thunderstore-icon.png +++ /dev/null diff --git a/src-vue/src/assets/wallpaperflare.com_wallpaper.jpg b/src-vue/src/assets/wallpaperflare.com_wallpaper.jpg Binary files differdeleted file mode 100644 index 74a840cd..00000000 --- a/src-vue/src/assets/wallpaperflare.com_wallpaper.jpg +++ /dev/null diff --git a/src-vue/src/components/InstallProgressBar.vue b/src-vue/src/components/InstallProgressBar.vue deleted file mode 100644 index 21901ac0..00000000 --- a/src-vue/src/components/InstallProgressBar.vue +++ /dev/null @@ -1,102 +0,0 @@ -<script lang="ts"> -import { defineComponent } from 'vue'; -import { appWindow } from '@tauri-apps/api/window'; -import { InstallProgress } from '../../../src-tauri/bindings/InstallProgress'; - -export default defineComponent({ - name: 'InstallProgressBar', - computed: { - progressBarStyle(): string { - return !this.install_or_update ? 'hide-progress' : ''; - } - }, - data() { - return { - percentage: 0, - color: '#409EFF', - install_or_update: false, - status: "unknown", - current_downloaded: -1, - total_size: -1, - }; - }, - methods: { - formatBytes(bytes: number, decimals = 2) { - if (bytes === 0) return '0 Bytes'; - const k = 1000; - const dm = decimals < 0 ? 0 : decimals; - const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; - const i = Math.floor(Math.log(bytes) / Math.log(k)); - return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; - }, - formatText() { - if (this.status == "Downloading") { - const current_downloaded_string = this.formatBytes(this.current_downloaded); - const total_size_string = this.formatBytes(this.total_size); - const status = this.$t("generic.downloading"); - return `${status}: ${current_downloaded_string}/${total_size_string}`; - } - if (this.status == "Extracting") { - return this.$t("generic.extracting"); - } - return "Inactive"; // Needed to keep same size format when progress bar is hidden - } - }, - mounted() { - appWindow.listen<InstallProgress>( - 'northstar-install-download-progress', - ({ event, payload }) => { - this.install_or_update = true; - let progress = payload; - this.status = progress.state; - if (progress.state == "Downloading") { - this.percentage = ((Number(progress.current_downloaded) / Number(progress.total_size)) * 100); - this.color = '#409EFF'; - this.current_downloaded = Number(progress.current_downloaded); - this.total_size = Number(progress.total_size); - } - if (progress.state == "Extracting") { - this.percentage = 100; - this.color = '#67C23A'; - } - if (progress.state == "Done") { - // Clear state again - this.install_or_update = false - } - } - ); - } -}); -</script> - -<template> - <el-progress - :class="progressBarStyle" - :format="formatText" - :percentage="percentage" - :color="color" - :indeterminate="status === 'Extracting'" - :duration="1" - > - </el-progress> -</template> - -<style scoped> -.el-progress { - margin-top: 10px; -} - -/* Set progress bar width */ -.el-progress:deep(.el-progress-bar) { - width: 200px; - flex-grow: initial; -} - -.el-progress:deep(.el-progress__text) { - line-height: 1.2; -} - -.hide-progress { - opacity: 0; -} -</style> diff --git a/src-vue/src/components/LanguageSelector.vue b/src-vue/src/components/LanguageSelector.vue deleted file mode 100644 index 0c47e674..00000000 --- a/src-vue/src/components/LanguageSelector.vue +++ /dev/null @@ -1,75 +0,0 @@ -<template> - <el-select v-model="value" class="m-2" - :placeholder="$t('settings.language_select')" size="large" - @change="onChange" - > - <el-option - v-for="item in options" - :key="item.value" - :label="item.label" - :value="item.value" - /> - </el-select> -</template> - -<script lang="ts"> -import { defineComponent } from 'vue'; -import { Store } from 'tauri-plugin-store-api'; -const persistentStore = new Store('flight-core-settings.json'); - -export default defineComponent({ - name: 'LanguageSelector', - data: () => ({ - value: '', - options: [ - { - value: 'en', - label: 'English' - }, - { - value: 'fr', - label: 'Français' - }, - { - value: 'de', - label: 'Deutsch' - }, - { - value: 'es', - label: 'Español' - }, - { - value: 'pl', - label: 'polski' - }, - { - value: 'ru', - label: 'русский' - }, - { - value: 'it', - label: 'Italiano' - }, - { - value: 'da', - label: 'Dansk' - }, - { - value: 'zh_Hans', - label: '简体中文' - }, - ] - }), - mounted: async function () { - const lang: string = await persistentStore.get('lang') as string; - this.value = lang; - }, - methods: { - async onChange(value: string) { - this.$root!.$i18n.locale = value; - persistentStore.set('lang', value); - await persistentStore.save(); - } - } -}) -</script> diff --git a/src-vue/src/components/LocalModCard.vue b/src-vue/src/components/LocalModCard.vue deleted file mode 100644 index 697cced1..00000000 --- a/src-vue/src/components/LocalModCard.vue +++ /dev/null @@ -1,120 +0,0 @@ -<template> - <el-card shadow="hover"> - <div class="name"> - {{ mod.name }} <span v-if="mod.version != null">(v{{ mod.version }})</span> - <img - v-if="mod.thunderstore_mod_string != null" - :title="$t('mods.local.part_of_ts_mod') + '\n' + mod.thunderstore_mod_string" - src="/src/assets/thunderstore-icon.png" - class="image" - height="16" - /> - </div> - <div> - <el-switch - style="--el-switch-on-color: #13ce66; --el-switch-off-color: #8957e5" - v-model="mod.enabled" - :before-change="() => updateWhichModsEnabled(mod)" - :loading="global_load_indicator" - class="switch" - /> - <el-popconfirm - :title="$t('mods.local.delete_confirm')" - :confirm-button-text="$t('generic.yes')" - :cancel-button-text="$t('generic.no')" - @confirm="deleteMod(mod)" - > - <template #reference> - <el-button type="danger"> - {{ $t('mods.local.delete') }} - </el-button> - </template> - </el-popconfirm> - </div> - </el-card> -</template> - -<script lang="ts"> -import { defineComponent } from "vue"; -import { invoke } from "@tauri-apps/api"; -import { NorthstarMod } from "../../../src-tauri/bindings/NorthstarMod"; -import { showErrorNotification, showNotification } from "../utils/ui"; - -export default defineComponent({ - name: "LocalModCard", - props: { - mod: { - required: true, - type: Object as () => NorthstarMod - } - }, - data() { - return { - global_load_indicator: false, - }; - }, - methods: { - async updateWhichModsEnabled(mod: NorthstarMod) { - this.global_load_indicator = true; - - // enable/disable specific mod - try { - await invoke("set_mod_enabled_status", { - gameInstall: this.$store.state.game_install, - modName: mod.name, - // Need to set it to the opposite of current state, - // as current state is only updated after command is run - isEnabled: !mod.enabled, - }) - } - catch (error) { - showErrorNotification(`${error}`); - this.global_load_indicator = false; - return false; - } - - this.global_load_indicator = false; - return true; - }, - async deleteMod(mod: NorthstarMod) { - await invoke("delete_northstar_mod", { gameInstall: this.$store.state.game_install, nsmodName: mod.name }) - .then((message) => { - // Just a visual indicator that it worked - showNotification(this.$t('mods.local.success_deleting', { modName: mod.name })); - }) - .catch((error) => { - showErrorNotification(error); - }) - .finally(() => { - this.$store.commit('loadInstalledMods'); - }); - }, - } -}); -</script> - -<style scoped> - /* - This is a hack to style the card body - since it doesn't work with scoped styles - */ - :deep(.el-card__body) { - display: flex !important; - align-items: center; - width: 100%; - justify-content: space-between; - } - - .name { - display: flex; - } - - .image { - margin: 0 5px; - } - - .switch { - padding-left: 5px; - padding-right: 5px; - } -</style> diff --git a/src-vue/src/components/ModsMenu.vue b/src-vue/src/components/ModsMenu.vue deleted file mode 100644 index 66ecc71a..00000000 --- a/src-vue/src/components/ModsMenu.vue +++ /dev/null @@ -1,141 +0,0 @@ -<template> - <nav class="fc_mods__menu"> - <el-menu - default-active="1" - text-color="#fff" - > - <h5>{{ $t('menu.mods') }}</h5> - <el-menu-item index="1" @click="$emit('showLocalMods', true)"> - <el-icon><Folder /></el-icon> - <span>{{ $t('mods.menu.local') }}</span> - </el-menu-item> - - <!-- Display a badge if there are some outdated Thunderstore mods --> - <el-menu-item v-if="outdatedThunderstoreModsCount !== 0" index="2" @click="$emit('showLocalMods', false)"> - <el-badge :value="outdatedThunderstoreModsCount" class="item" type="warning"> - <el-icon><Connection /></el-icon> - <span>{{ $t('mods.menu.online') }}</span> - </el-badge> - </el-menu-item> - <el-menu-item v-else index="2" @click="$emit('showLocalMods', false)"> - <el-icon><Connection /></el-icon> - <span>{{ $t('mods.menu.online') }}</span> - </el-menu-item> - - <!-- Search inputs --> - <h5>{{ $t('mods.menu.filter') }}</h5> - <el-input v-model="$store.state.search.searchValue" :placeholder="$t('mods.menu.search')" clearable /> - <el-select - v-if="!showingLocalMods" - v-model="$store.state.search.sortValue" - :placeholder="$t('mods.menu.sort_mods')" - > - <el-option - v-for="item of sortValues" - :key="item.value" - :label="item.label" - :value="item.value" - /> - </el-select> - <el-select - v-if="!showingLocalMods" - v-model="$store.state.search.selectedCategories" - multiple - :placeholder="$t('mods.menu.select_categories')" - > - <el-option - v-for="item in $store.state.thunderstoreModsCategories" - :key="item" - :label="item" - :value="item" - /> - </el-select> - - </el-menu> - </nav> -</template> - -<script lang="ts"> -import { defineComponent } from 'vue' -import { SortOptions } from '../utils/SortOptions.d'; -import { isThunderstoreModOutdated } from "../utils/thunderstore/version"; -import { ThunderstoreMod } from "../../../src-tauri/bindings/ThunderstoreMod"; - -export default defineComponent({ - name: 'ModsMenu', - props: { - showingLocalMods: { - required: true, - type: Boolean - } - }, - mounted() { - this.$store.state.search.sortValue = this.sortValues[3].value; - }, - computed: { - outdatedThunderstoreModsCount(): number { - return this.$store.state.thunderstoreMods - .filter((mod: ThunderstoreMod) => isThunderstoreModOutdated(mod)) - .length; - }, - sortValues(): { label: string, value: string }[] { - return Object.keys(SortOptions).map((key: string) => ({ - value: key, - label: this.$t('mods.menu.sort.' + Object.values(SortOptions)[Object.keys(SortOptions).indexOf(key)]) - })); - } - } -}) -</script> - -<style scoped> -.fc_mods__menu { - display: flex; - max-width: 222px; - min-width: 222px; - padding: 10px; -} - -.fc_mods__menu h5 { - margin: 8px 0 16px 5px; -} - -.fc_mods__menu h5:not(:first-child) { - margin-top: 32px; -} - -.fc_mods__menu > .el-menu { - background-color: transparent; - border: none; - width: 100%; -} - -.fc_mods__menu > .el-menu > .el-menu-item { - height: 32px; - margin-bottom: 5px; - border-radius: 5px; - color: #e2e6e7; -} - -.fc_mods__menu > .el-menu > .el-menu-item:hover { - background-color: #4e4e4e3b; -} - -.fc_mods__menu > .el-menu > .el-menu-item.is-active { - color: white; - background-color: #4e4e4e7a; -} - -.el-select { - width: 100%; - margin-top: 5px; -} - -/* Outdated thunderstore mods count */ -.el-badge { - width: 100%; -} -.el-badge:deep(.el-badge__content) { - top: 28px !important; -} -</style> diff --git a/src-vue/src/components/NotificationButton.vue b/src-vue/src/components/NotificationButton.vue deleted file mode 100644 index 3835032d..00000000 --- a/src-vue/src/components/NotificationButton.vue +++ /dev/null @@ -1,81 +0,0 @@ -<template> - <el-dropdown trigger="click" placement="bottom-end" max-height="280" popper-class="fc_popper"> - <el-badge v-if="notifications.length != 0" :value="notifications.length" :max="9" class="item" type="primary"> - <el-button color="white" icon="BellFilled" circle /> - </el-badge> - <el-button v-else color="white" icon="BellFilled" circle /> - <template #dropdown> - <el-dropdown-menu :key="counter"> - <el-alert - v-if="notifications.length != 0" - v-for="(notification, i) in notifications" - :key="i" - :title="notification.title" - :description="notification.text" - :type="notification.type" - show-icon - style="width: 300px" - @close.stop="removeNotification(i)" - /> - <el-result - v-else - icon="success" - :title="i18n.global.tc('notification.no_new.title')" - :sub-title="i18n.global.tc('notification.no_new.text')" - > - <template #icon> - </template> - </el-result> - </el-dropdown-menu> - </template> - </el-dropdown> -</template> - -<script lang="ts"> -import { defineComponent } from 'vue'; -import {Notification} from '../plugins/modules/notifications'; -import {i18n} from "../main"; - -export default defineComponent({ - name: 'NotificationButton', - data: () => ({ - // This variable is used as a key for the dropdown menu, so we can force it to refresh when a item is deleted. - counter: 0 - }), - computed: { - i18n() { - return i18n - }, - notifications(): Notification[] { - return this.$store.state.notifications.notifications; - } - }, - methods: { - removeNotification(index: number) { - this.$store.commit('removeNotification', index); - // By refreshing the notifications list, we ensure the first notification get the index 0, ensuring this list - // is synchronized with the store list. - this.counter += 1; - } - } -}) -</script> - -<style scoped> -.el-dropdown { - height: 100%; - max-height: 300px; -} - -.el-button { - margin: auto 25px auto 0 !important; -} - -.el-alert { - margin: 5px 10px 5px 5px; -} - -.el-badge:deep(sup) { - transform: translate(-10px, 5px) !important; -} -</style> diff --git a/src-vue/src/components/PlayButton.vue b/src-vue/src/components/PlayButton.vue deleted file mode 100644 index 57b408c2..00000000 --- a/src-vue/src/components/PlayButton.vue +++ /dev/null @@ -1,157 +0,0 @@ -<script lang="ts"> -import { defineComponent } from 'vue'; -import { NorthstarState } from '../utils/NorthstarState'; -import { ReleaseCanal } from '../utils/ReleaseCanal'; - -export default defineComponent({ - name: 'PlayButton', - computed: { - currentCanal: { - get(): ReleaseCanal { - return this.$store.state.northstar_release_canal; - }, - set(value: ReleaseCanal) { - if (value !== this.currentCanal) { - this.$store.commit('toggleReleaseCandidate'); - } - } - }, - playButtonLabel(): string { - if (this.$store.state.northstar_is_running) { - return this.$t("play.button.northstar_is_running"); - } - - switch (this.$store.state.northstar_state) { - case NorthstarState.GAME_NOT_FOUND: - return this.$t("play.button.select_game_dir"); - case NorthstarState.INSTALL: - return this.$t("play.button.install"); - case NorthstarState.INSTALLING: - return this.$t("play.button.installing"); - case NorthstarState.MUST_UPDATE: - return this.$t("play.button.update"); - case NorthstarState.UPDATING: - return this.$t("play.button.updating"); - case NorthstarState.READY_TO_PLAY: - return this.$t("play.button.ready_to_play"); - - default: - return ""; - } - }, - northstarIsRunning(): boolean { - return this.$store.state.northstar_is_running; - }, - options(): { key: string, value: string }[] { - return Object.keys(ReleaseCanal).map(function (v) { - return { - key: v, - value: Object.keys(ReleaseCanal)[Object.values(ReleaseCanal).indexOf(v)] - } - }); - }, - selectOptions(): { label: string, options: { value: ReleaseCanal, label: string }[] }[] { - return [ - { - label: 'Beta', - options: [ - { - value: ReleaseCanal.RELEASE_CANDIDATE, - label: this.$t('channels.names.NorthstarReleaseCandidate'), - }, - ] - }, - { - label: 'Stable', - options: [ - { - value: ReleaseCanal.RELEASE, - label: 'Northstar', - }, - ] - } - ]; - }, - showReleaseSwitch(): boolean { - return this.$store.state.enableReleasesSwitch; - }, - - /** - * Button has rounded edges on its right only if releases switching is enabled. - */ - buttonRadiusStyle(): string { - return this.showReleaseSwitch - ? 'border-radius: 2px 0 0 2px;' - : 'border-radius: 2px'; - }, - }, - methods: { - async launchGame() { - this.$store.commit('launchGame'); - } - } -}); -</script> - -<template> - <nav> - <el-button :disabled="northstarIsRunning" - type="primary" size="large" @click="launchGame" - class="fc_launch__button" :style="buttonRadiusStyle"> - {{ playButtonLabel }} - </el-button> - <el-select v-if="showReleaseSwitch" :disabled="northstarIsRunning" - v-model="currentCanal" placeholder="Select"> - <el-option-group - v-for="group in selectOptions" - :key="group.label" - :label="group.label" - > - <el-option - v-for="item in group.options" - :key="item.value" - :label="item.label" - :value="item.value" - /> - </el-option-group> - </el-select> - </nav> -</template> - -<style scoped> -nav { - margin-right: 20px; -} - -button { - text-transform: uppercase; - padding: 30px; - font-size: 15px; - margin-right: 0; -} - -.fc_launch__button:focus { - background-color: var(--el-color-primary); - border-color: var(--el-color-primary); -} - -/* Release canal selector */ -.el-select { - width: 31px; - border-left: 1px solid rgb(176, 205, 255); -} - -.el-select:deep(.el-select__wrapper) { - padding: 0 9px 0 0; - background-color: var(--el-color-primary); - border: none; - border-radius: 0 2px 2px 0; - height: 62px; - box-shadow: none !important; - --el-disabled-bg-color: #a0cfff; -} - -.el-select:deep(.el-icon) { - color: white !important; -} -</style> diff --git a/src-vue/src/components/PullRequestsSelector.vue b/src-vue/src/components/PullRequestsSelector.vue deleted file mode 100644 index bd17ed14..00000000 --- a/src-vue/src/components/PullRequestsSelector.vue +++ /dev/null @@ -1,181 +0,0 @@ -<template> - <div> - <el-collapse @change="onChange"> - <el-collapse-item name="1" @keydown.space="launcherSearchSpace"> - <template #title> - Launcher PRs - <el-input class="pr_search_input" v-model="launcherSearch" placeholder="Filter pull requests" @click.stop="() => false"></el-input> - </template> - - <p v-if="pull_requests_launcher.length === 0"> - <el-progress - :show-text="false" - :percentage="100" - status="warning" - :indeterminate="true" - :duration="1" - style="margin: 15px" - /> - </p> - <el-card - v-else-if="filtered_launcher_pull_requests.length !== 0" - shadow="hover" - v-for="pull_request in filtered_launcher_pull_requests" - v-bind:key="pull_request.url" - > - <el-button type="primary" @click="installLauncherPR(pull_request)">Install</el-button> - <el-button type="primary" @click="downloadLauncherPR(pull_request)">Download</el-button> - <a target="_blank" :href="pull_request.html_url"> - {{ pull_request.number }}: {{ pull_request.title }} - </a> - <el-tag v-for="label in pull_request.labels">{{ label }}</el-tag> - </el-card> - <div v-else class="no_matching_pr"> - No matching PR found. - </div> - </el-collapse-item> - - <el-collapse-item name="2" @keydown.space="modsSearchSpace"> - <template #title> - Mods PRs - <el-input class="pr_search_input" v-model="modsSearch" placeholder="Filter pull requests" @click.stop="() => false"></el-input> - </template> - <div style="margin: 15px"> - <el-alert title="Warning" type="warning" :closable="false" show-icon> - Mod PRs are installed into a separate profile. Make sure to launch via - 'r2ns-launch-mod-pr-version.bat' or via '-profile=R2Northstar-PR-test-managed-folder' to actually - run the PR version! - </el-alert> - </div> - <p v-if="pull_requests_mods.length === 0"> - <el-progress - :show-text="false" - :percentage="100" - status="warning" - :indeterminate="true" - :duration="1" - style="margin: 15px" - /> - </p> - <el-card - v-else-if="filtered_mods_pull_requests.length !== 0" - shadow="hover" - v-for="pull_request in filtered_mods_pull_requests" - v-bind:key="pull_request.url" - > - <el-button type="primary" @click="installModsPR(pull_request)">Install</el-button> - <el-button type="primary" @click="downloadModsPR(pull_request)">Download</el-button> - <a target="_blank" :href="pull_request.html_url"> - {{ pull_request.number }}: {{ pull_request.title }} - </a> - <el-tag v-for="label in pull_request.labels">{{ label }}</el-tag> - </el-card> - <div v-else class="no_matching_pr"> - No matching PR found. - </div> - </el-collapse-item> - </el-collapse> - </div> -</template> - -<script lang="ts"> -import { defineComponent } from 'vue' -import { PullRequestType } from '../../../src-tauri/bindings/PullRequestType'; -import { PullsApiResponseElement } from '../../../src-tauri/bindings/PullsApiResponseElement'; -import { fuzzy_filter } from "../utils/filter"; - -export default defineComponent({ - name: 'PullRequestsSelector', - data: () => ({ - launcherSearch: '', - modsSearch: '' - }), - computed: { - pull_requests_launcher(): PullsApiResponseElement[] { - return this.$store.state.pullrequests.pull_requests_launcher; - }, - pull_requests_mods(): PullsApiResponseElement[] { - return this.$store.state.pullrequests.pull_requests_mods; - }, - - filtered_launcher_pull_requests(): PullsApiResponseElement[] { - if (this.launcherSearch.length === 0) { - return this.pull_requests_launcher; - } - - return this.pull_requests_launcher.filter(pr => - // Check PR id and title - fuzzy_filter(pr.number.toString(), this.launcherSearch) || fuzzy_filter(pr.title, this.launcherSearch)); - }, - filtered_mods_pull_requests(): PullsApiResponseElement[] { - if (this.modsSearch.length === 0) { - return this.pull_requests_mods; - } - - return this.pull_requests_mods.filter(pr => - // Check PR id and title - fuzzy_filter(pr.number.toString(), this.modsSearch) || fuzzy_filter(pr.title, this.modsSearch)); - }, - }, - methods: { - onChange(e: Object) { - const openedCollapseNames = Object.values(e); - if (openedCollapseNames.includes('1') && this.pull_requests_launcher.length === 0) { - this.getPullRequests('Launcher'); - } - if (openedCollapseNames.includes('2') && this.pull_requests_mods.length === 0) { - this.getPullRequests('Mods'); - } - }, - launcherSearchSpace(e: KeyboardEvent) { - e.preventDefault(); - this.launcherSearch += ' '; - }, - modsSearchSpace(e: KeyboardEvent) { - e.preventDefault(); - this.modsSearch += ' '; - }, - async getPullRequests(pull_request_type: PullRequestType) { - this.$store.commit('getPullRequests', pull_request_type); - }, - async downloadLauncherPR(pull_request: PullsApiResponseElement) { - this.$store.commit('downloadLauncherPR', pull_request); - }, - async downloadModsPR(pull_request: PullsApiResponseElement) { - this.$store.commit('downloadModsPR', pull_request); - }, - async installLauncherPR(pull_request: PullsApiResponseElement) { - this.$store.commit('installLauncherPR', pull_request); - }, - async installModsPR(pull_request: PullsApiResponseElement) { - this.$store.commit('installModsPR', pull_request); - }, - } -}) -</script> - -<style scoped> -.el-collapse { - border-radius: var(--el-border-radius-base); - overflow: hidden; -} - -:deep(.el-collapse-item__header) { - padding-left: 10px; - font-size: 14px; -} - -.el-collapse:deep(.el-collapse-item__arrow) { - margin: 0 8px; -} - -.pr_search_input { - width: 200px; - margin: 0 0 0 auto; -} - -.no_matching_pr { - margin: 0 auto; - width: max-content; -} -</style> diff --git a/src-vue/src/components/ThunderstoreModCard.vue b/src-vue/src/components/ThunderstoreModCard.vue deleted file mode 100644 index 11be7545..00000000 --- a/src-vue/src/components/ThunderstoreModCard.vue +++ /dev/null @@ -1,319 +0,0 @@ -<template> - <el-card :body-style="getBodyStyle" :style="getCardStyle"> - <img - :src="latestVersion.icon" - class="image" - /> - <div style="padding: 0 10px 10px;"> - <span class="statContainer"> - <el-icon class="no-inherit"> - <Download /> - </el-icon> - {{ modDownloadsCount }} - </span> - - <span class="statContainer"> - {{ mod.rating_score }} - <el-icon class="no-inherit"> - <Star /> - </el-icon> - </span> - <br /> - - <div class="name hide-text-overflow">{{ mod.name }}</div> - <div class="author hide-text-overflow">{{ $t('mods.card.by') }} {{ mod.owner }}</div> - <div class="desc"> - {{ latestVersion.description }} - </div> - - <span style="display: flex"> - <el-button - :type="modButtonType" - style="flex: 6" - :loading="isBeingInstalled || isBeingUpdated" - @click.stop="installMod(mod)" - > - {{ $t(modButtonText) }} - </el-button> - - <!-- Information dropdown menu --> - <el-button v-if="!modIsRemovable" - link type="info" class="infoBtn" @click="openURL(mod.package_url)"> - <el-icon> - <InfoFilled /> - </el-icon> - </el-button> - - <el-dropdown v-else> - <el-icon class="infoBtn moreBtn"> - <MoreFilled /> - </el-icon> - <template #dropdown> - <el-dropdown-menu> - <el-dropdown-item @click="openURL(mod.package_url)"> - {{ $t('mods.card.more_info') }} - </el-dropdown-item> - <el-dropdown-item @click="deleteMod(mod)"> - {{ $t('mods.card.remove') }} - </el-dropdown-item> - </el-dropdown-menu> - </template> - </el-dropdown> - </span> - </div> - </el-card> -</template> - -<script lang="ts"> -import { defineComponent } from "vue"; -import { ThunderstoreMod } from "../../../src-tauri/bindings/ThunderstoreMod"; -import { ThunderstoreModVersion } from "../../../src-tauri/bindings/ThunderstoreModVersion"; -import { invoke, shell } from "@tauri-apps/api"; -import { ThunderstoreModStatus } from "../utils/thunderstore/ThunderstoreModStatus"; -import { NorthstarMod } from "../../../src-tauri/bindings/NorthstarMod"; -import { NorthstarState } from "../utils/NorthstarState"; -import { ElMessageBox } from "element-plus"; -import { showErrorNotification, showNotification } from "../utils/ui"; - -export default defineComponent({ - name: "ThunderstoreModCard", - props: { - mod: { - required: true, - type: Object as () => ThunderstoreMod - } - }, - data: () => ({ - isBeingInstalled: false, - isBeingUpdated: false - }), - computed: { - getBodyStyle(): Object { - return this.mod.is_deprecated ? { 'background-color': 'rgba(255, 0, 0, 0.42)' } : {}; - }, - - getCardStyle(): Object { - return this.mod.is_deprecated ? { 'border': '1px solid red' } : {}; - }, - - latestVersion(): ThunderstoreModVersion { - return this.mod.versions[0]; - }, - - /** - * Returns the status of a given mod. - */ - modStatus(): ThunderstoreModStatus { - if (this.isBeingInstalled) { - return ThunderstoreModStatus.BEING_INSTALLED; - } - if (this.isBeingUpdated) { - return ThunderstoreModStatus.BEING_UPDATED; - } - - // Ensure mod is up-to-date. - const tsModPrefix = this.getThunderstoreDependencyStringPrefix(this.latestVersion.full_name); - const matchingMods: NorthstarMod[] = this.$store.state.installed_mods.filter((mod: NorthstarMod) => { - if (!mod.thunderstore_mod_string) return false; - return this.getThunderstoreDependencyStringPrefix(mod.thunderstore_mod_string!) === tsModPrefix; - }); - if (matchingMods.length !== 0) { - // There shouldn't be several mods with same dependency string, but we never know... - const matchingMod = matchingMods[0]; - // A mod is outdated if its dependency strings differs from Thunderstore dependency string - // (no need for semver check here) - return matchingMod.thunderstore_mod_string === this.latestVersion.full_name - ? ThunderstoreModStatus.INSTALLED - : ThunderstoreModStatus.OUTDATED; - } - - return ThunderstoreModStatus.NOT_INSTALLED; - }, - - /** - * Returns button text associated to a mod. - */ - modButtonText(): string { - switch (this.modStatus) { - case ThunderstoreModStatus.BEING_INSTALLED: - return "mods.card.button.being_installed"; - case ThunderstoreModStatus.BEING_UPDATED: - return "mods.card.button.being_updated"; - case ThunderstoreModStatus.INSTALLED: - return "mods.card.button.installed"; - case ThunderstoreModStatus.NOT_INSTALLED: - return "mods.card.button.install"; - case ThunderstoreModStatus.OUTDATED: - return "mods.card.button.outdated"; - } - }, - - /** - * Returns button type associated to a mod. - */ - modButtonType(): string { - switch (this.modStatus) { - case ThunderstoreModStatus.BEING_INSTALLED: - return "primary"; - case ThunderstoreModStatus.INSTALLED: - return "success"; - case ThunderstoreModStatus.NOT_INSTALLED: - return "primary"; - case ThunderstoreModStatus.OUTDATED: - case ThunderstoreModStatus.BEING_UPDATED: - return "warning"; - } - }, - - /** - * Tells if a Thunderstore mod can be removed. - * This is used to tell if we should display the "Remove mod" option. - **/ - modIsRemovable(): boolean { - return [ThunderstoreModStatus.INSTALLED, ThunderstoreModStatus.OUTDATED] - .includes(this.modStatus); - }, - - /** - * This computes the total count of downloads of a given mod, by adding - * download count of each of its releases. - */ - modDownloadsCount(): number { - let totalDownloads = 0; - this.mod.versions.map((version: ThunderstoreModVersion) => totalDownloads += version.downloads); - return totalDownloads; - }, - }, - methods: { - /** - * This opens an URL in user's favorite web browser. - * This is used to open Thunderstore mod pages. - */ - openURL(url: string): void { - shell.open(url); - }, - - /** - * Strips off a Thunderstore dependency string from its version - * (e.g. "taskinoz-WallrunningTitans-1.0.0" to - * "taskinoz-WallrunningTitans"). - */ - getThunderstoreDependencyStringPrefix(dependency: string): string { - const dependencyStringMembers = dependency.split('-'); - return `${dependencyStringMembers[0]}-${dependencyStringMembers[1]}`; - }, - - async deleteMod(mod: ThunderstoreMod) { - - // Show pop-up to confirm delete - ElMessageBox.confirm( - this.$t('mods.card.remove_dialog_text'), - this.$t('mods.card.remove_dialog_title'), - { - confirmButtonText: this.$t('generic.yes'), - cancelButtonText: this.$t('generic.cancel'), - type: 'warning', - } - ) - .then(async () => { // Deletion confirmed - await invoke<string>("delete_thunderstore_mod", { gameInstall: this.$store.state.game_install, thunderstoreModString: this.latestVersion.full_name }) - .then((message) => { - showNotification(this.$t('mods.card.remove_success', { modName: mod.name }), message); - }) - .catch((error) => { - showErrorNotification(error); - }) - .finally(() => { - this.$store.commit('loadInstalledMods'); - }); - }) - .catch(() => { // Deletion cancelled - console.log("Deleting Thunderstore mod cancelled.") - }) - }, - - async installMod(mod: ThunderstoreMod) { - // set internal state according to current installation state - if (this.modStatus === ThunderstoreModStatus.OUTDATED) { - this.isBeingUpdated = true; - } else { - this.isBeingInstalled = true; - } - - // Capture translation method in a context, so it can be used outside Vue component context. - // (see https://github.com/R2NorthstarTools/FlightCore/issues/384) - (async (translate: Function) => { - await invoke<string>("install_mod_wrapper", { gameInstall: this.$store.state.game_install, thunderstoreModString: this.latestVersion.full_name }).then((message) => { - showNotification(translate('mods.card.install_success', { modName: mod.name }), message); - }) - .catch((error) => { - showErrorNotification(error); - }) - .finally(() => { - this.isBeingInstalled = false; - this.isBeingUpdated = false; - this.$store.commit('loadInstalledMods'); - }); - // @ts-ignore - })(this.$i18n.t); - - }, - } -}); -</script> - -<style scoped> -.el-card { - display: inline-block; - max-width: 178px; - margin: 5px; - --el-card-padding: 0; -} - -.deprecated { - background-color: red !important; -} - -.author { - font-size: 14px; - font-style: italic; -} - -.hide-text-overflow { - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; -} - -.desc { - font-size: 12px; - margin: 8px 0 16px; - height: 57px; - text-overflow: ellipsis; - overflow: hidden; -} - -.statContainer { - font-size: 14px; -} - -.statContainer:nth-child(2) { - float: right; -} - -.infoBtn { - width: 20px; - padding: 0 !important; - font-size: 20px; - border: none; -} - -.moreBtn { - 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 deleted file mode 100644 index 33486bce..00000000 --- a/src-vue/src/i18n/lang/da.json +++ /dev/null @@ -1,166 +0,0 @@ -{ - "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 deleted file mode 100644 index a360c124..00000000 --- a/src-vue/src/i18n/lang/de.json +++ /dev/null @@ -1,177 +0,0 @@ -{ - "menu": { - "play": "Spielen", - "changelog": "Versionhistorie", - "mods": "Mods", - "settings": "Einstellungen", - "dev": "Dev" - }, - "generic": { - "yes": "Ja", - "no": "Nein", - "error": "Fehler", - "cancel": "Abbrechen", - "informationShort": "Info", - "downloading": "Herunterladen", - "extracting": "Extrahieren", - "done": "Fertig", - "success": "Erfolg", - "confirm": "Bestätigen" - }, - "play": { - "button": { - "northstar_is_running": "Spiel läuft", - "select_game_dir": "Titanfall2 ordner wählen", - "install": "Installieren", - "installing": "Installiert...", - "update": "Aktualisieren", - "updating": "Aktualisiert...", - "ready_to_play": "Spiel starten" - }, - "unknown_version": "Unbekannte Version", - "see_patch_notes": "Siehe Patch-Notizen", - "players": "Spieler", - "servers": "Server", - "unable_to_load_playercount": "Spielerzahl konnte nicht geladen werden", - "northstar_running": "Northstar läuft:", - "ea_app_running": "EA App läuft:" - }, - "mods": { - "local": { - "no_mods": "Keine Mods gefunden.", - "delete_confirm": "Bist du dir sicher, dass du diesen Mod löschen möchtest?", - "delete": "Löschen", - "part_of_ts_mod": "Dieser Northstar Mod ist teil eines Thunderstore Mods", - "success_deleting": "{modName} erfolgreich gelöscht" - }, - "online": { - "no_match": "Keine passenden Mods gefunden.", - "try_another_search": "Versuche eine andere Suchanfrage!" - }, - "menu": { - "local": "Lokal", - "online": "Online", - "filter": "Filter", - "search": "Suche", - "sort_mods": "Mods sortieren", - "select_categories": "Kategorien wählen", - "sort": { - "name_asc": "Nach Name (A to Z)", - "name_desc": "Nach Name (Z to A)", - "date_asc": "Nach Datum (älteste zuerst)", - "date_desc": "Nach Datum (neuste zuerst)", - "most_downloaded": "Am meisten heruntergeladen", - "top_rated": "Am besten bewerted" - } - }, - "card": { - "button": { - "being_installed": "Installiert...", - "being_updated": "Aktualisiert...", - "installed": "Installiert", - "install": "Installieren", - "outdated": "Aktualisieren" - }, - "by": "von", - "more_info": "Mehr Info", - "remove": "Mod entfernen", - "remove_dialog_title": "Warnung", - "remove_dialog_text": "Thunderstore Mod entfernen?", - "remove_success": "{modName} entfernt", - "install_success": "{modName} installiert" - } - }, - "settings": { - "manage_install": "Installation verwalten", - "choose_folder": "Installationsordner wählen", - "open_game_folder": "Ordner öffnen", - "nb_ts_mods_per_page": "Anzahl an Thunderstore Mods pro Seite", - "nb_ts_mods_per_page_desc1": "Ändern dieser Einstellung kann die Leistung beim Suchen von Thunderstore Mods beeinflussen.", - "nb_ts_mods_per_page_desc2": "Setze diesen Wert auf 0 um alle Mods auf einer einzelnen Seite anzuzeigen.", - "nb_ts_mods_reset": "Standard wiederherstellen", - "language": "Sprache", - "language_select": "Bevorzugte Sprache wählen", - "about": "Über:", - "flightcore_version": "FlightCore Version:", - "testing": "Testen:", - "enable_test_channels": "Testversionen aktivieren", - "dev_mode_enabled_title": "Vorsicht!", - "dev_mode_enabled_text": "Entwicklermodus aktiviert.", - "repair": { - "title": "Reparieren", - "open_window": "Reparierfenster öffnen", - "window": { - "title": "FlightCore Reparierfenster", - "warning": "Dieses Fenster enthält verschiedene Funktionen um gängige Probleme mit Northstar und FlightCore zu beheben.", - "disable_all_but_core": "Alle außer notwendige Mods deaktivieren", - "disable_all_but_core_success": "Alle außer notwendige Mods wurden deaktiviert", - "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", - "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", - "profile": { - "dialog": { - "title": "Profile", - "delete_confirm": "Sind Sie sich sicher, dass Sie dieses Profil löschen möchten?", - "delete": "Löschen", - "clone": "Duplizieren", - "create_empty": "Neues Profil", - "new_profile_name": "Neuen Profilnamen eingeben" - }, - "active": "Aktives Profil", - "edit": "Profile bearbeiten" - } - }, - "notification": { - "game_folder": { - "new": { - "title": "Neuer Spielordner", - "text": "Spielordner erfolgreich aktualisiert." - }, - "wrong": { - "title": "Falscher Ordner", - "text": "Der gewählte Ordner enthält keine valide Titanfall2 Installation." - }, - "not_found": { - "title": "Titanfall2 nicht gefunden!", - "text": "Bitte wähle den Installationsordner manuell aus" - } - }, - "flightcore_outdated": { - "title": "FlightCore veraltet!", - "text": "Bitte aktualisiere FlightCore.\nDu hast die veraltetet Version {oldVersion}.\nNeuste Version ist {newVersion}!" - }, - "profile": { - "invalid": { - "text": "Das Profil auf das Sie wechseln möchten ist nicht länger gültig.", - "title": "Ungültiges Profil" - } - }, - "no_new": { - "title": "Aktuell", - "text": "Hier gibt es nichts zu sehen!" - }, - "date_prefix": "auf" - }, - "channels": { - "release": { - "switch": { - "text": "Releasekanal zu \"{canal}\" gewechselt." - } - }, - "names": { - "Northstar": "Northstar", - "NorthstarReleaseCandidate": "Northstar Release Candidate" - } - } -} diff --git a/src-vue/src/i18n/lang/en.json b/src-vue/src/i18n/lang/en.json deleted file mode 100644 index 4c3da49f..00000000 --- a/src-vue/src/i18n/lang/en.json +++ /dev/null @@ -1,200 +0,0 @@ -{ - "menu": { - "play": "Play", - "changelog": "Changelog", - "mods": "Mods", - "settings": "Settings", - "dev": "Dev" - }, - - "generic": { - "yes": "Yes", - "no": "No", - "error": "Error", - "confirm": "Confirm", - "cancel": "Cancel", - "informationShort": "Info", - "downloading": "Downloading", - "extracting": "Extracting", - "done": "Done", - "success": "Success" - }, - - "play": { - "button": { - "northstar_is_running": "Game is running", - "select_game_dir": "Select Titanfall2 game folder", - "install": "Install", - "installing": "Installing...", - "update": "Update", - "updating": "Updating...", - "ready_to_play": "Launch game" - }, - - "unknown_version": "Unknown version", - "see_patch_notes": "see patch notes", - "players": "players", - "servers": "servers", - "unable_to_load_playercount": "Unable to load playercount", - "northstar_running": "Northstar is running:", - "ea_app_running": "EA App is running:" - }, - - "mods": { - "local": { - "no_mods": "No mods were found.", - "delete_confirm": "Are you sure to delete this mod?", - "delete": "Delete", - "part_of_ts_mod": "This Northstar mod is part of a Thunderstore mod", - "success_deleting": "Success deleting {modName}" - }, - - "online": { - "no_match": "No matching mod has been found.", - "try_another_search": "Try another search!" - }, - - "menu": { - "local": "Local", - "online": "Online", - "filter": "Filter", - "search": "Search", - "sort_mods": "Sort mods", - "select_categories": "Select categories", - - "sort": { - "name_asc": "By name (A to Z)", - "name_desc": "By name (Z to A)", - "date_asc": "By date (from oldest)", - "date_desc": "By date (from newest)", - "most_downloaded": "Most downloaded", - "top_rated": "Top rated" - } - }, - - "card": { - "button": { - "being_installed": "Installing...", - "being_updated": "Updating...", - "installed": "Installed", - "install": "Install", - "outdated": "Update" - }, - - "by": "by", - "more_info": "More info", - "remove": "Remove mod", - "remove_dialog_title": "Warning", - "remove_dialog_text": "Delete Thunderstore mod?", - "remove_success": "Removed {modName}", - "install_success": "Installed {modName}" - } - }, - - "settings": { - "manage_install": "Manage installation", - "choose_folder": "Choose installation folder", - "open_game_folder": "Open Folder", - "nb_ts_mods_per_page": "Number of Thunderstore mods per page", - "nb_ts_mods_per_page_desc1": "This has an impact on display performances when browsing Thunderstore mods.", - "nb_ts_mods_per_page_desc2": "Set this value to 0 to disable pagination.", - "nb_ts_mods_reset": "Reset to default", - "language": "Language", - "language_select": "Select your favorite language", - "about": "About:", - "flightcore_version": "FlightCore version:", - "testing": "Testing:", - "enable_test_channels": "Enable testing release channels", - "dev_mode_enabled_title": "Watch out!", - "dev_mode_enabled_text": "Developer mode enabled.", - "show_deprecated_mods": "Show deprecated Thunderstore mods", - "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.", - "show_nsfw_mods": "Show NSFW Thunderstore mods", - - "profile": { - "active": "Active Profile", - "edit": "Edit Profiles", - - "dialog": { - "title": "Profiles", - "delete_confirm": "Are you sure to delete this profile?", - "delete": "Delete", - "clone": "Clone", - "new_profile_name": "Enter the new Profile name", - "create_empty": "New Profile" - } - }, - - "repair": { - "title": "Repair", - "open_window": "Open repair window", - - "window": { - "title": "FlightCore repair window", - "warning": "This window contains various functionality to repair common issues with Northstar and FlightCore.", - "disable_all_but_core": "Disable all but core mods", - "disable_all_but_core_success": "Disabled all mods but core", - "disable_modsettings": "Disable ModSettings mod", - "disable_modsettings_success": "Disabled ModSettings mod", - "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" - } - } - }, - - "notification": { - "date_prefix": "at", - "no_new": { - "title": "Up-to-date", - "text": "Nothing to see here!" - }, - - "game_folder": { - "new": { - "title": "New game folder", - "text": "Game folder was successfully updated." - }, - - "wrong": { - "title": "Wrong folder", - "text": "Selected folder is not a valid Titanfall2 install." - }, - - "not_found": { - "title": "Titanfall2 not found!", - "text": "Please manually select install location" - } - }, - - "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}!" - } - }, - - "channels": { - "release": { - "switch": { - "text": "Switched release channel to \"{canal}\"." - } - }, - - "names": { - "Northstar": "Northstar", - "NorthstarReleaseCandidate": "Northstar release candidate" - } - } -} diff --git a/src-vue/src/i18n/lang/es.json b/src-vue/src/i18n/lang/es.json deleted file mode 100644 index 2b4d255c..00000000 --- a/src-vue/src/i18n/lang/es.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "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", - "confirm": "Confirmar" - }, - "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", - "delete_confirm": "Eliminar Perfil?", - "delete": "Eliminar", - "clone": "Duplicar" - } - }, - "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}!" - }, - "no_new": { - "title": "Al día", - "text": "Nada que ver aquí!" - }, - "date_prefix": "en" - }, - "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 deleted file mode 100644 index efc0815b..00000000 --- a/src-vue/src/i18n/lang/fr.json +++ /dev/null @@ -1,177 +0,0 @@ -{ - "menu": { - "play": "Jouer", - "changelog": "Notes", - "mods": "Mods", - "settings": "Paramètres", - "dev": "Dev" - }, - "generic": { - "yes": "Oui", - "no": "Non", - "error": "Erreur", - "cancel": "Annuler", - "informationShort": "Info", - "downloading": "Téléchargement", - "extracting": "Extraction", - "done": "Fait", - "success": "Succès", - "confirm": "Confirmed" - }, - "play": { - "button": { - "northstar_is_running": "En cours d'utilisation", - "select_game_dir": "Sélectionner le dossier du jeu", - "install": "Installer", - "installing": "Installation...", - "update": "Mettre à jour", - "updating": "Mise à jour...", - "ready_to_play": "Jouer" - }, - "unknown_version": "Version inconnue", - "see_patch_notes": "voir les notes de version", - "players": "joueurs", - "servers": "serveurs", - "unable_to_load_playercount": "Impossible de charger les statistiques", - "northstar_running": "Northstar est en cours d'exécution :", - "ea_app_running": "EA App est en cours d'exécution :" - }, - "mods": { - "local": { - "no_mods": "Aucun mod trouvé.", - "delete_confirm": "Êtes-vous certain de vouloir supprimer ce mod ?", - "delete": "Supprimer", - "part_of_ts_mod": "Ce mod Northstar fait partie d'un mod Thunderstore", - "success_deleting": "Succès de la suppression de {modName}" - }, - "online": { - "no_match": "Aucun mod correspondant n'a été trouvé.", - "try_another_search": "Essayez une autre recherche !" - }, - "menu": { - "local": "Local", - "online": "En ligne", - "filter": "Filtrer", - "search": "Chercher", - "sort_mods": "Trier les mods", - "select_categories": "Choisir les catégories", - "sort": { - "name_asc": "Par nom (de A à Z)", - "name_desc": "Par nom (de Z à A)", - "date_asc": "Par date (du plus vieux)", - "date_desc": "Par date (du plus récent)", - "most_downloaded": "Plus téléchargés", - "top_rated": "Mieux notés" - } - }, - "card": { - "button": { - "being_installed": "Installation...", - "being_updated": "Mise à jour...", - "installed": "Installé", - "install": "Installer", - "outdated": "Mettre à jour" - }, - "by": "par", - "more_info": "Plus d'informations", - "remove": "Supprimer le mod", - "remove_dialog_title": "Attention", - "remove_dialog_text": "Voulez-vous vraiment supprimer ce mod Thunderstore ?", - "remove_success": "{modName} supprimé", - "install_success": "{modName} installé" - } - }, - "settings": { - "manage_install": "Gérer l'installation", - "choose_folder": "Choisir le dossier d'installation du jeu", - "open_game_folder": "Ouvrir le dossier du jeu", - "nb_ts_mods_per_page": "Nombre de mods Thunderstore par page", - "nb_ts_mods_per_page_desc1": "Ce paramètre a un impact sur les performances d'affichage des mods Thunderstore.", - "nb_ts_mods_per_page_desc2": "Réglez-le sur 0 pour désactiver la pagination.", - "nb_ts_mods_reset": "Valeur par défaut", - "language": "Langue", - "language_select": "Sélectionnez votre langue", - "about": "À propos", - "flightcore_version": "Version de FlightCore :", - "testing": "Tests :", - "enable_test_channels": "Activer le test de versions de pré-production", - "dev_mode_enabled_title": "Attention !", - "dev_mode_enabled_text": "Mode développeur activé.", - "repair": { - "title": "Dépannage", - "open_window": "Ouvrir la fenêtre de dépannage", - "window": { - "title": "Fenêtre de dépannage FlightCore", - "warning": "Cette fenêtre contient plusieurs fonctionnalité de résolution de problèmes courants avec Northstar et FlightCore.", - "disable_all_but_core": "Désactiver tous les mods (sauf ceux de Northstar)", - "disable_all_but_core_success": "Tous les mods sauf ceux de Northstar ont été désactivés", - "force_reinstall_ns": "Forcer la réinstallation de Northstar", - "force_delete_temp_dl": "Supprimer le dossier de téléchargement temporaire", - "delete_persistent_store": "Supprimer l'espace de stockage local de FlightCore", - "reinstall_title": "Forcer la réinstallation de Northstar", - "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é", - "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.", - "profile": { - "active": "Profile actif", - "edit": "Éditer les profiles", - "dialog": { - "title": "Profiles", - "clone": "Cloner", - "delete": "Supprimer", - "delete_confirm": "Voulez-vous vraiment supprimer ce profil ?", - "create_empty": "nouveau profil", - "new_profile_name": "Entrez le nouveau nom du profil" - } - } - }, - "notification": { - "date_prefix": "à", - "no_new": { - "title": "Vous êtes à jour", - "text": "Rien à voir par ici !" - }, - "game_folder": { - "new": { - "title": "Nouveau dossier", - "text": "Le dossier du jeu a bien été mis à jour." - }, - "wrong": { - "title": "Mauvais dossier", - "text": "Le dossier sélectionné ne contient pas d'installation de Titanfall2." - }, - "not_found": { - "title": "Titanfall2 non trouvé !", - "text": "Veuillez sélectionner manuellement le dossier du jeu." - } - }, - "flightcore_outdated": { - "title": "Mise à jour disponible !", - "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": { - "release": { - "switch": { - "text": "Le canal de téléchargement a été réglé sur \"{canal}\"." - } - }, - "names": { - "Northstar": "Northstar", - "NorthstarReleaseCandidate": "Version de pré-release" - } - } -} diff --git a/src-vue/src/i18n/lang/it.json b/src-vue/src/i18n/lang/it.json deleted file mode 100644 index 9da8ce8d..00000000 --- a/src-vue/src/i18n/lang/it.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "generic": { - "yes": "Si", - "no": "No", - "error": "Errore", - "cancel": "Cancella", - "downloading": "Scaricando", - "extracting": "Estraendo", - "done": "Fatto", - "success": "Successo", - "informationShort": "Info", - "confirm": "Conferma" - }, - "play": { - "unknown_version": "Versione sconosciuta", - "unable_to_load_playercount": "Impossibile caricare numero giocatori", - "northstar_running": "Northstar sta andando:", - "origin_running": "Origin sta andando:", - "see_patch_notes": "guarda le note della patch", - "players": "Giocatori", - "servers": "Server", - "button": { - "northstar_is_running": "Il Gioco sta andando", - "install": "Installa", - "installing": "Installazione...", - "update": "Aggiorna", - "updating": "Aggiornamento...", - "ready_to_play": "Gioca", - "select_game_dir": "Seleziona la cartella di Titanfall 2" - }, - "ea_app_running": "EA App sta andando:" - }, - "mods": { - "local": { - "no_mods": "Nessuna mod è stata trovata.", - "delete_confirm": "Sei sicuro di voler eliminare questa mod?", - "part_of_ts_mod": "Questa Northstar mod è parte di una Thunderstore mod", - "success_deleting": "{modName} Eliminata con successo", - "delete": "Elimina" - }, - "online": { - "no_match": "Nessuna mod corrispondente trovata.", - "try_another_search": "Prova un'altra ricerca!" - }, - "menu": { - "local": "Locale", - "filter": "Filtra", - "online": "Online", - "search": "Cerca", - "sort_mods": "Sorteggia mods", - "select_categories": "Seleziona categorie", - "sort": { - "name_asc": "Per nome (da A alla Z)", - "name_desc": "Per nome (da Z alla A)", - "date_asc": "Per data (dal più vecchio)", - "date_desc": "Per data (dal più recente)", - "most_downloaded": "Più scaricate", - "top_rated": "Più votate" - } - }, - "card": { - "button": { - "being_updated": "Aggiornando...", - "installed": "Installato", - "being_installed": "Installando...", - "install": "Installa", - "outdated": "Aggiorna" - }, - "by": "per", - "more_info": "Più informazioni", - "remove": "Rimuovi mod", - "remove_dialog_title": "Attenzione", - "remove_dialog_text": "Eliminare Thunderstore mod?", - "remove_success": "{modName} Rimossa", - "install_success": "{modName} Installata" - } - }, - "menu": { - "mods": "Mods", - "settings": "Impostazioni", - "dev": "Dev", - "play": "Gioca", - "changelog": "Note" - }, - "notification": { - "game_folder": { - "wrong": { - "title": "Cartella errata", - "text": "La cartella selezionata non ha un'installazione di Titanfall2 valida." - }, - "new": { - "title": "Nuova cartella di gioco", - "text": "Cartella di gioco aggiornata con successo." - }, - "not_found": { - "title": "Titanfall2 non trovato!", - "text": "Per favore selezionare manualmente la posizione dell'installazione" - } - }, - "flightcore_outdated": { - "title": "FlightCore fuori data!", - "text": "Per favore aggiorna FlightCore.\nVersione in uso {oldVersion} fuori data.\nLa più recente è {newVersion}!" - }, - "no_new": { - "text": "Niente da vedere qui!", - "title": "Aggiornato" - }, - "profile": { - "invalid": { - "text": "Il profilo a cui hai provato ad accedere non è più valido.", - "title": "Profilo non valido" - } - } - }, - "settings": { - "manage_install": "Gestisci l'installazione", - "choose_folder": "Scegli la cartella dell'installazione", - "open_game_folder": "Apri Cartella", - "nb_ts_mods_per_page": "Numero di Thunderstore mods per pagina", - "nb_ts_mods_per_page_desc1": "Questo ha un impatto sulle performazioni schermo mentre si navigano le Thunderstore mods.", - "nb_ts_mods_per_page_desc2": "Cambiare questo valore a 0 per disattivare la paginazione.", - "nb_ts_mods_reset": "Resetta a default", - "language": "Lingua", - "language_select": "Seleziona la tua lingua preferito", - "about": "Al riguardo:", - "flightcore_version": "Versione FlighCore:", - "testing": "Testando:", - "enable_test_channels": "Abilita i canali del test di rilascio", - "dev_mode_enabled_title": "Attenzione!", - "dev_mode_enabled_text": "Modalità Sviluppatore attivata.", - "repair": { - "title": "Ripara", - "open_window": "Apri finestra di riparazione", - "window": { - "title": "Finestra riparazione di FlightCore", - "warning": "Questa finestra contiene varie funzionalità per riparare problemi comuni con Northstar e FlightCore.", - "disable_all_but_core": "Disattiva tutte le mods (eccetto quelle di Northstar)", - "disable_all_but_core_success": "Disattivate tutte le mods (eccetto quelle di Northstar)", - "force_reinstall_ns": "Forza reinstallazione di Northstar", - "force_delete_temp_dl": "Forza l'eliminazione della cartella dei download temporanei", - "delete_persistent_store": "Elimina lo spazio d'archiviazione persistente di FlightCore", - "reinstall_title": "Reinstallando Northstar forzatamente", - "reinstall_text": "Attendere per favore", - "reinstall_success": "Northstar reinstallato con successo", - "kill_northstar_process": "Ferma il processo Northstar/Titanfall2 in esecuzione", - "disable_modsettings_success": "ModSettings disabilitata", - "disable_modsettings": "Disabilita la mod ModSettings" - } - }, - "profile": { - "active": "Profilo attivo", - "dialog": { - "clone": "Clona", - "delete": "Elimina", - "delete_confirm": "Sei sicuro di voler eliminare questo profilo?", - "title": "Profili" - }, - "edit": "Modifica profilo" - }, - "show_deprecated_mods": "Mostra mod di Thunderstore deprecate", - "show_deprecated_mods_desc2": "Fai attenzione, alcune mod di solito sono deprecate per un buon motivo.", - "show_deprecated_mods_desc1": "Permette di vedere le mod deprecate nella collezione online." - }, - "channels": { - "release": { - "switch": { - "text": "Cambiato il canale di rilascio a \"{canal}\"." - } - }, - "names": { - "Northstar": "Northstar", - "NorthstarReleaseCandidate": "Northstar versione pre-rilascio" - } - } -} diff --git a/src-vue/src/i18n/lang/pl.json b/src-vue/src/i18n/lang/pl.json deleted file mode 100644 index 175d6eb3..00000000 --- a/src-vue/src/i18n/lang/pl.json +++ /dev/null @@ -1,177 +0,0 @@ -{ - "menu": { - "changelog": "Dziennik zmian", - "mods": "Mody", - "settings": "Ustawienia", - "dev": "Dev", - "play": "Graj" - }, - "generic": { - "yes": "Tak", - "no": "Nie", - "error": "Błąd", - "cancel": "Anuluj", - "downloading": "Pobieranie", - "extracting": "Wypakowywanie", - "done": "Gotowe", - "success": "Sukces", - "informationShort": "Informacja", - "confirm": "Potwierdź" - }, - "play": { - "button": { - "northstar_is_running": "Gra jest uruchomiona", - "select_game_dir": "Wybierz folder gry Titanfall2", - "install": "Zainstaluj", - "update": "Aktualizuj", - "updating": "Aktualizowanie...", - "ready_to_play": "Uruchom grę", - "installing": "Instalowanie..." - }, - "unknown_version": "Nieznana wersja", - "see_patch_notes": "zobacz listę zmian", - "players": "gracze", - "servers": "serwery", - "northstar_running": "Northstar jest uruchomiony:", - "ea_app_running": "EA App jest uruchomiony:", - "unable_to_load_playercount": "Nie można załadować liczby graczy" - }, - "mods": { - "local": { - "no_mods": "Nie znaleziono żadnych modów.", - "delete_confirm": "Czy na pewno chcesz usunąć ten mod?", - "delete": "Usuń", - "success_deleting": "Sukces usuwania {modName}", - "part_of_ts_mod": "Ten mod Northstar jest częścią moda Thunderstore" - }, - "online": { - "no_match": "Nie znaleziono pasującego moda.", - "try_another_search": "Spróbuj innego wyszukiwania!" - }, - "menu": { - "local": "Lokalne", - "online": "Online", - "filter": "Filtry", - "search": "Szukaj", - "sort_mods": "Sortowanie modów", - "select_categories": "Wybierz kategorie", - "sort": { - "name_asc": "Według nazwy (od A do Z)", - "name_desc": "Według nazwy (od Z do A)", - "date_desc": "Według daty (od najnowszej)", - "most_downloaded": "Najczęściej pobierane", - "top_rated": "Najwyżej ocenione", - "date_asc": "Według daty (od najstarszej)" - } - }, - "card": { - "button": { - "being_installed": "Instalowanie...", - "being_updated": "Aktualizowanie...", - "installed": "Zainstalowano", - "install": "Zainstaluj", - "outdated": "Aktualizuj" - }, - "by": "od", - "more_info": "Więcej informacji", - "remove": "Usuń moda", - "remove_dialog_title": "Ostrzeżenie", - "remove_dialog_text": "Usunąć mod Thunderstore?", - "remove_success": "Usunięto {modName}", - "install_success": "Zainstalowano {modName}" - } - }, - "settings": { - "manage_install": "Zarządzaj instalacją", - "choose_folder": "Wybierz folder instalacyjny", - "nb_ts_mods_per_page": "Liczba modów Thunderstore na stronie", - "nb_ts_mods_per_page_desc2": "Ustaw tę wartość na 0, aby wyłączyć paginację.", - "nb_ts_mods_reset": "Przywrócenie ustawień domyślnych", - "language": "Język", - "language_select": "Wybierz swój ulubiony język", - "about": "O:", - "flightcore_version": "Wersja FlightCore:", - "testing": "Testy:", - "enable_test_channels": "Włączenie kanałów wydań testowych", - "dev_mode_enabled_title": "Uważaj!", - "dev_mode_enabled_text": "Tryb deweloperski włączony.", - "repair": { - "title": "Naprawa", - "open_window": "Otwórz okno naprawy", - "window": { - "disable_all_but_core": "Wyłączenie wszystkich modów poza podstawowymi", - "disable_all_but_core_success": "Wyłączone wszystkie mody oprócz podstawowych", - "force_reinstall_ns": "Wymuś reinstalację Northstara", - "force_delete_temp_dl": "Wymuś usunięcie folderu tymczasowego pobierania", - "delete_persistent_store": "Usuń stały magazyn FlightCore", - "reinstall_title": "Wymuszona reinstalacja Northstara", - "reinstall_text": "Proszę czekać", - "reinstall_success": "Pomyślnie przeinstalowano Northstar", - "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", - "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.", - "profile": { - "active": "Aktywny profil", - "dialog": { - "title": "Profile", - "delete": "Usuń", - "clone": "Klonuj", - "new_profile_name": "Wprowadź nową nazwę profilu", - "create_empty": "Nowy profil", - "delete_confirm": "Czy na pewno chcesz usunąć ten profil?" - }, - "edit": "Edytuj profile" - } - }, - "notification": { - "game_folder": { - "new": { - "title": "Nowy folder z grą", - "text": "Folder gry został pomyślnie zaktualizowany." - }, - "wrong": { - "title": "Niewłaściwy folder", - "text": "Wybrany folder nie jest poprawną instalacją Titanfall2." - }, - "not_found": { - "title": "Nie znaleziono Titanfall2!", - "text": "Proszę ręcznie wybrać lokalizację instalacji" - } - }, - "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." - } - }, - "no_new": { - "title": "Aktualny", - "text": "Nie ma tu nic do obejrzenia!" - }, - "date_prefix": "na" - }, - "channels": { - "release": { - "switch": { - "text": "Przełączono kanał wydań na \"{canal}\"." - } - }, - "names": { - "Northstar": "Northstar", - "NorthstarReleaseCandidate": "Kandydat do wydania Northstar" - } - } -} diff --git a/src-vue/src/i18n/lang/ru.json b/src-vue/src/i18n/lang/ru.json deleted file mode 100644 index b0261299..00000000 --- a/src-vue/src/i18n/lang/ru.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "generic": { - "yes": "Да", - "no": "Нет", - "extracting": "Распаковывание", - "done": "Готово", - "success": "Успешно", - "error": "Ошибка", - "cancel": "Отмена", - "informationShort": "Информация", - "downloading": "Скачивание", - "confirm": "Подтвердить" - }, - "menu": { - "mods": "Моды", - "play": "Играть", - "settings": "Настройки", - "dev": "Разработчик", - "changelog": "Обновления" - }, - "play": { - "button": { - "northstar_is_running": "Игра запущена", - "install": "Установить", - "installing": "Установка...", - "updating": "Обновление...", - "ready_to_play": "Запустить игру", - "update": "Обновить", - "select_game_dir": "Выберите папку с Titanfall 2" - }, - "unknown_version": "Неизвестная версия", - "players": "игроков", - "servers": "серверов", - "unable_to_load_playercount": "Не можем загрузить количество игроков", - "northstar_running": "Northstar запущен:", - "ea_app_running": "EA App запущен:", - "see_patch_notes": "просмотреть список изменений" - }, - "mods": { - "local": { - "delete_confirm": "Вы уверены, что хотите удалить этот мод?", - "delete": "Удалить", - "success_deleting": "{modName} Успешно удален", - "no_mods": "Моды не найдены.", - "part_of_ts_mod": "Этот мод Northstar является частью мода на Thunderstore" - }, - "online": { - "no_match": "Не найдено совпадающих модов.", - "try_another_search": "Попробуйте другой запрос!" - }, - "menu": { - "online": "Онлайн", - "filter": "Фильтр", - "search": "Поиск", - "sort_mods": "Сортировать моды", - "sort": { - "name_asc": "По имени (от A до Z)", - "name_desc": "По имени (от Z до A)", - "date_asc": "По дате (со старейшего)", - "date_desc": "По дате (с новейшего)", - "top_rated": "Самый популярный", - "most_downloaded": "Самый загружаемый" - }, - "local": "Установленные", - "select_categories": "Выбрать категории" - }, - "card": { - "button": { - "being_installed": "Установка...", - "being_updated": "Обновление...", - "installed": "Установлен", - "install": "Установить", - "outdated": "Обновить" - }, - "by": "от", - "remove": "Удалить мод", - "remove_dialog_title": "Внимание", - "remove_dialog_text": "Удалить мод Thunderstore?", - "remove_success": "{modName} Удален", - "more_info": "Подробнее", - "install_success": "{modName} Установлен" - } - }, - "settings": { - "manage_install": "Управлять установкой", - "choose_folder": "Выберите папку установки", - "open_game_folder": "Открыть папку", - "nb_ts_mods_reset": "Вернуть по умолчанию", - "language": "Язык", - "language_select": "Выберите свой любимый язык", - "testing": "Тестирование:", - "enable_test_channels": "Включить каналы с тестовыми релизами", - "dev_mode_enabled_title": "Осторожно!", - "repair": { - "open_window": "Открыть окно фиксов", - "window": { - "title": "Окно фиксов FlightCore", - "force_reinstall_ns": "Принудительно переустановить Northstar", - "delete_persistent_store": "Удалить постоянное хранилище FlightCore", - "reinstall_title": "Принудительно переустанавливаем Northstar", - "reinstall_text": "Пожалуйста, подождите", - "disable_all_but_core_success": "Выключены все моды кроме главных", - "disable_all_but_core": "Выключить все моды, кроме главных", - "warning": "Это окно содержит различные функции для устранения часто возникающих проблем с Northstar и FlightCore.", - "force_delete_temp_dl": "Принудительно удалить папку с временными загрузками", - "reinstall_success": "Northstar успешно переустановлен", - "disable_modsettings": "Выключить мод ModSettings", - "disable_modsettings_success": "Выключен мод ModSettings", - "kill_northstar_process": "Закрыть запущенный Northstar/Titanfall 2" - }, - "title": "Фиксы" - }, - "nb_ts_mods_per_page_desc1": "Это влияет на производительность при просмотре модов с Thunderstore.", - "about": "Информация:", - "nb_ts_mods_per_page": "Количество модов Thunderstore на каждую страницу", - "nb_ts_mods_per_page_desc2": "Установите это значение на 0, чтобы отключить страницы.", - "flightcore_version": "Версия FlightCore:", - "dev_mode_enabled_text": "Включен режим разработчика.", - "show_deprecated_mods": "Показать устаревшие моды Thunderstore", - "show_deprecated_mods_desc1": "Это позволяет вам видеть устаревшие моды в меню онлайн модов.", - "show_deprecated_mods_desc2": "Внимание, такие моды обычно устаревшие по хорошей причине.", - "profile": { - "active": "Активный Профиль", - "edit": "Редактировать Профили", - "dialog": { - "title": "Профили", - "clone": "Копировать", - "delete": "Удалить", - "delete_confirm": "Вы уверены, что хотите удалить этот профиль?", - "new_profile_name": "Введите новое имя профиля", - "create_empty": "Новый профиль" - } - }, - "show_nsfw_mods": "Показывать NSFW-моды с Thunderstore" - }, - "notification": { - "game_folder": { - "new": { - "title": "Новая папка игры", - "text": "Папка игры успешно обновлена." - }, - "wrong": { - "title": "Неправильная папка", - "text": "Выбранная папка не является папкой с Titanfall 2." - }, - "not_found": { - "title": "Titanfall 2 не найден!", - "text": "Пожалуйста, вручную выберите место установки" - } - }, - "flightcore_outdated": { - "title": "FlightCore устарел!", - "text": "Пожалуйста, обновите FlightCore\nСейчас запущена старая версия - {oldVersion}.\nНовейшая версия - {newVersion}!" - }, - "profile": { - "invalid": { - "title": "Некорректный Профиль", - "text": "Профиль, на который вы пытаетесь переключиться, больше не является корректным." - } - }, - "no_new": { - "text": "Смотреть здесь нечего!", - "title": "Нет уведомлений" - }, - "date_prefix": "в" - }, - "channels": { - "release": { - "switch": { - "text": "Релизный канал переключен на \"{canal}\"." - } - }, - "names": { - "Northstar": "Northstar", - "NorthstarReleaseCandidate": "Пре-релизная версия Northstar" - } - } -} diff --git a/src-vue/src/i18n/lang/zh_Hans.json b/src-vue/src/i18n/lang/zh_Hans.json deleted file mode 100644 index dca36f98..00000000 --- a/src-vue/src/i18n/lang/zh_Hans.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "menu": { - "mods": "模组", - "settings": "设置", - "dev": "开发者模式", - "play": "开始游玩", - "changelog": "更新日志" - }, - "generic": { - "error": "错误", - "cancel": "取消", - "yes": "是", - "no": "否", - "informationShort": "信息", - "downloading": "下载中", - "extracting": "解压中", - "done": "完成", - "success": "成功", - "confirm": "确认" - }, - "play": { - "button": { - "northstar_is_running": "游戏正在运行", - "select_game_dir": "选择Titanfall 2游戏目录", - "install": "安装", - "installing": "安装中...", - "update": "升级", - "ready_to_play": "启动游戏", - "updating": "升级中..." - }, - "unknown_version": "未知版本", - "see_patch_notes": "参阅相关补丁说明", - "servers": "服务器", - "players": "玩家", - "unable_to_load_playercount": "加载玩家数量失败", - "ea_app_running": "EA App运行状态:", - "northstar_running": "Northstar运行状态:" - }, - "mods": { - "local": { - "no_mods": "未找到模组。", - "delete_confirm": "你确定要删除该模组吗?", - "delete": "删除", - "part_of_ts_mod": "该Northstar模组来源于Thunderstore", - "success_deleting": "成功删除 {modName}" - }, - "online": { - "try_another_search": "尝试其他搜索方式!", - "no_match": "未找到相匹配的模组。" - }, - "menu": { - "local": "本地", - "search": "搜索", - "sort_mods": "模组排序", - "select_categories": "标签选择", - "sort": { - "date_desc": "日期降序", - "date_asc": "日期升序", - "name_desc": "按名称(Z到A)", - "most_downloaded": "最多下载", - "top_rated": "最高评分", - "name_asc": "按名称(A到Z)" - }, - "online": "线上", - "filter": "筛选" - }, - "card": { - "button": { - "being_installed": "安装中...", - "being_updated": "升级中...", - "installed": "已安装", - "install": "安装", - "outdated": "升级" - }, - "by": "作者:", - "remove": "移除模组", - "remove_dialog_title": "警告", - "remove_success": "已移除{modName}", - "install_success": "已安装 {modName}", - "more_info": "更多信息", - "remove_dialog_text": "删除该来自Thunderstore的模组?" - } - }, - "settings": { - "manage_install": "安装管理", - "choose_folder": "选择安装目录", - "open_game_folder": "打开文件夹", - "nb_ts_mods_per_page": "Thunderstore每页显示多少个模组", - "nb_ts_mods_per_page_desc2": "该值设为0时将不再显示页码。", - "nb_ts_mods_reset": "重置为默认值", - "language": "语言", - "language_select": "请选择你需要的语言", - "about": "关于:", - "flightcore_version": "FlightCore 版本:", - "testing": "测试选项:", - "enable_test_channels": "开启测试版本选项", - "nb_ts_mods_per_page_desc1": "该数值对加载Thunderstore页面时的速度有影响。", - "dev_mode_enabled_title": "看上面!", - "dev_mode_enabled_text": "开发者模式已启用。", - "show_deprecated_mods": "显示已弃用的Thunderstore模组", - "show_deprecated_mods_desc1": "该选项会使您可以在线上模组合集中看到已弃用的模组。", - "show_deprecated_mods_desc2": "请注意,这类模组被弃用一般是有原因的。", - "repair": { - "title": "修复", - "window": { - "title": "FlightCore 修复工具", - "warning": "此工具包含修复Northstar和FlightCore各种常见问题的功能。", - "disable_all_but_core": "除了核心模组以外禁用其他模组", - "disable_all_but_core_success": "已禁用除核心模组以外的所有模组", - "disable_modsettings": "禁用ModSettings模组", - "disable_modsettings_success": "已禁用ModSettings模组", - "force_delete_temp_dl": "强制删除临时下载目录", - "delete_persistent_store": "删除FlightCore永久存储文件", - "reinstall_text": "请耐心等待", - "reinstall_success": "成功重装Northstar", - "force_reinstall_ns": "强制重装Northstar", - "reinstall_title": "正在强制重装Northstar", - "kill_northstar_process": "终止正在运行的 Northstar/Titanfall2 进程" - }, - "open_window": "打开修复工具" - }, - "profile": { - "active": "当前用户配置", - "edit": "编辑用户配置", - "dialog": { - "title": "用户配置", - "delete_confirm": "你确定要删除此配置文件吗?", - "delete": "删除" - } - } - }, - "notification": { - "game_folder": { - "new": { - "title": "新的游戏目录", - "text": "已成功更新游戏目录。" - }, - "wrong": { - "title": "错误的文件夹", - "text": "所选文件夹不是有效的Titanfall2安装目录。" - }, - "not_found": { - "title": "未找到Titanfall2!", - "text": "请手动选择安装目录" - } - }, - "flightcore_outdated": { - "title": "FlightCore需要更新!", - "text": "请更新FlightCore.\n正在运行旧版本 {oldVersion}.\n最新版本为 {newVersion}!" - }, - "profile": { - "invalid": { - "title": "无效用户配置", - "text": "您尝试切换到的用户配置已失效。" - } - } - }, - "channels": { - "release": { - "switch": { - "text": "将资源版本切换至 \"{canal}\"." - } - }, - "names": { - "NorthstarReleaseCandidate": "Northstar测试版本", - "Northstar": "Northstar" - } - } -} diff --git a/src-vue/src/main.ts b/src-vue/src/main.ts deleted file mode 100644 index 73219c9d..00000000 --- a/src-vue/src/main.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { createApp } from 'vue' -import { createI18n } from "vue-i18n"; -import App from './App.vue' -import ElementPlus from "element-plus"; -import * as ElementPlusIconsVue from '@element-plus/icons-vue' -import { store } from './plugins/store'; -import PlayView from "./views/PlayView.vue"; -import ChangelogView from "./views/ChangelogView.vue"; -import ModsView from "./views/ModsView.vue"; -import SettingsView from "./views/SettingsView.vue"; -import DeveloperView from "./views/DeveloperView.vue"; -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"; -import zh_Hans from "./i18n/lang/zh_Hans.json"; - - -const app = createApp(App); - -// internationalization -export const i18n = createI18n({ - locale: 'en', - fallbackLocale: 'en', - messages: { - en, fr, da, de, es, pl, ru, it, zh_Hans - } -}); -app.use(i18n); - -// styles -import 'element-plus/theme-chalk/index.css'; -import './style.css' - -app.use(ElementPlus); - -// icons -for (const [key, component] of Object.entries(ElementPlusIconsVue)) { - app.component(key, component); -} - -// style -app.use( store, '$store' ); - - -// routes -const routes = [ - { path: '/', name: 'Main', component: async () => PlayView}, - { path: '/changelog', name: 'Changelog', component: async () => ChangelogView}, - { path: '/mods', name: 'Mods', component: async () => ModsView}, - { path: '/settings', name: 'Settings', component: async () => SettingsView}, - { path: '/dev', name: 'Dev', component: async () => DeveloperView}, - { path: '/repair', name: 'Repair', component: async () => RepairView}, -]; -export const router = createRouter({ - history: createWebHashHistory(), - routes, // short for `routes: routes` -}); -app.use(router); - - -app.mount('#app') diff --git a/src-vue/src/plugins/modules/notifications.ts b/src-vue/src/plugins/modules/notifications.ts deleted file mode 100644 index ed57f8af..00000000 --- a/src-vue/src/plugins/modules/notifications.ts +++ /dev/null @@ -1,31 +0,0 @@ -type NotificationType = 'success' | 'warning' | 'info' | 'error'; - -export interface Notification { - title: string; - text: string; - type: NotificationType; -} - -interface NotificationsStoreState { - notifications: Notification[]; -} - - -/** - * This notification module is meant to host the list of notifications that have been fired while the application was - * not focused. - * This list is then used by the [NotificationButton] component to display notifications to user. - **/ -export const notificationsModule = { - state: () => ({ - notifications: [] - }) as NotificationsStoreState, - mutations: { - addNotification(state: NotificationsStoreState, payload: Notification) { - state.notifications.push(payload); - }, - removeNotification(state: NotificationsStoreState, index: number): void { - state.notifications.splice(index, 1); - } - } - } diff --git a/src-vue/src/plugins/modules/pull_requests.ts b/src-vue/src/plugins/modules/pull_requests.ts deleted file mode 100644 index 4caec0b0..00000000 --- a/src-vue/src/plugins/modules/pull_requests.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { invoke, shell } from "@tauri-apps/api"; -import { PullsApiResponseElement } from "../../../../src-tauri/bindings/PullsApiResponseElement"; -import { PullRequestType } from '../../../../src-tauri/bindings/PullRequestType'; -import { store } from "../store"; -import { showErrorNotification, showNotification } from "../../utils/ui"; - -interface PullRequestStoreState { - searchValue: string, - pull_requests_launcher: PullsApiResponseElement[], - pull_requests_mods: PullsApiResponseElement[], -} - -export const pullRequestModule = { - state: () => ({ - pull_requests_launcher: [], - pull_requests_mods: [], - }), - mutations: { - async getPullRequests(state: PullRequestStoreState, pull_request_type: PullRequestType) { - await invoke<PullsApiResponseElement[]>("get_pull_requests_wrapper", { installType: pull_request_type }) - .then((message) => { - switch (pull_request_type) { - case "Mods": - state.pull_requests_mods = message; - break; - - case "Launcher": - state.pull_requests_launcher = message; - break; - - default: - console.error("We should never end up here"); - } - }) - .catch((error) => { - showErrorNotification(error); - }); - }, - async downloadLauncherPR(state: PullRequestStoreState, pull_request: PullsApiResponseElement) { - await invoke<string>("get_launcher_download_link", { commitSha: pull_request.head.sha }) - .then((url) => { - // Open URL in default HTTPS handler (i.e. default browser) - shell.open(url); - }) - .catch((error) => { - showErrorNotification(error); - }); - }, - async downloadModsPR(state: PullRequestStoreState, pull_request: PullsApiResponseElement) { - let url = `https://github.com/${pull_request.head.repo.full_name}/archive/refs/heads/${pull_request.head.ref}.zip` - shell.open(url); - }, - async installLauncherPR(state: PullRequestStoreState, pull_request: PullsApiResponseElement) { - // Send notification telling the user to wait for the process to finish - const notification = showNotification(`Installing launcher PR ${pull_request.number}`, 'Please wait', 'info', 0); - - await invoke("apply_launcher_pr", { pullRequest: pull_request, gameInstall: store.state.game_install }) - .then((message) => { - console.log(message); - // Show user notification if mod install completed. - showNotification(`Done`, `Installed ${pull_request.number}: "${pull_request.title}"`); - }) - .catch((error) => { - showErrorNotification(error); - }) - .finally(() => { - // Clear old notification - notification.close(); - }); - }, - async installModsPR(state: PullRequestStoreState, pull_request: PullsApiResponseElement) { - // Send notification telling the user to wait for the process to finish - const notification = showNotification(`Installing mods PR ${pull_request.number}`, 'Please wait', 'info', 0); - - await invoke("apply_mods_pr", { pullRequest: pull_request, gameInstall: store.state.game_install }) - .then((message) => { - // Show user notification if mod install completed. - showNotification( - `Done`, - `Installed ${pull_request.number}: "${pull_request.title}"\nMake sure to launch via batch file or by specifying correct profile!`, - 'success', - 7000 - ); - }) - .catch((error) => { - showErrorNotification(error); - }) - .finally(() => { - // Clear old notification - notification.close(); - }); - }, - } -} diff --git a/src-vue/src/plugins/modules/search.ts b/src-vue/src/plugins/modules/search.ts deleted file mode 100644 index 9614b0be..00000000 --- a/src-vue/src/plugins/modules/search.ts +++ /dev/null @@ -1,20 +0,0 @@ -interface SearchStoreState { - searchValue: string -} - -export const searchModule = { - state: () => ({ - // This is the treated value of search input - searchValue: '', - // Selected mod categories - selectedCategories: [], - showDeprecatedMods: false, - showNsfwMods: false, - sortValue: {label: '', value: ''} - }), - getters: { - searchWords(state: SearchStoreState): string { - return state.searchValue.toLowerCase(); - } - } - } diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts deleted file mode 100644 index b61ac573..00000000 --- a/src-vue/src/plugins/store.ts +++ /dev/null @@ -1,529 +0,0 @@ -import { createStore } from 'vuex'; -import { listen, Event as TauriEvent } from "@tauri-apps/api/event"; -import { Tabs } from "../utils/Tabs"; -import { InstallType } from "../../../src-tauri/bindings/InstallType"; -import { invoke } from "@tauri-apps/api"; -import { GameInstall } from "../utils/GameInstall"; -import { ReleaseCanal } from "../utils/ReleaseCanal"; -import { FlightCoreVersion } from "../../../src-tauri/bindings/FlightCoreVersion"; -import { NotificationHandle } from 'element-plus'; -import { NorthstarState } from '../utils/NorthstarState'; -import { appDir } from '@tauri-apps/api/path'; -import { open } from '@tauri-apps/api/dialog'; -import { Store } from 'tauri-plugin-store-api'; -import { router } from "../main"; -import { ReleaseInfo } from "../../../src-tauri/bindings/ReleaseInfo"; -import { ThunderstoreMod } from "../../../src-tauri/bindings/ThunderstoreMod"; -import { NorthstarMod } from "../../../src-tauri/bindings/NorthstarMod"; -import { NorthstarLaunchOptions } from "../../../src-tauri/bindings/NorthstarLaunchOptions" -import { searchModule } from './modules/search'; -import { i18n } from '../main'; -import { pullRequestModule } from './modules/pull_requests'; -import { showErrorNotification, showNotification } from '../utils/ui'; -import { notificationsModule } from './modules/notifications'; - -const persistentStore = new Store('flight-core-settings.json'); - - -export interface FlightCoreStore { - developer_mode: boolean, - game_install: GameInstall, - - flightcore_version: string, - - installed_northstar_version: string, - northstar_state: NorthstarState, - northstar_release_canal: ReleaseCanal, - enableReleasesSwitch: boolean, - releaseNotes: ReleaseInfo[], - - thunderstoreMods: ThunderstoreMod[], - thunderstoreModsCategories: string[], - installed_mods: NorthstarMod[], - available_profiles: string[], - - northstar_is_running: boolean, - origin_is_running: boolean, - - player_count: number, - server_count: number, - - // user custom settings - mods_per_page: number, -} - -let notification_handle: NotificationHandle; - - -export const store = createStore<FlightCoreStore>({ - modules: { - search: searchModule, - pullrequests: pullRequestModule, - notifications: notificationsModule - }, - state(): FlightCoreStore { - return { - developer_mode: false, - game_install: {game_path: undefined, profile: undefined, install_type: "UNKNOWN"} as unknown as GameInstall, - - available_profiles: [], - - flightcore_version: "", - - installed_northstar_version: "", - northstar_state: NorthstarState.GAME_NOT_FOUND, - northstar_release_canal: ReleaseCanal.RELEASE, - enableReleasesSwitch: false, - releaseNotes: [], - - thunderstoreMods: [], - thunderstoreModsCategories: [], - installed_mods: [], - - northstar_is_running: false, - origin_is_running: false, - - player_count: -1, - server_count: -1, - - mods_per_page: 20, - } - }, - mutations: { - checkNorthstarUpdates(state) { - _get_northstar_version_number(state); - }, - async toggleDebugMode(_state) { - let menu_bar_handle = document.querySelector('#fc_menu-bar'); - if (menu_bar_handle !== null) { - menu_bar_handle.classList.toggle('developer_build'); - } - }, - async toggleDeveloperMode(state) { - state.developer_mode = !state.developer_mode; - - // Reset tab when closing dev mode. - if (!state.developer_mode) { - store.commit('updateCurrentTab', Tabs.PLAY); - } - - // Save dev mode state in persistent store - await persistentStore.set('dev_mode', state.developer_mode); - await persistentStore.save(); - }, - initialize(state) { - _initializeApp(state); - _checkForFlightCoreUpdates(state); - _initializeListeners(state); - }, - updateCurrentTab(state: any, newTab: Tabs) { - router.push({ path: newTab }); - }, - async updateGamePath(state: FlightCoreStore) { - // Open a selection dialog for directories - const selected = await open({ - directory: true, - multiple: false, - defaultPath: await appDir(), - }); - if (Array.isArray(selected)) { - // user selected multiple directories - alert("Please only select a single directory"); - } else if (selected === null) { - // user cancelled the selection - } else { - // user selected a single directory - - // Verify if valid Titanfall2 install location - let is_valid_titanfall2_install = await invoke("verify_install_location", { gamePath: selected }) as boolean; - if (is_valid_titanfall2_install) { - state.game_install.game_path = selected; - showNotification( - i18n.global.tc('notification.game_folder.new.title'), - i18n.global.tc('notification.game_folder.new.text') - ); - try { - notification_handle.close(); - } - catch { - console.warn("Nothing to close"); - } - state.game_install.install_type = "UNKNOWN"; - - // Save change in persistent store - await persistentStore.set('game-install', { value: state.game_install }); - await persistentStore.save(); // explicit save to disk - - // We can no longer be sure if our last profile is valid, lets reset to be sure - state.game_install.profile = "R2Northstar"; - - // Check for Northstar install - store.commit('checkNorthstarUpdates'); - - // Since we are in a new game directory, lets see if there are any profiles - store.commit('fetchProfiles'); - - } - else { - // Not valid Titanfall2 install - showErrorNotification( - i18n.global.tc('notification.game_folder.wrong.text'), - i18n.global.tc('notification.game_folder.wrong.title') - ); - } - } - }, - async launchGame(state: any, launch_options: NorthstarLaunchOptions = { launch_via_steam: false, bypass_checks: false}) { - - if (launch_options.bypass_checks) { - await invoke("launch_northstar", { gameInstall: state.game_install, launchOptions: launch_options }) - .then((message) => { - console.log("Launched with bypassed checks"); - console.log(message); - }) - .catch((error) => { - console.error(error); - alert(error); - }); - - return; - } - - // TODO update installation if release track was switched - switch (state.northstar_state) { - // Install northstar if it wasn't detected. - case NorthstarState.INSTALL: - let install_northstar_result = invoke("install_northstar_wrapper", { gameInstall: state.game_install, northstarPackageName: state.northstar_release_canal }); - state.northstar_state = NorthstarState.INSTALLING; - - await install_northstar_result.then((message) => { - console.log(message); - }) - .catch((error) => { - console.error(error); - alert(error); - }); - - _get_northstar_version_number(state); - break; - - // Update northstar if it is outdated. - case NorthstarState.MUST_UPDATE: - // Updating is the same as installing, simply overwrites the existing files - let reinstall_northstar_result = invoke("install_northstar_wrapper", { gameInstall: state.game_install, northstarPackageName: state.northstar_release_canal }); - state.northstar_state = NorthstarState.UPDATING; - - await reinstall_northstar_result.then((message) => { - console.log(message); - }) - .catch((error) => { - console.error(error); - alert(error); - }); - - _get_northstar_version_number(state); - break; - - // Game is ready to play. - case NorthstarState.READY_TO_PLAY: - await invoke("launch_northstar", { gameInstall: state.game_install, launchOptions: launch_options }) - .then((message) => { - console.log(message); - // NorthstarState.RUNNING - }) - .catch((error) => { - console.error(error); - showErrorNotification(error); - }); - break; - - case NorthstarState.GAME_NOT_FOUND: - store.commit('updateGamePath'); - break; - } - }, - async launchGameSteam(state: any, launch_options: NorthstarLaunchOptions = { launch_via_steam: true, bypass_checks: false}) { - await invoke("launch_northstar", { gameInstall: state.game_install, launchOptions: launch_options }) - .then((message) => { - showNotification('Success'); - }) - .catch((error) => { - console.error(error); - showErrorNotification(error); - }); - - return; - }, - async fetchReleaseNotes(state: FlightCoreStore) { - if (state.releaseNotes.length !== 0) return; - await invoke<ReleaseInfo[]>("get_northstar_release_notes") - .then((message) => { - state.releaseNotes = message; - }) - .catch((error) => { - showErrorNotification(error); - }); - }, - async fetchThunderstoreMods(state: FlightCoreStore) { - // To check if some Thunderstore mods are already installed/outdated, we need to load locally-installed mods. - await store.commit('loadInstalledMods'); - if (state.thunderstoreMods.length !== 0) return; - - let mods: ThunderstoreMod[] = []; - await invoke<ThunderstoreMod[]>("query_thunderstore_packages_api") - .then((message) => { - mods = message; - }) - .catch((error) => { - showErrorNotification(error); - console.error(error); - return; - }); - - if (mods == undefined) { - return; - } - - // Remove some mods from listing - state.thunderstoreMods = mods; - - // Retrieve categories from mods - state.thunderstoreModsCategories = mods - .map((mod: ThunderstoreMod) => mod.categories) - .filter((modCategories: string[]) => modCategories.length !== 0) - .reduce((accumulator: string[], modCategories: string[]) => { - accumulator.push( ...modCategories.filter((cat: string) => !accumulator.includes(cat)) ); - return accumulator; - }, []) - .sort(); - }, - async loadInstalledMods(state: FlightCoreStore) { - // If there's no game path, prevent looking for installed mods. - if (state.game_install.game_path === undefined) { - console.warn('Cannot load installed mods since no game path is selected.'); - 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) => { - state.installed_mods = (message as NorthstarMod[]); - }) - .catch((error) => { - console.error(error); - showErrorNotification(error); - }); - }, - async toggleReleaseCandidate(state: FlightCoreStore) { - // Flip between RELEASE and RELEASE_CANDIDATE - state.northstar_release_canal = state.northstar_release_canal === ReleaseCanal.RELEASE - ? ReleaseCanal.RELEASE_CANDIDATE - : ReleaseCanal.RELEASE; - - // Save change in persistent store - await persistentStore.set('northstar-release-canal', { value: state.northstar_release_canal }); - await persistentStore.save(); // explicit save to disk - - // Update current state so that update check etc can be performed - store.commit("checkNorthstarUpdates"); - - // Display notification to highlight change - showNotification( - 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) { - // To fetch profiles we need a valid game path - if (!state.game_install.game_path) { - return; - } - - - await invoke("fetch_profiles", { gameInstall: state.game_install }) - .then((message) => { - state.available_profiles = message as string[]; - }) - .catch((error) => { - console.error(error); - showErrorNotification(error); - }); - } - } -}); - -/** - * This is called when application root component has been mounted. - * It invokes all Rust methods that are needed to initialize UI. - */ -async function _initializeApp(state: any) { - // Display dev view if dev mode was previously enabled. - const devModeEnabled: boolean = await persistentStore.get('dev_mode') ?? false; - const debugModeEnabled: boolean = await invoke("is_debug_mode"); - if (devModeEnabled) { - store.commit('toggleDeveloperMode'); - } - if (debugModeEnabled) { - store.commit('toggleDebugMode'); - } - - // Disable context menu in release build. - if (!debugModeEnabled) { - document.addEventListener('contextmenu', event => event.preventDefault()); - } - - // Grab Northstar release canal value from store if exists - var persistent_northstar_release_canal = (await persistentStore.get('northstar-release-canal')) as any; - if (persistent_northstar_release_canal) { // For some reason, the plugin-store doesn't throw an eror but simply returns `null` when key not found - // Put value from peristent store into current store - state.northstar_release_canal = persistent_northstar_release_canal.value as string; - } - else { - console.log("Value not found in store"); - } - - // Grab "Enable releases switching" setting from store if possible - const valueFromStore: { value: boolean } | null = await persistentStore.get('northstar-releases-switching'); - if (valueFromStore) { - state.enableReleasesSwitch = valueFromStore.value; - } - - // Grab "Thunderstore mods per page" setting from store if possible - const perPageFromStore: { value: number } | null = await persistentStore.get('thunderstore-mods-per-page'); - if (perPageFromStore && perPageFromStore.value) { - state.mods_per_page = perPageFromStore.value; - } - - // Get FlightCore version number - state.flightcore_version = await invoke("get_flightcore_version_number"); - - var result = undefined; - var persistent_game_install = (await persistentStore.get('game-install')) as any; - - if ( // Safety checks for value from store - persistent_game_install - && persistent_game_install.value !== undefined - && persistent_game_install.value.game_path !== undefined - && persistent_game_install.value.install_type !== undefined - ) { // For some reason, the plugin-store doesn't throw an eror but simply returns `null` when key not found - - // Add profile to existing storage - if (persistent_game_install.value.profile === undefined) { - persistent_game_install.value.profile = "R2Northstar" - } - - let game_install = persistent_game_install.value as GameInstall; - // check if valid path - let is_valid_titanfall2_install = await invoke("verify_install_location", { gamePath: game_install.game_path }) as boolean; - if (is_valid_titanfall2_install) { - // Use value from peristent store - result = game_install; - } - - } - - if (result === undefined) { // No (valid) value found in persistent store - result = await invoke("find_game_install_location") - .catch((err) => { - // Gamepath not found or other error - console.error(err); - notification_handle = showNotification( - i18n.global.tc('notification.game_folder.not_found.title'), - i18n.global.tc('notification.game_folder.not_found.text'), - 'error', - 0 // Duration `0` means the notification will not auto-vanish - ); - }); - } - - if (result !== undefined) { // Found some form of value for gameinstall - - const typedResult: GameInstall = result as GameInstall; - - // Save change in persistent store - await persistentStore.set('game-install', { value: typedResult }); - await persistentStore.save(); // explicit save to disk - - // Update UI store - state.game_install = typedResult; - - // Check installed Northstar version if found - await _get_northstar_version_number(state); - } - - await invoke<[number, number]>("get_server_player_count") - .then((message) => { - state.player_count = message[0]; - state.server_count = message[1]; - }) - .catch((error) => { - console.warn("Failed getting player/server count"); - console.warn(error); - }); -} - -async function _checkForFlightCoreUpdates(state: FlightCoreStore) { - // Check if FlightCore up-to-date - let flightcore_is_outdated = await invoke("check_is_flightcore_outdated") as boolean; - - if (flightcore_is_outdated) { - let newest_flightcore_version = await invoke("get_newest_flightcore_version") as FlightCoreVersion; - showNotification( - i18n.global.tc('notification.flightcore_outdated.title'), - i18n.global.tc('notification.flightcore_outdated.text', {oldVersion: state.flightcore_version, newVersion: newest_flightcore_version.tag_name}), - 'warning', - 0 // Duration `0` means the notification will not auto-vanish - ); - } -} - -/** - * This registers callbacks listening to events from Rust-backend. - * Those events include Origin and Northstar running state. - */ -function _initializeListeners(state: any) { - listen("ea-app-running-ping", function (evt: TauriEvent<any>) { - state.origin_is_running = evt.payload as boolean; - }); - - listen("northstar-running-ping", function (evt: TauriEvent<any>) { - state.northstar_is_running = evt.payload as boolean; - }); - - listen("northstar-statistics", function (evt: TauriEvent<{Ok: [number, number]}>) { - state.player_count = evt.payload.Ok[0]; - state.server_count = evt.payload.Ok[1]; - }); -} - -/** - * This retrieves Northstar version tag, and stores it in application - * 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; - state.installed_northstar_version = northstar_version_number; - state.northstar_state = NorthstarState.READY_TO_PLAY; - - invoke("check_is_northstar_outdated", { gameInstall: state.game_install, northstarPackageName: state.northstar_release_canal }) - .then((message) => { - if (message) { - state.northstar_state = NorthstarState.MUST_UPDATE; - } - }) - .catch((error) => { - console.error(error); - alert(error); - }); - }) - .catch((error) => { - state.northstar_state = NorthstarState.INSTALL; - }) -} diff --git a/src-vue/src/style.css b/src-vue/src/style.css deleted file mode 100644 index d322a0dd..00000000 --- a/src-vue/src/style.css +++ /dev/null @@ -1,56 +0,0 @@ -* { - box-sizing: border-box; -} - -html, body { - height: 100%; - width: 100%; -} - -body { - margin: 0; - font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; - --fc-menu_height: 50px; - user-select: none; -} - -#app { - position: relative; - height: 100%; - width: 100%; -} - -#fc_bg__container { - background: url(/src/assets/mp_colony020033.jpg) center no-repeat; - background-size: cover; - height: 100%; - width: 100%; - position: fixed; - filter: brightness(0.8); - scale: 1.03; -} - -.el-scrollbar { - --el-scrollbar-opacity: 0.5; - --el-scrollbar-hover-opacity: 0.7; -} - -.fc-container { - position: relative; - padding-top: var(--fc-menu_height); - height: 100%; - color: white; -} - -.noModMessage { - color: white; - margin: 30px 15px; -} - -.fc_popper { - width: auto !important; -} - -.el-popconfirm { - word-break: break-word; -} diff --git a/src-vue/src/utils/GameInstall.ts b/src-vue/src/utils/GameInstall.ts deleted file mode 100644 index 162d2860..00000000 --- a/src-vue/src/utils/GameInstall.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface GameInstall { - game_path: string; - profile: string, - install_type: string; -} diff --git a/src-vue/src/utils/NorthstarState.ts b/src-vue/src/utils/NorthstarState.ts deleted file mode 100644 index 2c8756b1..00000000 --- a/src-vue/src/utils/NorthstarState.ts +++ /dev/null @@ -1,8 +0,0 @@ -export enum NorthstarState { - GAME_NOT_FOUND = "GAME_NOT_FOUND", - INSTALL = "INSTALL", - INSTALLING = "INSTALLING", - MUST_UPDATE = "MUST_UPDATE", - UPDATING = "UPDATING", - READY_TO_PLAY = "READY_TO_PLAY" -}
\ No newline at end of file diff --git a/src-vue/src/utils/ReleaseCanal.ts b/src-vue/src/utils/ReleaseCanal.ts deleted file mode 100644 index 9363aa25..00000000 --- a/src-vue/src/utils/ReleaseCanal.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum ReleaseCanal { - RELEASE = <any>'Northstar', - RELEASE_CANDIDATE = <any>'NorthstarReleaseCandidate' -} diff --git a/src-vue/src/utils/SortOptions.d.ts b/src-vue/src/utils/SortOptions.d.ts deleted file mode 100644 index b6f180d2..00000000 --- a/src-vue/src/utils/SortOptions.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export enum SortOptions { - NAME_ASC = 'name_asc', - NAME_DESC = 'name_desc', - DATE_ASC = 'date_asc', - DATE_DESC = 'date_desc', - MOST_DOWNLOADED = 'most_downloaded', - TOP_RATED = 'top_rated' -} diff --git a/src-vue/src/utils/Tabs.ts b/src-vue/src/utils/Tabs.ts deleted file mode 100644 index 5d31379c..00000000 --- a/src-vue/src/utils/Tabs.ts +++ /dev/null @@ -1,8 +0,0 @@ -export enum Tabs { - PLAY = '/', - CHANGELOG = '/changelog', - SETTINGS = '/settings', - DEV = '/dev', - MODS = '/mods', - REPAIR = '/repair', -} diff --git a/src-vue/src/utils/filter.ts b/src-vue/src/utils/filter.ts deleted file mode 100644 index b85b9623..00000000 --- a/src-vue/src/utils/filter.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Implements a fuzzy filter - * Iterates through chars of `search_term` and checks if each char exists in consecutive order in `text`. - * For example, this means that `text="Gecko"` and `search_term="geo"` will return `true` - * but using `text="Gecko"` and `search_term="goe"` will return `false` - * - * Implements a subset of "fuzzy string searching" - * https://en.wikipedia.org/wiki/Approximate_string_matching - */ -function fuzzy_filter(text: string, search_term: string): boolean { - const lowercase_text = text.toLowerCase(); - const lowercase_search_term = search_term.toLowerCase(); - - let previousIndex = -1; - for (let i = 0; i < lowercase_search_term.length; i++) { - const char = lowercase_search_term[i]; - const currentIndex = lowercase_text.indexOf(char, previousIndex + 1); - if (currentIndex === -1) { - return false; - } - previousIndex = currentIndex; - } - - return true; -} -export { fuzzy_filter }; diff --git a/src-vue/src/utils/thunderstore/ThunderstoreModStatus.ts b/src-vue/src/utils/thunderstore/ThunderstoreModStatus.ts deleted file mode 100644 index f2351226..00000000 --- a/src-vue/src/utils/thunderstore/ThunderstoreModStatus.ts +++ /dev/null @@ -1,7 +0,0 @@ -export enum ThunderstoreModStatus { - INSTALLED, - BEING_INSTALLED, - BEING_UPDATED, - NOT_INSTALLED, - OUTDATED -} diff --git a/src-vue/src/utils/thunderstore/version.ts b/src-vue/src/utils/thunderstore/version.ts deleted file mode 100644 index a111e08c..00000000 --- a/src-vue/src/utils/thunderstore/version.ts +++ /dev/null @@ -1,33 +0,0 @@ -import {ThunderstoreMod} from "../../../../src-tauri/bindings/ThunderstoreMod"; -import {NorthstarMod} from "../../../../src-tauri/bindings/NorthstarMod"; -import {store} from "../../plugins/store"; - -/** - * Strips off a Thunderstore dependency string from its version - * (e.g. "taskinoz-WallrunningTitans-1.0.0" to - * "taskinoz-WallrunningTitans"). - **/ -function getThunderstoreDependencyStringPrefix(dependency: string): string { - const dependencyStringMembers = dependency.split('-'); - return `${dependencyStringMembers[0]}-${dependencyStringMembers[1]}`; -} - -function isThunderstoreModOutdated(mod: ThunderstoreMod): boolean { - // Ensure mod is up-to-date. - const tsModPrefix = getThunderstoreDependencyStringPrefix(mod.versions[0].full_name); - const matchingMods: NorthstarMod[] = store.state.installed_mods.filter((mod: NorthstarMod) => { - if (!mod.thunderstore_mod_string) return false; - return getThunderstoreDependencyStringPrefix(mod.thunderstore_mod_string!) === tsModPrefix; - }); - if (matchingMods.length !== 0) { - // There shouldn't be several mods with same dependency string, but we never know... - const matchingMod = matchingMods[0]; - // A mod is outdated if its dependency strings differs from Thunderstore dependency string - // (no need for semver check here). - // This assumes mod versions list is sorted from newest to oldest version. - return matchingMod.thunderstore_mod_string !== mod.versions[0].full_name; - } - return false; -} - -export { isThunderstoreModOutdated }; diff --git a/src-vue/src/utils/ui.ts b/src-vue/src/utils/ui.ts deleted file mode 100644 index f5183bcc..00000000 --- a/src-vue/src/utils/ui.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { ElNotification, NotificationHandle } from "element-plus"; -import { appWindow, UserAttentionType } from '@tauri-apps/api/window'; -import { i18n } from "../main"; -import { store } from "../plugins/store"; - -/** - * Displays content to the user in the form of a notification appearing on screen bottom right. - * If the app is not focused when this is invoked, a notification is added to the notifications menu. - **/ -function showNotification( - title: string, - message: string = '', - type: 'success' | 'warning' | 'error' | 'info' = 'success', - duration: number = 4500 -): NotificationHandle { - if (!document.hasFocus()) { - const date = new Date(); - const titleWithDate = `${title} (${i18n.global.tc('notification.date_prefix')} ${('0' + date.getHours()).slice(-2)}:${('0' + date.getMinutes()).slice(-2)})`; - store.commit('addNotification', {title: titleWithDate, text: message, type}); - appWindow.requestUserAttention(UserAttentionType.Informational); - } - - return ElNotification({ - title, message, type, duration, - position: 'bottom-right', - }); -} - -/** - * Helper method displaying an error message to the user. - **/ -function showErrorNotification( - error: string, - title: string = i18n.global.tc('generic.error') -): NotificationHandle { - return showNotification(title, error, 'error'); -} - -export {showNotification, showErrorNotification}; diff --git a/src-vue/src/views/ChangelogView.vue b/src-vue/src/views/ChangelogView.vue deleted file mode 100644 index f75d869c..00000000 --- a/src-vue/src/views/ChangelogView.vue +++ /dev/null @@ -1,82 +0,0 @@ -<template> - <div class="fc-container"> - <div v-if="releases.length === 0" class="fc__changelog__container"> - <el-progress :show-text="false" :percentage="50" :indeterminate="true" /> - </div> - <el-scrollbar v-else> - <el-timeline> - <el-timeline-item - v-for="release in releases" - v-bind:key="release.name" - :timestamp="formatDate(release.published_at)" - placement="top" - > - <el-card> - <h4>{{ release.name }}</h4> - <p v-html="formatRelease(release.body)"></p> - </el-card> - </el-timeline-item> - </el-timeline> - </el-scrollbar> - </div> -</template> - -<script lang="ts"> -import { defineComponent } from 'vue'; -import { ReleaseInfo } from "../../../src-tauri/bindings/ReleaseInfo"; -import { marked } from "marked"; - - -export default defineComponent({ - name: "ChangelogView", - async mounted() { - this.$store.commit('fetchReleaseNotes'); - }, - computed: { - releases(): ReleaseInfo[] { - return this.$store.state.releaseNotes; - } - }, - methods: { - // Transforms a Markdown document into an HTML document. - // Taken from Viper launcher: - // https://github.com/0neGal/viper/blob/5106d9ed409a3cc91a7755f961fab1bf91d8b7fb/src/app/launcher.js#L26 - formatRelease(releaseBody: string) { - // GitHub authors' links formatting - let content: string = releaseBody.replaceAll(/\@(\S+)/g, `<a target="_blank" href="https://github.com/$1">@$1</a>`); - - // PR's links formatting - content = content.replaceAll(/\[(\S*)\#(\S+)\]\(([^)]+)\)/g, `<a target="_blank" href="$3">$1#$2</a>`); - - return marked.parse(content, { breaks: true }); - }, - // Formats an ISO-formatted date into a human-readable string. - formatDate(timestamp: string): string { - return new Date(timestamp).toLocaleDateString(); - } - } -}); -</script> - -<style> -.el-scrollbar__view { - padding: 20px 30px; -} - -.el-table .el-scrollbar__view { - padding: 0; -} - -.fc__changelog__container { - padding: 20px 30px; -} - -.el-timeline-item__timestamp { - color: white !important; - user-select: none !important; -} - -.el-card__body * { - max-width: 100%; -} -</style> diff --git a/src-vue/src/views/DeveloperView.vue b/src-vue/src/views/DeveloperView.vue deleted file mode 100644 index 19214157..00000000 --- a/src-vue/src/views/DeveloperView.vue +++ /dev/null @@ -1,369 +0,0 @@ -<template> - <div class="fc-container"> - <el-scrollbar> - <el-alert title="Warning" type="warning" :closable="false" show-icon> - This page is designed for developers. Some of the buttons here can break your Northstar install if you do not know what you're doing! - </el-alert> - - <h3>Basic:</h3> - - <el-button type="primary" @click="disableDevMode"> - Disable developer mode - </el-button> - - <el-button type="primary" @click="crashApplication"> - Panic button - </el-button> - - <h3>Linux:</h3> - - <el-button type="primary" @click="installNSProton"> - Install NSProton - </el-button> - - <el-button type="primary" @click="uninstallNSProton"> - Remove NSProton - </el-button> - - <el-button type="primary" @click="getLocalNSProtonVersion"> - Get local NSProton Version - </el-button> - - <h3>Testing:</h3> - - <el-button type="primary" @click="launchGameWithoutChecks"> - Launch Northstar (bypass all checks) - </el-button> - - <el-button type="primary" @click="launchGameViaSteam"> - Launch Northstar via Steam - </el-button> - - <el-button type="primary" @click="installLauncherGitMain"> - Install launcher from main branch - </el-button> - - <br /> - <br /> - - <el-button type="primary" @click="getAvailableNorthstarVersions"> - Get available versions - </el-button> - - <el-select v-model="selected_ns_version" class="m-2" placeholder="Versions"> - <el-option - v-for="item in ns_versions" - :key="item.value" - :label="item.label" - :value="item" - /> - </el-select> - - <el-button type="primary" @click="installNorthstarVersion"> - Install - </el-button> - - <h3>Repair:</h3> - - <el-button type="primary" @click="checkCgnat"> - Run tracert and collect hop count - </el-button> - - <el-button type="primary" @click="getInstalledMods"> - Get installed mods - </el-button> - - <h3>Testing</h3> - <pull-requests-selector /> - - <h3>Mod install:</h3> - - <el-input v-model="mod_to_install_field_string" placeholder="Please input Thunderstore dependency string (example: AuthorName-ModName-1.2.3)" clearable /> - - <el-button type="primary" @click="installMod"> - Install mod - </el-button> - - <h3>Release management</h3> - <el-select v-model="selected_project" placeholder="Select"> - <el-option - v-for="item in project" - :key="item.value" - :label="item.label" - :value="item.value" - /> - </el-select> - <el-button type="primary" @click="getTags"> - Get tags - </el-button> - - <el-select v-model="firstTag" class="m-2" placeholder="First tag"> - <el-option - v-for="item in ns_release_tags" - :key="item.value" - :label="item.label" - :value="item" - /> - </el-select> - <el-select v-model="secondTag" class="m-2" placeholder="Second tag"> - <el-option - v-for="item in ns_release_tags" - :key="item.value" - :label="item.label" - :value="item" - /> - </el-select> - - <el-button type="primary" @click="compareTags"> - Compare Tags - </el-button> - - <el-button type="primary" @click="copyReleaseNotesToClipboard"> - Copy to clipboard - </el-button> - - <el-input - v-model="release_notes_text" - type="textarea" - :rows="5" - placeholder="Output" - /> - - <h3>Release announcements</h3> - - <el-button type="primary" @click="generateReleaseAnnouncementMessage"> - Generate release announcement - </el-button> - - <el-input - v-model="discord_release_announcement_text" - type="textarea" - :rows="5" - placeholder="Output" - /> - </el-scrollbar> - </div> -</template> - -<script lang="ts"> -import { defineComponent } from "vue"; -import { invoke } from "@tauri-apps/api"; -import { NorthstarLaunchOptions } from "../../../src-tauri/bindings/NorthstarLaunchOptions"; -import { TagWrapper } from "../../../src-tauri/bindings/TagWrapper"; -import { NorthstarThunderstoreReleaseWrapper } from "../../../src-tauri/bindings/NorthstarThunderstoreReleaseWrapper"; -import PullRequestsSelector from "../components/PullRequestsSelector.vue"; -import { showErrorNotification, showNotification } from "../utils/ui"; -import { Project } from "../../../src-tauri/bindings/Project" - -export default defineComponent({ - name: "DeveloperView", - components: { - PullRequestsSelector - }, - data() { - return { - mod_to_install_field_string: "", - release_notes_text: "", - discord_release_announcement_text: "", - first_tag: { label: '', value: { name: '' } }, - second_tag: { label: '', value: { name: '' } }, - ns_release_tags: [] as TagWrapper[], - ns_versions: [] as NorthstarThunderstoreReleaseWrapper[], - selected_ns_version: { label: '', value: { package: '', version: '' } } as NorthstarThunderstoreReleaseWrapper, - selected_project: "FlightCore", - project: [ - { - value: 'FlightCore', - label: 'FlightCore', - }, - { - value: 'Northstar', - label: 'Northstar', - } - ], - } - }, - computed: { - firstTag: { - get(): TagWrapper { - return this.first_tag; - }, - set(value: TagWrapper) { - this.first_tag = value; - } - }, - secondTag: { - get(): TagWrapper { - return this.second_tag; - }, - set(value: TagWrapper) { - this.second_tag = value; - } - }, - }, - methods: { - disableDevMode() { - this.$store.commit('toggleDeveloperMode'); - }, - async crashApplication() { - await invoke("force_panic"); - showErrorNotification("Never should have been able to get here!"); - }, - async launchGameWithoutChecks() { - let launch_options: NorthstarLaunchOptions = { bypass_checks: true, launch_via_steam: false }; - this.$store.commit('launchGame', launch_options); - }, - async launchGameViaSteam() { - let launch_options: NorthstarLaunchOptions = { bypass_checks: false, launch_via_steam: true }; - this.$store.commit('launchGameSteam', launch_options); - }, - async getInstalledMods() { - await invoke("get_installed_mods_and_properties", { gameInstall: this.$store.state.game_install }).then((message) => { - // Simply console logging for now - // In the future we should display the installed mods somewhere - console.log(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_wrapper", { gameInstall: this.$store.state.game_install, thunderstoreModString: mod_to_install }).then((message) => { - // Show user notification if mod install completed. - showNotification(`Installed ${mod_to_install}`, message); - }) - .catch((error) => { - showErrorNotification(error); - }); - }, - async getTags() { - await invoke<TagWrapper[]>("get_list_of_tags", { project: this.selected_project }) - .then((message) => { - this.ns_release_tags = message; - showNotification("Done", "Fetched tags"); - this.first_tag = this.ns_release_tags[1]; - this.second_tag = this.ns_release_tags[0]; - this.compareTags(); - }) - .catch((error) => { - showErrorNotification(error); - }); - }, - async compareTags() { - await invoke<string>("compare_tags", { project: this.selected_project, firstTag: this.firstTag.value, secondTag: this.secondTag.value }) - .then((message) => { - this.release_notes_text = message; - showNotification("Done", "Generated release notes"); - this.copyReleaseNotesToClipboard(); - }) - .catch((error) => { - showErrorNotification(error); - }); - }, - async installLauncherGitMain() { - - const notification = showNotification(`Installing git main`, 'Please wait', 'info', 0); - - await invoke<string>("install_git_main", { gameInstallPath: this.$store.state.game_install.game_path }) - .then((message) => { - this.release_notes_text = message; - showNotification("Done", `Installed launcher build from ${message}`); - }) - .catch((error) => { - showErrorNotification(error); - }) - .finally(() => { - // Clear old notification - notification.close(); - }); - }, - async getAvailableNorthstarVersions() { - await invoke<NorthstarThunderstoreReleaseWrapper[]>("get_available_northstar_versions") - .then((message) => { - this.ns_versions = message; - showNotification("Done", "Fetched all available Northstar versions"); - }) - .catch((error) => { - showErrorNotification(error); - }); - }, - async installNorthstarVersion() { - // Send notification telling the user to wait for the process to finish - const notification = showNotification( - `Installing Northstar version v${this.selected_ns_version.value.version}`, - "Please wait", - 'info', - 0 - ); - - let install_northstar_result = invoke("install_northstar_wrapper", { gameInstall: this.$store.state.game_install, northstarPackageName: this.selected_ns_version.value.package, versionNumber: this.selected_ns_version.value.version }); - - await install_northstar_result - .then((message) => { - // Send notification - showNotification(this.$t('generic.done'), this.$t('settings.repair.window.reinstall_success')); - this.$store.commit('checkNorthstarUpdates'); - }) - .catch((error) => { - showErrorNotification(error); - console.error(error); - }) - .finally(() => { - // Clear old notification - notification.close(); - }); - }, - async installNSProton() { - showNotification(`Started NSProton install`); - await invoke("install_northstar_proton_wrapper") - .then((message) => { showNotification(`Done`); }) - .catch((error) => { showNotification(`Error`, error, "error"); }) - }, - async uninstallNSProton() { - await invoke("uninstall_northstar_proton_wrapper") - .then((message) => { showNotification(`Done`); }) - .catch((error) => { showNotification(`Error`, error, "error"); }) - }, - async getLocalNSProtonVersion() { - await invoke("get_local_northstar_proton_wrapper_version") - .then((message) => { showNotification(`NSProton Version`, message as string); }) - .catch((error) => { showNotification(`Error`, error, "error"); }) - }, - async checkCgnat() { - await invoke<string>("check_cgnat") - .then((message) => { - showNotification(message); - }) - .catch((error) => { - showErrorNotification(error); - }); - }, - async copyReleaseNotesToClipboard() { - navigator.clipboard.writeText(this.release_notes_text) - .then(() => { - showNotification("Copied to clipboard"); - }) - .catch(() => { - showErrorNotification("Failed copying to clipboard"); - }); - }, - async generateReleaseAnnouncementMessage() { - await invoke<string>("generate_release_note_announcement", { }) - .then((message) => { - this.discord_release_announcement_text = message; - showNotification("Done", "Generated announcement"); - }) - .catch((error) => { - showErrorNotification(error); - }); - }, - } -}); -</script> - -<style scoped> -</style> diff --git a/src-vue/src/views/ModsView.vue b/src-vue/src/views/ModsView.vue deleted file mode 100644 index a821dcda..00000000 --- a/src-vue/src/views/ModsView.vue +++ /dev/null @@ -1,54 +0,0 @@ -<template> - <div class="fc-container" style="display: flex"> - <!-- Local mods/Thunderstore mods menu --> - <mods-menu - :showingLocalMods="show_local_mods" - @showLocalMods="(v) => show_local_mods = v" - /> - - <!-- Mods content --> - <div class="fc_mods__container"> - <local-mods-view - v-if="show_local_mods" - /> - - <thunderstore-mods-view - v-else - clearable - /> - </div> - </div> -</template> - -<script lang="ts"> -import { defineComponent } from "vue"; -import ThunderstoreModsView from "./mods/ThunderstoreModsView.vue"; -import LocalModsView from "./mods/LocalModsView.vue"; -import ModsMenu from "../components/ModsMenu.vue"; - -export default defineComponent({ - name: "ModsView", - components: { - ModsMenu, - LocalModsView, - ThunderstoreModsView - }, - data() { - return { - show_local_mods: true, - } - }, - mounted() { - // Fetch Thunderstore mods to eventually display outdated mods count - this.$store.commit('fetchThunderstoreMods'); - } -}); -</script> - -<style scoped> -.fc_mods__container { - display: flex; - width: 100%; - flex-direction: column; -} -</style> diff --git a/src-vue/src/views/PlayView.vue b/src-vue/src/views/PlayView.vue deleted file mode 100644 index 30171e48..00000000 --- a/src-vue/src/views/PlayView.vue +++ /dev/null @@ -1,124 +0,0 @@ -<script lang="ts"> -import { Tabs } from "../utils/Tabs"; -import PlayButton from '../components/PlayButton.vue'; -import { defineComponent } from "vue"; -import InstallProgressBar from "../components/InstallProgressBar.vue"; - -export default defineComponent({ - components: { - PlayButton, - InstallProgressBar - }, - computed: { - northstarIsRunning(): boolean { - return this.$store.state.northstar_is_running; - }, - northstarVersion(): string { - return this.$store.state.installed_northstar_version; - }, - playerCount(): number { - return this.$store.state.player_count; - }, - serverCount(): number { - return this.$store.state.server_count; - }, - }, - methods: { - showChangelogPage() { - this.$store.commit('updateCurrentTab', Tabs.CHANGELOG); - } - } -}); -</script> - -<template> - <div class="fc_launch__container"> - <div class="fc_title">Northstar</div> - <div class="fc_northstar__version__container"> - {{ northstarVersion === '' ? $t('play.unknown_version') : `v${northstarVersion}` }} - <div v-if="northstarVersion !== ''" class="fc_changelog__link" @click="showChangelogPage"> - ({{ $t('play.see_patch_notes') }}) - </div> - <div v-if="playerCount >= 0" class="fc-stats__container"> - {{ playerCount }} {{ $t('play.players') }}, - {{ serverCount }} {{ $t('play.servers') }} - </div> - <div v-else="playerCount >= 0" class="fc-stats__container"> - {{ $t('play.unable_to_load_playercount') }} - </div> - </div> - - <!-- Align play button and services state container --> - <div style="display: flex"> - <PlayButton /> - <div v-if="$store.state.developer_mode" id="fc_services__status"> - <div> - <div class="fc_version__line">{{ $t('play.northstar_running') }}</div> - <div class="fc_version__line fc_version__line__boolean"> {{ northstarIsRunning }}</div> - </div> - <div> - <div class="fc_version__line">{{ $t('play.ea_app_running') }}</div> - <div class="fc_version__line fc_version__line__boolean">{{ $store.state.origin_is_running }}</div> - </div> - </div> - </div> - <InstallProgressBar /> - </div> -</template> - -<style scoped> -.fc_launch__container { - margin: 50px 50px 30px 50px; - position: fixed; - bottom: 0; -} - -/* Titles */ -.fc_title { - color: white; - font-size: 50px; - font-weight: bold; -} - -/* Northstar version + changelog link */ -.fc_northstar__version__container { - margin-bottom: 20px; - color: rgb(168, 168, 168); -} - -.fc-stats__container { - margin-top: 3px; -} - -.fc_northstar__version, -.fc_changelog__link { - display: inline-block; -} - -.fc_changelog__link { - margin-left: 3px; - text-decoration: underline; - cursor: pointer; -} - - -.fc_launch__button:focus { - background-color: var(--el-color-primary); - border-color: var(--el-color-primary); -} - -#fc_services__status { - color: #e8edef; - align-self: end; -} - -.fc_version__line { - display: inline-block; -} - -.fc_version__line__boolean { - margin-left: 5px; - margin-bottom: 5px; - color: #b4b6b9; -} -</style> diff --git a/src-vue/src/views/RepairView.vue b/src-vue/src/views/RepairView.vue deleted file mode 100644 index 341dff2d..00000000 --- a/src-vue/src/views/RepairView.vue +++ /dev/null @@ -1,153 +0,0 @@ -<template> - <div class="fc-container"> - <el-scrollbar> - <el-alert :title="$t('generic.informationShort')" type="info" :closable="false" show-icon> - {{ $t('settings.repair.window.warning') }} - </el-alert> - - <h1>{{ $t('settings.repair.title') }}</h1> - - <h2>Northstar</h2> - - <el-button type="primary" @click="disableAllModsButCore"> - {{ $t('settings.repair.window.disable_all_but_core') }} - </el-button> - - <el-button type="primary" @click="forceInstallNorthstar"> - {{ $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> - - <h2>FlightCore</h2> - - <el-button type="primary" @click="cleanUpDownloadFolder"> - {{ $t('settings.repair.window.force_delete_temp_dl') }} - </el-button> - - <el-button type="primary" @click="clearFlightCorePersistentStore"> - {{ $t('settings.repair.window.delete_persistent_store') }} - </el-button> - </el-scrollbar> - </div> -</template> - -<script lang="ts"> -import { defineComponent } from "vue"; -import { GameInstall } from "../utils/GameInstall"; -import { InstallProgress } from "../../../src-tauri/bindings/InstallProgress"; -import { invoke } from "@tauri-apps/api"; -import { ReleaseCanal } from "../utils/ReleaseCanal"; -import { Store } from 'tauri-plugin-store-api'; -import { showErrorNotification, showNotification } from "../utils/ui"; -import { appWindow } from "@tauri-apps/api/window"; -const persistentStore = new Store('flight-core-settings.json'); - -export default defineComponent({ - name: "RepairView", - computed: { - lang(): string { - return this.$root!.$i18n.locale; - } - }, - 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')); - }) - .catch((error) => { - showErrorNotification(error); - }); - }, - async forceInstallNorthstar() { - // Send notification telling the user to wait for the process to finish - const notification = showNotification( - this.$t('settings.repair.window.reinstall_title'), - this.$t('settings.repair.window.reinstall_text'), - 'info', - 0 - ); - - let install_northstar_result = invoke("install_northstar_wrapper", { gameInstall: this.$store.state.game_install, northstarPackageName: ReleaseCanal.RELEASE }); - - appWindow.listen<InstallProgress>( - 'northstar-install-download-progress', - ({ event, payload }) => { - let typed_payload = payload; - console.log("current_downloaded:", typed_payload.current_downloaded); - console.log("total_size: ", typed_payload.total_size); - console.log("state: ", typed_payload.state); - } - ); - await install_northstar_result - .then((message) => { - // Send notification - showNotification(this.$t('generic.done'), this.$t('settings.repair.window.reinstall_success')); - this.$store.commit('checkNorthstarUpdates'); - }) - .catch((error) => { - showErrorNotification(error); - console.error(error); - }) - .finally(() => { - // Clear old notification - notification.close(); - }); - }, - async cleanUpDownloadFolder() { - await invoke("clean_up_download_folder_wrapper", { gameInstall: this.$store.state.game_install, force: true }).then((message) => { - // Show user notification if task completed. - showNotification(this.$t('generic.done'), this.$t('generic.done')); - }) - .catch((error) => { - showErrorNotification(error); - }); - }, - async clearFlightCorePersistentStore() { - // Clear store... - await persistentStore.clear(); - // ...and save - await persistentStore.save(); - }, - async disableModsettingsMod() { - await invoke("set_mod_enabled_status", { gameInstall: this.$store.state.game_install, modName: "Mod Settings", isEnabled: false }) - .then((message) => { - showNotification(this.$t('generic.success'), this.$t('settings.repair.window.disable_modsettings_success')); - }) - .catch((error) => { - 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 - // its value, and update window title accordingly. - lang(newv: string) { - appWindow.setTitle(this.$t('settings.repair.window.title')); - } - } -}); -</script> - -<style scoped> -.fc-container { - padding-top: 0px; -} -</style> diff --git a/src-vue/src/views/SettingsView.vue b/src-vue/src/views/SettingsView.vue deleted file mode 100644 index 5ead665b..00000000 --- a/src-vue/src/views/SettingsView.vue +++ /dev/null @@ -1,393 +0,0 @@ -<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-column align="right"> - <template #default="scope"> - <el-popconfirm - v-if="scope.row.name != 'R2Northstar'" - :title="$t('settings.profile.dialog.delete_confirm')" - :confirm-button-text="$t('generic.yes')" - :cancel-button-text="$t('generic.no')" - @confirm="deleteProfile(scope.row.name)" - > - <template #reference> - <el-button type="danger"> - {{ $t('settings.profile.dialog.delete') }} - </el-button> - </template> - </el-popconfirm> - <el-button @click="cloneProfileDialog(scope.row.name)"> - {{ $t('settings.profile.dialog.clone') }} - </el-button> - </template> - </el-table-column> - </el-table> - </el-dialog> - - <div class="fc-container"> - <el-scrollbar> - <div class="fc_settings__container"> - <!-- Game folder location --> - <div class="fc_parameter__panel"> - <h3>{{ $t('settings.manage_install') }}</h3> - <el-input - v-model="$store.state.game_install.game_path" - :placeholder="$t('settings.choose_folder')" - @click="updateGamePath" - > - <template #prepend> - <el-button icon="Folder" @click="updateGamePath"/> - </template> - <template #append> - <el-button @click="openGameInstallFolder"> - {{ $t('settings.open_game_folder') }} - </el-button> - </template> - </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" :disabled="!availableProfiles.length"> - <el-button> - {{ activeProfile }} <el-icon class="el-icon--right" v-if="availableProfiles.length"><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> - <h6> - {{ $t('settings.nb_ts_mods_per_page_desc1') }}<br> - {{ $t('settings.nb_ts_mods_per_page_desc2') }} - </h6> - <el-input - v-model="modsPerPage" - type="number" - > - <template #append> - <el-button @click="modsPerPage = 20"> - {{ $t('settings.nb_ts_mods_reset') }} - </el-button> - </template> - </el-input> - </div> - - <div class="fc_parameter__panel"> - <h3>{{ $t('settings.show_deprecated_mods') }}</h3> - <h6> - {{ $t('settings.show_deprecated_mods_desc1') }}<br/> - {{ $t('settings.show_deprecated_mods_desc2') }} - </h6> - <span> - {{ $t('settings.show_deprecated_mods') }} - <el-switch v-model="showDeprecatedMods"></el-switch> - </span> - </div> - - <!-- Interface localization --> - <div class="fc_parameter__panel"> - <h3>{{ $t('settings.language') }}</h3> - <language-selector/> - </div> - - <!-- Repair window --> - <div class="fc_parameter__panel"> - <h3>{{ $t('settings.repair.title') }}</h3> - <el-button type="primary" @click="openRepairWindow"> - {{ $t('settings.repair.open_window') }} - </el-button> - </div> - - <div class="fc_parameter__panel"> - <h3>{{ $t('settings.show_nsfw_mods') }}</h3> - <span> - {{ $t('settings.show_nsfw_mods') }} - <el-switch v-model="showNsfwMods"></el-switch> - </span> - </div> - - <!-- About section --> - <div class="fc_parameter__panel"> - <h3>{{ $t('settings.about') }}</h3> - <div class="fc_northstar__version" @click="activateDeveloperMode"> - {{ $t('settings.flightcore_version') }} {{ flightcoreVersion === '' ? 'Unknown version' : `${flightcoreVersion}` }} - </div> - </div> - - <!-- Testing section --> - <div class="fc_parameter__panel"> - <h3>{{ $t('settings.testing') }}</h3> - <span> - {{ $t('settings.enable_test_channels') }} - <el-switch v-model="enableReleasesSwitch"></el-switch> - </span> - </div> - </div> - </el-scrollbar> - </div> -</template> - -<script lang="ts"> -import { defineComponent } from "vue"; -import { invoke } from "@tauri-apps/api"; -import { ReleaseCanal } from "../utils/ReleaseCanal"; -import { Store } from 'tauri-plugin-store-api'; -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'; -import { ElMessageBox } from 'element-plus' - -export default defineComponent({ - name: "SettingsView", - components: { - LanguageSelector - }, - data() { - return { - developerModeClicks: 0, - showProfileDialog: false, - } - }, - computed: { - showNsfwMods: { - get(): boolean { - return this.$store.state.search.showNsfwMods; - }, - set(value: boolean) { - this.$store.state.search.showNsfwMods = value; - } - }, - showDeprecatedMods: { - get(): boolean { - return this.$store.state.search.showDeprecatedMods; - }, - set(value: boolean) { - this.$store.state.search.showDeprecatedMods = value; - } - }, - flightcoreVersion(): string { - return this.$store.state.flightcore_version; - }, - enableReleasesSwitch: { - get(): boolean { - return this.$store.state.enableReleasesSwitch; - }, - async set(value: boolean): Promise<void> { - this.$store.state.enableReleasesSwitch = value; - persistentStore.set('northstar-releases-switching', { value }); - await persistentStore.save(); // explicit save to disk - - // When disabling switch, we switch release canal to stable release, to avoid users being - // stuck with release candidate after disabling release switching. - if (!value && this.$store.state.northstar_release_canal !== ReleaseCanal.RELEASE) { - this.$store.commit('toggleReleaseCandidate'); - } - } - }, - modsPerPage: { - get(): number { - return this.$store.state.mods_per_page; - }, - async set(value: number) { - this.$store.state.mods_per_page = value; - persistentStore.set('thunderstore-mods-per-page', { value }); - await persistentStore.save(); // explicit save to disk - } - }, - activeProfile(): String { - return this.$store.state.game_install.profile || "None"; - }, - 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: { - activateDeveloperMode() { - this.developerModeClicks += 1; - if (this.developerModeClicks >= 6 && !this.$store.state.developer_mode) { - this.$store.commit('toggleDeveloperMode'); - showNotification( - this.$t('settings.dev_mode_enabled_title'), - this.$t('settings.dev_mode_enabled_text'), - 'info' - ); - this.developerModeClicks = 0; - } - }, - async updateGamePath() { - this.$store.commit('updateGamePath'); - }, - async openRepairWindow() { - await invoke("open_repair_window") - .then((message) => { }) - .catch((error) => { - showErrorNotification(error); - }); - }, - async openGameInstallFolder() { - // Verify the game path is actually set - if (!this.$store.state.game_install.game_path) { - showErrorNotification( - i18n.global.tc('notification.game_folder.not_found.text'), - i18n.global.tc('notification.game_folder.not_found.title') - ); - return; - } - - // 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); - }); - }, - async cloneProfileDialog(profile: string) { - ElMessageBox.prompt( - i18n.global.tc("settings.profile.dialog.new_profile_name"), - i18n.global.tc("settings.profile.dialog.title"), - { - confirmButtonText: i18n.global.tc("generic.confirm"), - cancelButtonText: i18n.global.tc("generic.cancel"), - } - ).then(async ({ value }) => { - await this.cloneProfile(profile, value); - }).catch(() => { - // Nothing to do here - }) - }, - async cloneProfile(old_profile: string, new_profile: string) { - let store = this.$store; - await invoke("clone_profile", { - gameInstall: store.state.game_install, - oldProfile: old_profile, - newProfile: new_profile - }).then(async (message) => { - store.commit('fetchProfiles'); - showNotification('Success'); - }).catch((error) => { - console.error(error); - showErrorNotification(error); - }); - }, - async deleteProfile(profile: string) { - let store = this.$store; - await invoke("delete_profile", { - gameInstall: store.state.game_install, - profile: profile, - }).then(async (message) => { - if (profile == store.state.game_install.profile) - { - // trying to delete the active profile, lets switch to the default profile - await this.switchProfile("R2Northstar"); - } - store.commit('fetchProfiles'); - showNotification('Success'); - }).catch((error) => { - console.error(error); - showErrorNotification(error); - }); - }, - }, - mounted() { - document.querySelector('input')!.disabled = true; - this.$store.commit('fetchProfiles'); - }, - unmounted() { - if (('' + this.modsPerPage) === '') { - console.warn('Incorrect value for modsPerPage, resetting it to 20.'); - this.modsPerPage = 20; - } - } -}); -</script> - -<style scoped> -.fc_settings__container { - max-width: 1200px; - margin: 0 auto; -} - -h3:first-of-type { - margin-top: 0; - margin-bottom: 1em; - text-transform: uppercase; - font-weight: unset; -} - -.el-input, -.el-select { - width: 50%; -} - -.el-switch { - margin-left: 50px; -} - - -/* Parameter panel styles */ -.fc_parameter__panel { - margin-bottom: 30px; -} - -.fc_parameter__panel h3 { - margin-bottom: 5px; -} - -.fc_parameter__panel h6 { - margin-top: 0; - margin-bottom: 12px; -} -</style> 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> diff --git a/src-vue/src/views/mods/ThunderstoreModsView.vue b/src-vue/src/views/mods/ThunderstoreModsView.vue deleted file mode 100644 index 1ec684a6..00000000 --- a/src-vue/src/views/mods/ThunderstoreModsView.vue +++ /dev/null @@ -1,309 +0,0 @@ -<template>
- <div class="fc-container" style="padding: 0">
- <div v-if="mods.length === 0" class="fc__changelog__container">
- <el-progress :show-text="false" :percentage="50" :indeterminate="true" />
- </div>
-
- <!-- Message displayed if no mod matched searched words -->
- <div v-else-if="filteredMods.length === 0" class="noModMessage">
- {{ $t('mods.online.no_match') }}<br/>
- {{ $t('mods.online.try_another_search') }}
- </div>
-
- <el-scrollbar v-else class="container" ref="scrollbar">
- <div class="card-container">
- <div class="pagination_container" v-if="shouldDisplayPagination">
- <el-pagination
- :currentPage="currentPageIndex + 1"
- layout="prev, pager, next"
- :page-size="modsPerPage"
- :total="modsList.length"
- @update:current-page="onPaginationChange"
- />
- </div>
-
- <!-- Mod cards -->
- <thunderstore-mod-card v-for="mod of currentPageMods" v-bind:key="mod.name" :mod="mod" />
- </div>
-
- <!-- Bottom pagination -->
- <div class="card-container">
- <div class="pagination_container">
- <el-pagination
- class="fc_bottom__pagination"
- v-if="shouldDisplayPagination"
- :currentPage="currentPageIndex + 1"
- layout="prev, pager, next"
- :page-size="modsPerPage"
- :total="modsList.length"
- @update:current-page="onPaginationChange"
- @current-change="scrollTop"
- />
- </div>
- </div>
- </el-scrollbar>
- </div>
-</template>
-
-<script lang="ts">
-import { defineComponent, ref } from 'vue';
-import { ThunderstoreMod } from "../../../../src-tauri/bindings/ThunderstoreMod";
-import ThunderstoreModCard from "../../components/ThunderstoreModCard.vue";
-import { ElScrollbar, ScrollbarInstance } from "element-plus";
-import { SortOptions } from "../../utils/SortOptions.d";
-import { ThunderstoreModVersion } from "../../../../src-tauri/bindings/ThunderstoreModVersion";
-import { fuzzy_filter } from "../../utils/filter";
-import { isThunderstoreModOutdated } from "../../utils/thunderstore/version";
-
-
-export default defineComponent({
- name: "ThunderstoreModsView",
- components: { ThunderstoreModCard },
- async mounted() {
- this.$store.commit('fetchThunderstoreMods');
- },
- computed: {
- showDeprecatedMods(): boolean {
- return this.$store.state.search.showDeprecatedMods;
- },
- showNsfwMods(): boolean {
- return this.$store.state.search.showNsfwMods;
- },
- searchValue(): string {
- return this.$store.getters.searchWords;
- },
- selectedCategories(): Object[] {
- return this.$store.state.search.selectedCategories;
- },
- modSorting(): SortOptions {
- return Object.values(SortOptions)[Object.keys(SortOptions).indexOf(this.$store.state.search.sortValue)];
- },
- mods(): ThunderstoreMod[] {
- return this.$store.state.thunderstoreMods;
- },
- filteredMods(): ThunderstoreMod[] {
- if (this.searchValue.length === 0 && this.selectedCategories.length === 0) {
- return this.mods;
- }
-
- return this.mods.filter((mod: ThunderstoreMod) => {
- // Filter with search words (only if search field isn't empty)
- const inputMatches: boolean = this.searchValue.length === 0
- || (
- fuzzy_filter(mod.name, this.searchValue) ||
- fuzzy_filter(mod.owner, this.searchValue) ||
- mod.versions[0].description.toLowerCase().includes(this.searchValue)
- );
-
- // Filter out deprecated mods
- const showDeprecated = !mod.is_deprecated || this.showDeprecatedMods;
-
- // Filter out NSFW mods
- const showNsfw = !mod.has_nsfw_content || this.showNsfwMods;
-
- // Filter with categories (only if some categories are selected)
- const categoriesMatch: boolean = this.selectedCategories.length === 0
- || mod.categories
- .filter((category: string) => this.selectedCategories.includes(category))
- .length === this.selectedCategories.length;
-
- return inputMatches && categoriesMatch && showDeprecated && showNsfw;
- });
- },
- modsList(): ThunderstoreMod[] {
- // Use filtered mods if user is searching, vanilla list otherwise.
- const mods: ThunderstoreMod[] = this.searchValue.length !== 0 || this.selectedCategories.length !== 0
- ? this.filteredMods
- : this.mods
- .filter(mod => this.showDeprecatedMods || !mod.is_deprecated)
- .filter(mod => this.showNsfwMods || !mod.has_nsfw_content);
-
- // Sort mods regarding user selected algorithm.
- let compare: (a: ThunderstoreMod, b: ThunderstoreMod) => number;
- switch (this.modSorting) {
- case SortOptions.NAME_ASC:
- compare = (a: ThunderstoreMod, b: ThunderstoreMod) => a.name.localeCompare(b.name);
- break;
- case SortOptions.NAME_DESC:
- compare = (a: ThunderstoreMod, b: ThunderstoreMod) => -1 * a.name.localeCompare(b.name);
- break;
- case SortOptions.DATE_ASC:
- compare = (a: ThunderstoreMod, b: ThunderstoreMod) => a.date_updated.localeCompare(b.date_updated);
- break;
- case SortOptions.DATE_DESC:
- compare = (a: ThunderstoreMod, b: ThunderstoreMod) => -1 * a.date_updated.localeCompare(b.date_updated);
- break;
- case SortOptions.MOST_DOWNLOADED:
- compare = (a: ThunderstoreMod, b: ThunderstoreMod) => {
- const aTotal = a.versions.reduce((prev, next) => {
- return { downloads: prev.downloads + next.downloads } as ThunderstoreModVersion;
- }).downloads;
- const bTotal = b.versions.reduce((prev, next) => {
- return { downloads: prev.downloads + next.downloads } as ThunderstoreModVersion;
- }).downloads;
- return -1 * (aTotal - bTotal);
- };
- break;
- case SortOptions.TOP_RATED:
- compare = (a: ThunderstoreMod, b: ThunderstoreMod) => -1 * (a.rating_score - b.rating_score);
- break;
- default:
- throw new Error('Unknown mod sorting.');
- }
-
- // Always display outdated mods first
- // (regardless of actual sort order)
- const sortedMods = mods.sort(compare);
- return sortedMods.sort((a, b) => {
- if (isThunderstoreModOutdated(a)) {
- return -1;
- } else if (isThunderstoreModOutdated(b)) {
- return 1;
- } else {
- return compare(a, b);
- }
- })
- },
- modsPerPage(): number {
- return parseInt(this.$store.state.mods_per_page);
- },
- currentPageMods(): ThunderstoreMod[] {
- // User might want to display all mods on one page.
- const perPageValue = this.modsPerPage != 0 ? this.modsPerPage : this.modsList.length;
-
- const startIndex = this.currentPageIndex * perPageValue;
- const endIndexCandidate = startIndex + perPageValue;
- const endIndex = endIndexCandidate > this.modsList.length ? this.modsList.length : endIndexCandidate;
- return this.modsList.slice(startIndex, endIndex);
- },
- shouldDisplayPagination(): boolean {
- return this.modsPerPage != 0 && this.modsList.length > this.modsPerPage;
- }
- },
- data() {
- return {
- modsBeingInstalled: [] as string[],
- currentPageIndex: 0
- };
- },
- methods: {
- /**
- * This updates current pagination and scrolls view to the top.
- */
- onPaginationChange(index: number) {
- this.currentPageIndex = index - 1;
- },
- scrollTop(index: number) {
- setTimeout(() => {
- (this.$refs.scrollbar as ScrollbarInstance).scrollTo({ top: 0, behavior: 'smooth' });
- }, 100)
- }
- },
- watch: {
- searchValue(_: string, __: string) {
- if (this.currentPageIndex !== 0) {
- this.currentPageIndex = 0;
- }
- },
- selectedCategories(_: string[], __: string[]) {
- if (this.currentPageIndex !== 0) {
- this.currentPageIndex = 0;
- }
- }
- }
-});
-</script>
-
-<style scoped>
-.fc__changelog__container {
- padding: 20px 30px;
-}
-
-.fc-container:deep(.el-scrollbar__view) {
- padding-left: 0;
- padding-right: 0;
-}
-
-.el-timeline-item__timestamp {
- color: white !important;
- user-select: none !important;
-}
-
-.search {
- display: inline-block;
- margin: 0 0 0 10px !important;
-}
-
-.card-container {
- margin: 0 auto;
-}
-
-.pagination_container {
- margin: 5px auto;
- padding: 0 5px;
- max-width: 1000px;
- justify-content: center;
- display: flex;
-}
-
-.el-pagination {
- margin: 0;
-}
-
-.fc_bottom__pagination {
- padding-bottom: 20px !important;
- padding-right: 10px;
-}
-
-/* Card container dynamic size */
-
-.card-container {
- --thunderstore-mod-card-width: 178px;
- --thunderstore-mod-card-margin: 5px;
- --thunderstore-mod-card-columns-count: 1;
-
- width: calc(var(--thunderstore-mod-card-width) * var(--thunderstore-mod-card-columns-count) + var(--thunderstore-mod-card-margin) * 2 * var(--thunderstore-mod-card-columns-count));
-}
-
-@media (min-width: 628px) {
- .card-container {
- --thunderstore-mod-card-columns-count: 2;
- }
-}
-
-@media (min-width: 836px) {
- .card-container {
- --thunderstore-mod-card-columns-count: 3;
- }
-}
-
-@media (min-width: 1006px) {
- .card-container {
- --thunderstore-mod-card-columns-count: 4;
- }
-}
-
-@media (min-width: 1196px) {
- .card-container {
- --thunderstore-mod-card-columns-count: 5;
- }
-}
-
-@media (min-width: 1386px) {
- .card-container {
- --thunderstore-mod-card-columns-count: 6;
- }
-}
-
-@media (min-width: 1576px) {
- .card-container {
- --thunderstore-mod-card-columns-count: 7;
- }
-}
-
-@media (min-width: 1766px) {
- .card-container {
- --thunderstore-mod-card-columns-count: 8;
- }
-}
-</style>
diff --git a/src-vue/src/vite-env.d.ts b/src-vue/src/vite-env.d.ts deleted file mode 100644 index 323c78a6..00000000 --- a/src-vue/src/vite-env.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/// <reference types="vite/client" /> - -declare module '*.vue' { - import type { DefineComponent } from 'vue' - const component: DefineComponent<{}, {}, any> - export default component -} diff --git a/src-vue/src/vuex-shim.d.ts b/src-vue/src/vuex-shim.d.ts deleted file mode 100644 index 40438a97..00000000 --- a/src-vue/src/vuex-shim.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ComponentCustomProperties } from 'vue'
-import { Store } from 'vuex'
-
-declare module '@vue/runtime-core' {
- interface ComponentCustomProperties {
- $store: Store<FlightCoreStore>
- }
-}
|