mirror of
https://github.com/mue/mue.git
synced 2026-07-19 06:54:10 +02:00
refactor: cleanup
This commit is contained in:
@@ -25,11 +25,11 @@ export function exportSettings() {
|
||||
settings[key] = localStorage.getItem(key);
|
||||
});
|
||||
saveFile(settings, 'mue-settings.json');
|
||||
window.stats.postEvent('tab', 'Settings exported');
|
||||
variables.stats.postEvent('tab', 'Settings exported');
|
||||
}
|
||||
|
||||
export function importSettings(e) {
|
||||
const getMessage = (languagecode, text) => variables.language.getMessage(variables.languagecode, text);
|
||||
const getMessage = (text) => variables.language.getMessage(variables.languagecode, text);
|
||||
const content = JSON.parse(e.target.result);
|
||||
|
||||
Object.keys(content).forEach((key) => {
|
||||
@@ -37,5 +37,5 @@ export function importSettings(e) {
|
||||
});
|
||||
|
||||
toast(getMessage('toasts.imported'));
|
||||
window.stats.postEvent('tab', 'Settings imported');
|
||||
variables.stats.postEvent('tab', 'Settings imported');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user