diff --git a/public/locales/fr-fr.yaml b/public/locales/fr-fr.yaml index ba5e672..17e2b66 100644 --- a/public/locales/fr-fr.yaml +++ b/public/locales/fr-fr.yaml @@ -136,7 +136,7 @@ settings: winecfg: winecfg launcher: Dossier du Launcher game: Dossier du jeu - repair_game: repair game files + repair_game: Corriger les fichiers du jeu # Enhancements enhancements: diff --git a/src/ts/Constants.ts b/src/ts/Constants.ts index f45a5dd..a01dbc7 100644 --- a/src/ts/Constants.ts +++ b/src/ts/Constants.ts @@ -228,7 +228,7 @@ export default class constants } }; - protected static readonly api = { + public static readonly api = { key: { global: 'gcStgarh', cn: 'eYd89JmJ' diff --git a/src/ts/Launcher.ts b/src/ts/Launcher.ts index 175bb68..d026a60 100644 --- a/src/ts/Launcher.ts +++ b/src/ts/Launcher.ts @@ -12,6 +12,7 @@ import Locales from './launcher/Locales'; import ProgressBar from './launcher/ProgressBar'; import State from './launcher/State'; import Background from './launcher/Background'; +import Game from './Game'; import { version } from '../../package.json'; @@ -161,13 +162,15 @@ export default class Launcher /** * Get launcher social buttons uri - * - * TODO: Chinese URI */ public getSocial(): Promise { return new Promise(async (resolve) => { - resolve(`https://${constants.placeholders.lowercase.first}.${constants.placeholders.lowercase.company}.com/launcher/10/${Locales.fallback((await Locales.default()) ?? 'en-us')}?api_url=https%3A%2F%2Fapi-os-takumi.${constants.placeholders.lowercase.company}.com%2Fhk4e_global&key=gcStgarh&prev=false`); + const uri = await Game.server == 'global' ? + `https://${constants.placeholders.lowercase.first}.${constants.placeholders.lowercase.company}.com/launcher/${constants.api.launcher_id.global}/${Locales.fallback((await Locales.default()) ?? 'en-us')}?api_url=https%3A%2F%2Fapi-os-takumi.${constants.placeholders.lowercase.company}.com%2Fhk4e_global&key=${constants.api.key.global}&prev=false` : + `https://ys.${constants.placeholders.lowercase.company}.com/launcher/${constants.api.launcher_id.cn}/?api_url=https%3A%2F%2Fapi-sdk.${constants.placeholders.lowercase.company}.com%2Fhk4e_cn&key=${constants.api.key.cn}&prev=false`; + + resolve(uri); }); }