Add the startSidebarExpanded setting (closes #2)
This commit is contained in:
parent
d856f7b1c8
commit
529aa72bdf
10 changed files with 71 additions and 5 deletions
8
module/hooks/init.mjs
Normal file
8
module/hooks/init.mjs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { __ID } from "../consts.mjs";
|
||||
import { startSidebarExpanded } from "../settings/startSidebarExpanded.mjs";
|
||||
|
||||
Hooks.once(`init`, () => {
|
||||
console.log(`${__ID} | Initializing`);
|
||||
|
||||
startSidebarExpanded.register();
|
||||
});
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { __ID } from "../consts.mjs";
|
||||
|
||||
Hooks.on(`ready`, () => {
|
||||
Hooks.once(`ready`, () => {
|
||||
console.log(`${__ID} | Ready`);
|
||||
});
|
||||
|
|
|
|||
9
module/hooks/renderSidebar.mjs
Normal file
9
module/hooks/renderSidebar.mjs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { startSidebarExpanded } from "../settings/startSidebarExpanded.mjs";
|
||||
|
||||
Hooks.once(`renderSidebar`, (app, _element, _context, _options) => {
|
||||
|
||||
// MARK: Sidebar Expansion
|
||||
if (startSidebarExpanded.value()) {
|
||||
app.toggleExpanded(true);
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue