From 29ea328942c78b43e3a2bcbef82a9019fe67bfec Mon Sep 17 00:00:00 2001 From: HoraceHyy Date: Wed, 28 Feb 2024 11:52:49 +0800 Subject: [PATCH 1/5] chore: change app metadata --- electron-builder.json5 | 15 +++++++++++---- package.json | 6 +++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/electron-builder.json5 b/electron-builder.json5 index cfc0733a..63945045 100644 --- a/electron-builder.json5 +++ b/electron-builder.json5 @@ -3,22 +3,29 @@ */ { $schema: "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json", - appId: "YourAppID", + appId: "com.horacehyy.mixed", asar: true, directories: { output: "release/${version}", }, - files: ["dist-electron", "dist"], + files: [ + "dist-electron", + "dist" + ], mac: { artifactName: "${productName}_${version}.${ext}", - target: ["dmg"], + target: [ + "dmg" + ], }, win: { requestedExecutionLevel: "requireAdministrator", target: [ { target: "nsis", - arch: ["x64"], + arch: [ + "x64" + ], }, ], artifactName: "${productName}_${version}.${ext}", diff --git a/package.json b/package.json index be9c5180..539bdd1b 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "miXeD", - "version": "2.5.4", + "version": "2.5.5", "main": "dist-electron/main/index.js", - "description": "All-in-one MiHOYO game launcher", - "author": "HoraceHYY <3214442497@qq.com>", + "description": "All-in-one miHoYo game launcher", + "author": "HoraceHYY ", "license": "MIT", "private": true, "keywords": [ From a7f9038ec487899398cd78a5ce5ea1f2e10cbdb3 Mon Sep 17 00:00:00 2001 From: HoraceHyy Date: Wed, 28 Feb 2024 13:39:16 +0800 Subject: [PATCH 2/5] chore: fix Light Cone i18n --- src/i18n/en_US.json | 2 +- src/i18n/fr_FR.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/en_US.json b/src/i18n/en_US.json index a6c466b5..a932a8d0 100644 --- a/src/i18n/en_US.json +++ b/src/i18n/en_US.json @@ -79,7 +79,7 @@ "sr_noRelicSets": "No Set Effects", "sr_charDetails": "Details", "sr_lockedRank": "(Locked)", - "sr_noLightcone": "No Lightcone Equipped", + "sr_noLightcone": "No Light Cone Equipped", "sr_noSubstats": "No Substats", "sr_noRelics": "No Relics", "hi3_launcherContentsUrl": "https://sdk-os-static.mihoyo.com/bh3_global/mdk/launcher/api/content?filter_adv=false&key=tEGNtVhN&language=en-us&launcher_id=9", diff --git a/src/i18n/fr_FR.json b/src/i18n/fr_FR.json index 367f5dab..bb70facc 100644 --- a/src/i18n/fr_FR.json +++ b/src/i18n/fr_FR.json @@ -79,7 +79,7 @@ "sr_noRelicSets": "Aucun effet d'ensemble", "sr_charDetails": "Détails", "sr_lockedRank": "(Verrouillé)", - "sr_noLightcone": "Aucun Lightcone équipé", + "sr_noLightcone": "Aucun Light Cone équipé", "sr_noSubstats": "Aucune Substats", "sr_noRelics": "Aucune relique", "hi3_launcherContentsUrl": "https://sdk-os-static.mihoyo.com/bh3_global/mdk/launcher/api/content?filter_adv=false&key=dpz65xJ3&language=fr-fr&launcher_id=10", From d007de4a4a5248c72578d4bb770823a6db7496a2 Mon Sep 17 00:00:00 2001 From: HoraceHyy Date: Wed, 28 Feb 2024 15:45:48 +0800 Subject: [PATCH 3/5] fix: game import issue --- src/pages/GenshinPage/Components/GSImportDialog.vue | 4 ++-- src/pages/Honkai3Page/Components/HI3ImportDialog.vue | 4 ++-- src/pages/StarRailPage/Components/SRImportDialog.vue | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pages/GenshinPage/Components/GSImportDialog.vue b/src/pages/GenshinPage/Components/GSImportDialog.vue index defe0f39..550cc051 100644 --- a/src/pages/GenshinPage/Components/GSImportDialog.vue +++ b/src/pages/GenshinPage/Components/GSImportDialog.vue @@ -87,7 +87,7 @@ const onDialogOk = () => {
{{ translate('general_game') }} {{ - launcherPath === '' ? '' : (combinePaths ? launcherPath + '\\Genshin Impact Game\\YuanShen.exe' : + launcherPath === '' ? gamePath : (combinePaths ? launcherPath + '\\Genshin Impact Game\\YuanShen.exe' : gamePath) }}
@@ -131,4 +131,4 @@ const onDialogOk = () => { .confirm-button-disabled { @apply bg-blue-200 text-white pointer-events-none; } - \ No newline at end of file + diff --git a/src/pages/Honkai3Page/Components/HI3ImportDialog.vue b/src/pages/Honkai3Page/Components/HI3ImportDialog.vue index 3533f0b5..484bd525 100644 --- a/src/pages/Honkai3Page/Components/HI3ImportDialog.vue +++ b/src/pages/Honkai3Page/Components/HI3ImportDialog.vue @@ -87,7 +87,7 @@ const onDialogOk = () => {
{{ translate('general_game') }} {{ - launcherPath === '' ? '' : (combinePaths ? launcherPath + '\\Games\\BH3.exe' : + launcherPath === '' ? gamePath : (combinePaths ? launcherPath + '\\Games\\BH3.exe' : gamePath) }}
@@ -142,4 +142,4 @@ const onDialogOk = () => { .theme-color { color: #51C3F9; } - \ No newline at end of file + diff --git a/src/pages/StarRailPage/Components/SRImportDialog.vue b/src/pages/StarRailPage/Components/SRImportDialog.vue index 57568f97..ebb0529c 100644 --- a/src/pages/StarRailPage/Components/SRImportDialog.vue +++ b/src/pages/StarRailPage/Components/SRImportDialog.vue @@ -86,7 +86,7 @@ const onDialogOk = () => {
{{ translate('general_game') }} {{ - launcherPath === '' ? '' : (combinePaths ? launcherPath + '\\Game\\StarRail.exe' : + launcherPath === '' ? gamePath : (combinePaths ? launcherPath + '\\Game\\StarRail.exe' : gamePath) }}
@@ -124,4 +124,4 @@ const onDialogOk = () => { .confirm-button-disabled { @apply bg-blue-200 text-white pointer-events-none; } - \ No newline at end of file + From d538e79d4e88f22184668f8b6fecd0303703a769 Mon Sep 17 00:00:00 2001 From: HoraceHyy Date: Wed, 28 Feb 2024 16:44:31 +0800 Subject: [PATCH 4/5] refactor: tray context menu string --- electron/main/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electron/main/index.ts b/electron/main/index.ts index 6013fb79..bf452213 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -228,7 +228,7 @@ async function createWindow() { const contextMenu = Menu.buildFromTemplate([ { - label: '退出', click: () => { + label: 'Quit', click: () => { win.destroy() } }, From fa839da42ee0aa22cb3d72032c22c2aaccccfbac Mon Sep 17 00:00:00 2001 From: HoraceHyy Date: Wed, 28 Feb 2024 21:29:10 +0800 Subject: [PATCH 5/5] feat: add language dialog on first open --- src/i18n/en_US.json | 4 +- src/i18n/fr_FR.json | 3 +- src/i18n/index.ts | 19 +++++ src/i18n/ja_JP.json | 3 +- src/i18n/ru_RU.json | 3 +- src/i18n/zh_CN.json | 3 +- src/i18n/zh_TW.json | 3 +- .../GenshinPage/Components/GenshinDialog.vue | 2 +- src/pages/MainPage.vue | 72 ++++++++++++++----- src/pages/SettingsPage/SettingsPage.vue | 3 +- 10 files changed, 85 insertions(+), 30 deletions(-) diff --git a/src/i18n/en_US.json b/src/i18n/en_US.json index a932a8d0..ec9b6734 100644 --- a/src/i18n/en_US.json +++ b/src/i18n/en_US.json @@ -1,5 +1,7 @@ { "general_loading": "Loading...", + "general_welcomeTitle": "Welcome to miXeD!", + "general_langText": "Let's get started by setting up your language preference.", "general_cancel": "Cancel", "general_confirm": "Confirm", "general_mainpage": "Home", @@ -47,8 +49,6 @@ "mainpage_title": "miHoYo miXeD Launcher", "mainpage_buttonText": "Launch {game}", "genshin_launcherContentsUrl": "https://sdk-os-static.mihoyo.com/hk4e_global/mdk/launcher/api/content?filter_adv=false&key=gcStgarh&language=en-us&launcher_id=10", - "gs_apiChangeTitle": "Welcome to miXeD!", - "gs_apiChangeText": "Due to API change, this update will wipe your Genshin Impact player data, please retrieve again. Apologies for inconvenience!", "gs_enkaLangCode": "en", "gs_emptyPlayerTip": "Player details will be displayed here", "gs_showcaseTip": "Player details unavailable, please enable 'Show Character Details' in game and try again.", diff --git a/src/i18n/fr_FR.json b/src/i18n/fr_FR.json index bb70facc..e9db0b2c 100644 --- a/src/i18n/fr_FR.json +++ b/src/i18n/fr_FR.json @@ -1,5 +1,6 @@ { "general_loading": "Chargement en cours...", + "general_welcomeTitle": "Bienvenue sur miXeD!", "general_cancel": "Abandonner", "general_confirm": "Confirm", "general_mainpage": "Domicile", @@ -47,8 +48,6 @@ "mainpage_title": "miHoYo miXeD Launcher", "mainpage_buttonText": "Lancer {game}", "genshin_launcherContentsUrl": "https://sdk-os-static.mihoyo.com/hk4e_global/mdk/launcher/api/content?filter_adv=false&key=gcStgarh&language=fr-fr&launcher_id=10", - "gs_apiChangeTitle": "Bienvenue sur miXeD!", - "gs_apiChangeText": "En raison du changement d'API, cette mise à jour va effacer vos données de joueur de Genshin Impact, veuillez récupérer à nouveau. Toutes nos excuses pour les inconvénients !", "gs_enkaLangCode": "fr", "gs_emptyPlayerTip": "Les détails du joueur s'afficheront ici", "gs_showcaseTip": "Les détails du joueur ne sont pas disponibles, veuillez activer 'Afficher les détails du personnage' dans le jeu et réessayez.", diff --git a/src/i18n/index.ts b/src/i18n/index.ts index 8b0d64ba..8b75bcf8 100644 --- a/src/i18n/index.ts +++ b/src/i18n/index.ts @@ -67,3 +67,22 @@ export const switchLang = (language: lang) => { localStorage.lang = language i18n.global.locale = language } + +export const str2Lang = (str: string | null): lang | null => { + switch (str) { + case 'en_US': + return 'en_US' + case 'zh_CN': + return 'zh_CN' + case 'zh_TW': + return 'zh_TW' + case 'ru_RU': + return 'ru_RU' + case 'ja_JP': + return 'ja_JP' + case 'fr_FR': + return 'fr_FR' + default: + return null + } +} diff --git a/src/i18n/ja_JP.json b/src/i18n/ja_JP.json index 67fa8f61..90a63685 100644 --- a/src/i18n/ja_JP.json +++ b/src/i18n/ja_JP.json @@ -1,5 +1,6 @@ { "general_loading": "読み込み中...", + "general_welcomeTitle": "miXeDへようこそ!", "general_cancel": "キャンセル", "general_confirm": "確認", "general_mainpage": "ホームページ", @@ -47,8 +48,6 @@ "mainpage_title": "miHoYo miXeD ランチャー", "mainpage_buttonText": "{game}を起動!", "genshin_launcherContentsUrl": "https://sdk-os-static.mihoyo.com/hk4e_global/mdk/launcher/api/content?filter_adv=false&key=gcStgarh&language=ja-jp&launcher_id=10", - "gs_apiChangeTitle": "miXeDへようこそ!", - "gs_apiChangeText": "APIの変更により、このアップデートは原神インパクトプレイヤーのデータを消去します。ご不便をおかけして申し訳ございません。", "gs_enkaLangCode": "ja", "gs_emptyPlayerTip": "キャラの詳細がここに表示されます", "gs_showcaseTip": "キャラの詳細情報が利用できません。ゲーム内で「キャラクターの詳細を表示」を有効にして、もう一度お試しください。", diff --git a/src/i18n/ru_RU.json b/src/i18n/ru_RU.json index 704d1034..9462d33f 100644 --- a/src/i18n/ru_RU.json +++ b/src/i18n/ru_RU.json @@ -1,5 +1,6 @@ { "general_loading": "Загрузка...", + "general_welcomeTitle": "Добро пожаловать в miXeD!", "general_cancel": "Отмена", "general_confirm": "Подтвердить", "general_mainpage": "Главная", @@ -47,8 +48,6 @@ "mainpage_title": "Запуск miHoYo miXeD", "mainpage_buttonText": "Запустить {game}", "genshin_launcherContentsUrl": "https://sdk-os-static.mihoyo.com/hk4e_global/mdk/launcher/api/content?filter_adv=false&key=gcStgarh&language=ru-ru&launcher_id=10", - "gs_apiChangeTitle": "Добро пожаловать в miXeD!", - "gs_apiChangeText": "В связи с изменениями API это обновление удалит данные игрока, пожалуйста, восстановите их. Приносим извинения за неудобства!", "gs_enkaLangCode": "ru", "gs_emptyPlayerTip": "Информация о игроке будет отображена здесь", "gs_showcaseTip": "Информация о игроке недоступна. Включите 'Отображение деталей персонажей' в игре и попробуйте снова.", diff --git a/src/i18n/zh_CN.json b/src/i18n/zh_CN.json index feefbde7..a7b94a92 100644 --- a/src/i18n/zh_CN.json +++ b/src/i18n/zh_CN.json @@ -1,5 +1,6 @@ { "general_loading": "加载中...", + "general_welcomeTitle": "欢迎使用 miXeD!", "general_cancel": "取消", "general_confirm": "确定", "general_mainpage": "主页", @@ -47,8 +48,6 @@ "mainpage_title": "米哈游聚合启动器", "mainpage_buttonText": "{game}启动", "genshin_launcherContentsUrl": "https://sdk-static.mihoyo.com/hk4e_cn/mdk/launcher/api/content?filter_adv=false&key=eYd89JmJ&language=zh-cn&launcher_id=18", - "gs_apiChangeTitle": "欢迎使用 miXeD!", - "gs_apiChangeText": "由于API变更,此次更新将清除您的原神账号信息,请您重新获取。为您带来不便敬请谅解!", "gs_enkaLangCode": "chs", "gs_emptyPlayerTip": "此处将显示角色的详细信息", "gs_showcaseTip": "当前暂无详细信息,请在游戏内打开“显示角色详情”后再试。", diff --git a/src/i18n/zh_TW.json b/src/i18n/zh_TW.json index d7835310..b8aadf51 100644 --- a/src/i18n/zh_TW.json +++ b/src/i18n/zh_TW.json @@ -1,5 +1,6 @@ { "general_loading": "載入中...", + "general_welcomeTitle": "歡迎使用 miXeD!", "general_cancel": "取消", "general_confirm": "確定", "general_mainpage": "主頁", @@ -47,8 +48,6 @@ "mainpage_title": "米哈游聚合啓動器", "mainpage_buttonText": "{game}啓動", "genshin_launcherContentsUrl": "https://sdk-os-static.mihoyo.com/hk4e_global/mdk/launcher/api/content?filter_adv=false&key=gcStgarh&language=zh-tw&launcher_id=10", - "gs_apiChangeTitle": "歡迎使用 miXeD!", - "gs_apiChangeText": "由於API變更,此次更新將清除您的原神賬戶信息,請您重新獲取。爲您帶來不便敬請諒解!", "gs_enkaLangCode": "cht", "gs_emptyPlayerTip": "此處將顯示角色的詳細信息", "gs_showcaseTip": "當前暫無詳細信息,請在游戲内打開”顯示角色詳情“后再試。", diff --git a/src/pages/GenshinPage/Components/GenshinDialog.vue b/src/pages/GenshinPage/Components/GenshinDialog.vue index 45a56081..c3fc3ed1 100644 --- a/src/pages/GenshinPage/Components/GenshinDialog.vue +++ b/src/pages/GenshinPage/Components/GenshinDialog.vue @@ -206,4 +206,4 @@ defineExpose({ .divider-bg { background: #DAD2C5; } - \ No newline at end of file + diff --git a/src/pages/MainPage.vue b/src/pages/MainPage.vue index 0b39385e..c6df4f78 100644 --- a/src/pages/MainPage.vue +++ b/src/pages/MainPage.vue @@ -1,8 +1,11 @@