mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-12-24 02:28:15 +03:00
Merge branch 'term' of Maroxy/an-ordinary-launcher into main
This commit is contained in:
commit
cf45b490d6
17 changed files with 49 additions and 14 deletions
|
@ -17,7 +17,7 @@
|
||||||
<body>
|
<body>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<div class="menu-item menu-item-active" anchor="general" i18id="GeneralSettings">General</div>
|
<div class="menu-item menu-item-active" anchor="general" i18id="GeneralSettings">General</div>
|
||||||
<div class="menu-item" anchor="runners" i18id="Runners">Runners</div>
|
<div class="menu-item" anchor="runners" i18id="WineVersion">Wine version</div>
|
||||||
<div class="menu-item" anchor="dxvks" i18id="DXVK">DXVK</div>
|
<div class="menu-item" anchor="dxvks" i18id="DXVK">DXVK</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="settings-item" id="runners">
|
<div class="settings-item" id="runners">
|
||||||
<h2>Runners</h2>
|
<h2 i18id="WineVersion"></h2>
|
||||||
|
|
||||||
<div class="list" id="runners-list"></div>
|
<div class="list" id="runners-list"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
{
|
||||||
"Install": "Installieren",
|
"Install": "Installieren",
|
||||||
|
"Update": "Updaten",
|
||||||
"Launch": "Starten",
|
"Launch": "Starten",
|
||||||
"Runners": "Runners",
|
"Runners": "Runners",
|
||||||
"Langs": "Sprachen",
|
"Langs": "Sprachen",
|
||||||
"Voice": "Sprachpaket",
|
"Voice": "Sprachpaket",
|
||||||
"SettingsTitle": "Einstellungen",
|
"SettingsTitle": "Einstellungen",
|
||||||
"GeneralSettings": "Generell",
|
"GeneralSettings": "Generell",
|
||||||
|
"WineVersion": "Wine Version",
|
||||||
"Downloading": "wird Heruntergeladen",
|
"Downloading": "wird Heruntergeladen",
|
||||||
"Unpack": "wird Entpackt",
|
"Unpack": "wird Entpackt",
|
||||||
"GameDownloaded": "Spiel würde erfolgreich heruntergeladen",
|
"GameDownloaded": "Spiel würde erfolgreich heruntergeladen",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"Install": "Install",
|
"Install": "Install",
|
||||||
|
"Update": "Update",
|
||||||
"Launch": "Launch",
|
"Launch": "Launch",
|
||||||
"Runners": "Runners",
|
"Runners": "Runners",
|
||||||
"Langs": "Languages",
|
"Langs": "Languages",
|
||||||
|
@ -7,6 +8,7 @@
|
||||||
"SettingsTitle": "Settings",
|
"SettingsTitle": "Settings",
|
||||||
"GeneralSettings": "General",
|
"GeneralSettings": "General",
|
||||||
"Downloading": "Downloading",
|
"Downloading": "Downloading",
|
||||||
|
"WineVersion": "Wine version",
|
||||||
"Unpack": "Unpacking",
|
"Unpack": "Unpacking",
|
||||||
"GameDownloaded": "Game was successfully installed",
|
"GameDownloaded": "Game was successfully installed",
|
||||||
"ApplyPatch": "Applying patch...",
|
"ApplyPatch": "Applying patch...",
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
{
|
||||||
"Install": "Install",
|
"Install": "Install",
|
||||||
|
"Update": "Update",
|
||||||
"Launch": "Launch",
|
"Launch": "Launch",
|
||||||
"Runners": "Runners",
|
"Runners": "Runners",
|
||||||
"Langs": "Languages",
|
"Langs": "Languages",
|
||||||
"Voice": "Voice Pack",
|
"Voice": "Voice Pack",
|
||||||
"SettingsTitle": "Settings",
|
"SettingsTitle": "Settings",
|
||||||
"GeneralSettings": "General",
|
"GeneralSettings": "General",
|
||||||
|
"WineVersion": "Wine version",
|
||||||
"Downloading": "Downloading",
|
"Downloading": "Downloading",
|
||||||
"Unpack": "Unpacking",
|
"Unpack": "Unpacking",
|
||||||
"GameDownloaded": "Game was successfully installed",
|
"GameDownloaded": "Game was successfully installed",
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
{
|
||||||
"Install": "Install",
|
"Install": "Install",
|
||||||
|
"Update": "Update",
|
||||||
"Launch": "Launch",
|
"Launch": "Launch",
|
||||||
"Runners": "Runners",
|
"Runners": "Runners",
|
||||||
"Langs": "Languages",
|
"Langs": "Languages",
|
||||||
"Voice": "Voice Pack",
|
"Voice": "Voice Pack",
|
||||||
"SettingsTitle": "Settings",
|
"SettingsTitle": "Settings",
|
||||||
"GeneralSettings": "General",
|
"GeneralSettings": "General",
|
||||||
|
"WineVersion": "Wine version",
|
||||||
"Downloading": "Downloading",
|
"Downloading": "Downloading",
|
||||||
"Unpack": "Unpacking",
|
"Unpack": "Unpacking",
|
||||||
"GameDownloaded": "Game was successfully installed",
|
"GameDownloaded": "Game was successfully installed",
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
{
|
||||||
"Install": "Install",
|
"Install": "Install",
|
||||||
|
"Update": "Update",
|
||||||
"Launch": "Launch",
|
"Launch": "Launch",
|
||||||
"Runners": "Runners",
|
"Runners": "Runners",
|
||||||
"Langs": "Languages",
|
"Langs": "Languages",
|
||||||
"Voice": "Voice Pack",
|
"Voice": "Voice Pack",
|
||||||
"SettingsTitle": "Settings",
|
"SettingsTitle": "Settings",
|
||||||
"GeneralSettings": "General",
|
"GeneralSettings": "General",
|
||||||
|
"WineVersion": "Wine version",
|
||||||
"Downloading": "Downloading",
|
"Downloading": "Downloading",
|
||||||
"Unpack": "Unpacking",
|
"Unpack": "Unpacking",
|
||||||
"GameDownloaded": "Game was successfully installed",
|
"GameDownloaded": "Game was successfully installed",
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
{
|
||||||
"Install": "Install",
|
"Install": "Install",
|
||||||
|
"Update": "Update",
|
||||||
"Launch": "Launch",
|
"Launch": "Launch",
|
||||||
"Runners": "Runners",
|
"Runners": "Runners",
|
||||||
"Langs": "Languages",
|
"Langs": "Languages",
|
||||||
"Voice": "Voice Pack",
|
"Voice": "Voice Pack",
|
||||||
"SettingsTitle": "Settings",
|
"SettingsTitle": "Settings",
|
||||||
"GeneralSettings": "General",
|
"GeneralSettings": "General",
|
||||||
|
"WineVersion": "Wine version",
|
||||||
"Downloading": "Downloading",
|
"Downloading": "Downloading",
|
||||||
"Unpack": "Unpacking",
|
"Unpack": "Unpacking",
|
||||||
"GameDownloaded": "Game was successfully installed",
|
"GameDownloaded": "Game was successfully installed",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"Install": "インストール",
|
"Install": "インストール",
|
||||||
|
"Update": "アップデート",
|
||||||
"Launch": "打ち上げ",
|
"Launch": "打ち上げ",
|
||||||
"Runners": "Runners",
|
"Runners": "Runners",
|
||||||
"Langs": "言語",
|
"Langs": "言語",
|
||||||
|
@ -7,6 +8,7 @@
|
||||||
"SettingsTitle": "設定",
|
"SettingsTitle": "設定",
|
||||||
"GeneralSettings": "一般",
|
"GeneralSettings": "一般",
|
||||||
"Downloading": "ダウンロード中",
|
"Downloading": "ダウンロード中",
|
||||||
|
"WineVersion": "ワインバージョン",
|
||||||
"Unpack": "開梱",
|
"Unpack": "開梱",
|
||||||
"GameDownloaded": "ゲームのインストールに成功しました",
|
"GameDownloaded": "ゲームのインストールに成功しました",
|
||||||
"ApplyPatch": "パッチの適用...",
|
"ApplyPatch": "パッチの適用...",
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
{
|
||||||
"Install": "Install",
|
"Install": "Install",
|
||||||
|
"Update": "Update",
|
||||||
"Launch": "Launch",
|
"Launch": "Launch",
|
||||||
"Runners": "Runners",
|
"Runners": "Runners",
|
||||||
"Langs": "Languages",
|
"Langs": "Languages",
|
||||||
"Voice": "Voice Pack",
|
"Voice": "Voice Pack",
|
||||||
"SettingsTitle": "Settings",
|
"SettingsTitle": "Settings",
|
||||||
"GeneralSettings": "General",
|
"GeneralSettings": "General",
|
||||||
|
"WineVersion": "Wine version",
|
||||||
"Downloading": "Downloading",
|
"Downloading": "Downloading",
|
||||||
"Unpack": "Unpacking",
|
"Unpack": "Unpacking",
|
||||||
"GameDownloaded": "Game was successfully installed",
|
"GameDownloaded": "Game was successfully installed",
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
{
|
||||||
"Install": "Install",
|
"Install": "Install",
|
||||||
|
"Update": "Update",
|
||||||
"Launch": "Launch",
|
"Launch": "Launch",
|
||||||
"Runners": "Runners",
|
"Runners": "Runners",
|
||||||
"Langs": "Languages",
|
"Langs": "Languages",
|
||||||
"Voice": "Voice Pack",
|
"Voice": "Voice Pack",
|
||||||
"SettingsTitle": "Settings",
|
"SettingsTitle": "Settings",
|
||||||
"GeneralSettings": "General",
|
"GeneralSettings": "General",
|
||||||
|
"WineVersion": "Wine version",
|
||||||
"Downloading": "Downloading",
|
"Downloading": "Downloading",
|
||||||
"Unpack": "Unpacking",
|
"Unpack": "Unpacking",
|
||||||
"GameDownloaded": "Game was successfully installed",
|
"GameDownloaded": "Game was successfully installed",
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
{
|
||||||
"Install": "Install",
|
"Install": "Install",
|
||||||
|
"Update": "Update",
|
||||||
"Launch": "Launch",
|
"Launch": "Launch",
|
||||||
"Runners": "Runners",
|
"Runners": "Runners",
|
||||||
"Langs": "Languages",
|
"Langs": "Languages",
|
||||||
"Voice": "Voice Pack",
|
"Voice": "Voice Pack",
|
||||||
"SettingsTitle": "Settings",
|
"SettingsTitle": "Settings",
|
||||||
"GeneralSettings": "General",
|
"GeneralSettings": "General",
|
||||||
|
"WineVersion": "Wine version",
|
||||||
"Downloading": "Downloading",
|
"Downloading": "Downloading",
|
||||||
"Unpack": "Unpacking",
|
"Unpack": "Unpacking",
|
||||||
"GameDownloaded": "Game was successfully installed",
|
"GameDownloaded": "Game was successfully installed",
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
{
|
||||||
"Install": "Install",
|
"Install": "Install",
|
||||||
|
"Update": "Update",
|
||||||
"Launch": "Launch",
|
"Launch": "Launch",
|
||||||
"Runners": "Runners",
|
"Runners": "Runners",
|
||||||
"Langs": "Languages",
|
"Langs": "Languages",
|
||||||
"Voice": "Voice Pack",
|
"Voice": "Voice Pack",
|
||||||
"SettingsTitle": "Settings",
|
"SettingsTitle": "Settings",
|
||||||
"GeneralSettings": "General",
|
"GeneralSettings": "General",
|
||||||
|
"WineVersion": "Wine version",
|
||||||
"Downloading": "Downloading",
|
"Downloading": "Downloading",
|
||||||
"Unpack": "Unpacking",
|
"Unpack": "Unpacking",
|
||||||
"GameDownloaded": "Game was successfully installed",
|
"GameDownloaded": "Game was successfully installed",
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
{
|
||||||
"Install": "Install",
|
"Install": "Install",
|
||||||
|
"Update": "Update",
|
||||||
"Launch": "Launch",
|
"Launch": "Launch",
|
||||||
"Runners": "Runners",
|
"Runners": "Runners",
|
||||||
"Langs": "Languages",
|
"Langs": "Languages",
|
||||||
"Voice": "Voice Pack",
|
"Voice": "Voice Pack",
|
||||||
"SettingsTitle": "Settings",
|
"SettingsTitle": "Settings",
|
||||||
"GeneralSettings": "General",
|
"GeneralSettings": "General",
|
||||||
|
"WineVersion": "Wine version",
|
||||||
"Downloading": "Downloading",
|
"Downloading": "Downloading",
|
||||||
"Unpack": "Unpacking",
|
"Unpack": "Unpacking",
|
||||||
"GameDownloaded": "Game was successfully installed",
|
"GameDownloaded": "Game was successfully installed",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"Install": "安装",
|
"Install": "安装",
|
||||||
|
"Update": "更新",
|
||||||
"Launch": "发射",
|
"Launch": "发射",
|
||||||
"Runners": "Runners",
|
"Runners": "Runners",
|
||||||
"Langs": "语言",
|
"Langs": "语言",
|
||||||
|
@ -7,6 +8,7 @@
|
||||||
"SettingsTitle": "设置",
|
"SettingsTitle": "设置",
|
||||||
"GeneralSettings": "一般的",
|
"GeneralSettings": "一般的",
|
||||||
"Downloading": "下载",
|
"Downloading": "下载",
|
||||||
|
"WineVersion": "葡萄酒版",
|
||||||
"Unpack": "开箱",
|
"Unpack": "开箱",
|
||||||
"GameDownloaded": "游戏安装成功",
|
"GameDownloaded": "游戏安装成功",
|
||||||
"ApplyPatch": "应用补丁...",
|
"ApplyPatch": "应用补丁...",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"Install": "安裝",
|
"Install": "安裝",
|
||||||
|
"Update": "更新",
|
||||||
"Launch": "發射",
|
"Launch": "發射",
|
||||||
"Runners": "Runners",
|
"Runners": "Runners",
|
||||||
"Langs": "語言",
|
"Langs": "語言",
|
||||||
|
@ -7,6 +8,7 @@
|
||||||
"SettingsTitle": "設置",
|
"SettingsTitle": "設置",
|
||||||
"GeneralSettings": "一般的",
|
"GeneralSettings": "一般的",
|
||||||
"Downloading": "下載",
|
"Downloading": "下載",
|
||||||
|
"WineVersion": "葡萄酒版",
|
||||||
"Unpack": "Unpacking",
|
"Unpack": "Unpacking",
|
||||||
"GameDownloaded": "遊戲安裝成功",
|
"GameDownloaded": "遊戲安裝成功",
|
||||||
"ApplyPatch": "Applying patch...",
|
"ApplyPatch": "Applying patch...",
|
||||||
|
|
|
@ -55,7 +55,7 @@ export class LauncherUI
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'game-update-available':
|
case 'game-update-available':
|
||||||
$('#launch').text('Update'); // FIXME i18n.translate
|
$('#launch').text(i18n.translate('Update'));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -156,13 +156,26 @@ export class LauncherUI
|
||||||
Genshinlib.getBackgroundUri().then(uri => $('body').css('background-image', `url(${uri})`));
|
Genshinlib.getBackgroundUri().then(uri => $('body').css('background-image', `url(${uri})`));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static updateSocial (): void
|
||||||
|
{
|
||||||
|
fetch(`https://genshin.mihoyo.com/launcher/10/${Genshinlib.lang.launcher}?api_url=https%3A%2F%2Fapi-os-takumi.mihoyo.com%2Fhk4e_global&prev=false`)
|
||||||
|
.then(res => res.text())
|
||||||
|
.then(body => {
|
||||||
|
$('#__layout').remove();
|
||||||
|
$(body).find('#__layout').appendTo('#launchcontent');
|
||||||
|
|
||||||
|
$('#launchcontent .home__main .home-swiper-wrap').remove();
|
||||||
|
$('#launchcontent .home__main .home-news').remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public static updateLang (lang: string|null = null): void
|
public static updateLang (lang: string|null = null): void
|
||||||
{
|
{
|
||||||
if (lang !== null)
|
if (lang !== null)
|
||||||
i18n.setLang(lang);
|
i18n.setLang(lang);
|
||||||
|
|
||||||
$('*[i18id]').each((i, element) => {
|
$('*[i18id]').each((i, element) => {
|
||||||
element.innerText = i18n.translate(element.getAttribute('i18id')?.toString()!);
|
element.innerText = i18n.translate(element.getAttribute('i18id')!);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -25,19 +25,13 @@ $(() => {
|
||||||
|
|
||||||
LauncherUI.setState('game-launch-available');
|
LauncherUI.setState('game-launch-available');
|
||||||
LauncherUI.updateBackground();
|
LauncherUI.updateBackground();
|
||||||
|
LauncherUI.updateSocial();
|
||||||
fetch(`https://genshin.mihoyo.com/launcher/10/${Genshinlib.lang.launcher}?api_url=https%3A%2F%2Fapi-os-takumi.mihoyo.com%2Fhk4e_global&prev=false`)
|
|
||||||
.then(res => res.text())
|
|
||||||
.then(body => {
|
|
||||||
$(body).find('#__layout').appendTo('#launchcontent');
|
|
||||||
|
|
||||||
$('#launchcontent .home__main .home-swiper-wrap').remove();
|
|
||||||
$('#launchcontent .home__main .home-news').remove();
|
|
||||||
});
|
|
||||||
|
|
||||||
ipcRenderer.on('change-lang', (event: void, data: any) => {
|
ipcRenderer.on('change-lang', (event: void, data: any) => {
|
||||||
LauncherUI.updateBackground();
|
LauncherUI.updateBackground();
|
||||||
LauncherUI.updateLang();
|
LauncherUI.updateSocial();
|
||||||
|
// Needs data.lang in the arguments since the button doesn't get updated otherwise.
|
||||||
|
LauncherUI.updateLang(data.lang);
|
||||||
});
|
});
|
||||||
|
|
||||||
let rpc: any;
|
let rpc: any;
|
||||||
|
|
Loading…
Reference in a new issue