refactor(modules): second part of moving files around, changing layout etc

This commit is contained in:
David Ralph
2024-02-19 09:42:59 +00:00
parent 618b5fe466
commit 294b3830bf
87 changed files with 760 additions and 728 deletions

View File

@@ -0,0 +1,18 @@
import { toast } from 'react-toastify';
import variables from 'config/variables';
/**
* It takes a JSON file of Mue settings, parses it, and then sets the localStorage values to the values in the
* file.
* @param e - The JSON settings string to import
*/
export function importSettings(e) {
const content = JSON.parse(e);
Object.keys(content).forEach((key) => {
localStorage.setItem(key, content[key]);
});
toast(variables.getMessage('toasts.imported'));
variables.stats.postEvent('tab', 'Settings imported');
}