forked from mirrors/amnezia-wg-easy
feat: support more langs
* add translations for French, Spanish, and Italian
* change the wording for better understanding of this feature:
- "import" to "restore"
- "export" to "backup"
* rename functions to reflect these changes
This commit is contained in:
parent
4deca34faf
commit
43b193b76d
6 changed files with 58 additions and 44 deletions
|
|
@ -319,15 +319,18 @@ Endpoint = ${WG_HOST}:${WG_CONFIG_PORT}`;
|
|||
await this.saveConfig();
|
||||
}
|
||||
|
||||
async uploadConfiguration(config) {
|
||||
const _config = JSON.parse(config);
|
||||
await this.__saveConfig(_config);
|
||||
// force restart
|
||||
async ___forceRestart() {
|
||||
this.__configPromise = null;
|
||||
await this.saveConfig();
|
||||
}
|
||||
|
||||
async downloadConfiguration() {
|
||||
async restoreConfiguration(config) {
|
||||
const _config = JSON.parse(config);
|
||||
await this.__saveConfig(_config);
|
||||
await this.___forceRestart();
|
||||
}
|
||||
|
||||
async backupConfiguration() {
|
||||
const config = await this.getConfig();
|
||||
return JSON.stringify(config, null, 2);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue