mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-01-01 22:47:19 +03:00
Minor changes
- added Chinese socials support for `Launcher.getSocial()` - updated French - `constants.api` field now public
This commit is contained in:
parent
b1f5e237f8
commit
7929e6fab8
3 changed files with 8 additions and 5 deletions
|
@ -136,7 +136,7 @@ settings:
|
||||||
winecfg: winecfg
|
winecfg: winecfg
|
||||||
launcher: Dossier du Launcher
|
launcher: Dossier du Launcher
|
||||||
game: Dossier du jeu
|
game: Dossier du jeu
|
||||||
repair_game: repair game files
|
repair_game: Corriger les fichiers du jeu
|
||||||
|
|
||||||
# Enhancements
|
# Enhancements
|
||||||
enhancements:
|
enhancements:
|
||||||
|
|
|
@ -228,7 +228,7 @@ export default class constants
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
protected static readonly api = {
|
public static readonly api = {
|
||||||
key: {
|
key: {
|
||||||
global: 'gcStgarh',
|
global: 'gcStgarh',
|
||||||
cn: 'eYd89JmJ'
|
cn: 'eYd89JmJ'
|
||||||
|
|
|
@ -12,6 +12,7 @@ import Locales from './launcher/Locales';
|
||||||
import ProgressBar from './launcher/ProgressBar';
|
import ProgressBar from './launcher/ProgressBar';
|
||||||
import State from './launcher/State';
|
import State from './launcher/State';
|
||||||
import Background from './launcher/Background';
|
import Background from './launcher/Background';
|
||||||
|
import Game from './Game';
|
||||||
|
|
||||||
import { version } from '../../package.json';
|
import { version } from '../../package.json';
|
||||||
|
|
||||||
|
@ -161,13 +162,15 @@ export default class Launcher
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get launcher social buttons uri
|
* Get launcher social buttons uri
|
||||||
*
|
|
||||||
* TODO: Chinese URI
|
|
||||||
*/
|
*/
|
||||||
public getSocial(): Promise<string>
|
public getSocial(): Promise<string>
|
||||||
{
|
{
|
||||||
return new Promise(async (resolve) => {
|
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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue