mirror of
https://github.com/w0rng/amnezia-wg-easy.git
synced 2025-04-26 13:20:11 +03:00
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
e3ee09b755
commit
ce20bb7fcb
6 changed files with 58 additions and 44 deletions
|
@ -299,18 +299,21 @@ new Vue({
|
|||
.catch((err) => alert(err.message || err.toString()))
|
||||
.finally(() => this.refresh().catch(console.error));
|
||||
},
|
||||
importConfig(e) {
|
||||
restoreConfig(e) {
|
||||
e.preventDefault();
|
||||
const file = e.currentTarget.files.item(0);
|
||||
file.text()
|
||||
.then((content) => {
|
||||
this.api.uploadConfiguration(content)
|
||||
.then((_result) => alert('The configuration was updated.'))
|
||||
.catch((err) => alert(err.message || err.toString()))
|
||||
.finally(() => this.refresh().catch(console.error));
|
||||
})
|
||||
.catch((err) => alert(err.message || err.toString()))
|
||||
.finally(() => this.refresh().catch(console.error));
|
||||
if (file) {
|
||||
file.text()
|
||||
.then((content) => {
|
||||
this.api.restoreConfiguration(content)
|
||||
.then((_result) => alert('The configuration was updated.'))
|
||||
.catch((err) => alert(err.message || err.toString()))
|
||||
.finally(() => this.refresh().catch(console.error));
|
||||
})
|
||||
.catch((err) => alert(err.message || err.toString()));
|
||||
} else {
|
||||
alert('Failed to load your file!');
|
||||
}
|
||||
},
|
||||
toggleTheme() {
|
||||
const themes = ['light', 'dark', 'auto'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue