chimera-mark2-core-release/static/js/core/coreModule.js

40 lines
945 B
JavaScript
Raw Normal View History

2022-04-26 19:48:03 +00:00
import * as API from './api.js';
import * as UI from './ui.js';
export var menuSelector={
"groups":"adminGrous",
"modules":"adminModules",
"module":"adminModules",
"users":"adminUsers",
"group":"adminGrous",
2022-04-28 17:12:33 +00:00
mailAccounts:"mailAccounts",
oauth: "oauth",
2022-05-29 12:14:34 +00:00
comps: "adminComps"
2022-04-26 19:48:03 +00:00
};
2022-07-04 12:46:25 +00:00
export var modSelector={
"myprofile": "./coreMyProfile.js",
"modules": "./coreModules.js",
"module": "./coreModView.js",
"groups": "./coreGroups.js",
"group": "./coreGroup.js",
"users": "./coreUsers.js",
"userEmailConfirm": "./userMailConfirm.js",
"mailAccounts": "./coreMailAccounts.js",
"oauth": "./coreOAuthProfiles.js",
"comps": "./coreComps.js"
}
2022-04-26 19:48:03 +00:00
export function load() {
let ref=UI.parceURL();
2022-07-04 12:46:25 +00:00
if (isset(modSelector[ref.function])) {
API.loadModule(modSelector[ref.function]);
} else if (!isset(ref.function)) {
// TODO: Implement default start page for core module
return true;
} else {
throw new Error(404);
2022-04-26 19:48:03 +00:00
}
return true;
}