Add foundation of the application and templates
This commit is contained in:
parent
a014bb8e6c
commit
60034dcee2
8 changed files with 165 additions and 0 deletions
35
module/tweaks/rearrangeSidebarTabs.mjs
Normal file
35
module/tweaks/rearrangeSidebarTabs.mjs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import { SettingStatusEnum, status } from "../utils/SettingStatus.mjs";
|
||||
import { __ID__ } from "../consts.mjs";
|
||||
import { Logger } from "../utils/Logger.mjs";
|
||||
import { preventTweakRegistration } from "../utils/preRegisterTweak.mjs";
|
||||
import { SidebarTabRearranger } from "../apps/SidebarTabRearranger.mjs";
|
||||
|
||||
export const key = `rearrangeSidebarTabs`;
|
||||
|
||||
export function rearrangeSidebarTabs() {
|
||||
status[key] = SettingStatusEnum.Unknown;
|
||||
if (preventTweakRegistration(key)) { return };
|
||||
|
||||
// #region Registration
|
||||
Logger.log(`Registering tweak: ${key}`);
|
||||
game.settings.registerMenu(__ID__, `${key}Menu`, {
|
||||
name: `OFT.menu.${key}.name`,
|
||||
hint: `OFT.menu.${key}.hint`,
|
||||
label: `OFT.menu.${key}.label`,
|
||||
restricted: false,
|
||||
type: SidebarTabRearranger,
|
||||
});
|
||||
game.settings.register(__ID__, key, {
|
||||
scope: `user`,
|
||||
config: false,
|
||||
type: Array,
|
||||
default: [],
|
||||
});
|
||||
// #endregion Registration
|
||||
|
||||
// #region Implementation
|
||||
// TODO: do this
|
||||
// #endregion Implementation
|
||||
|
||||
status[key] = SettingStatusEnum.Registered;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue