mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-04 14:41:42 +08:00
chore(client/ts): port spacer
This commit is contained in:
parent
c2315a9341
commit
fa6d229ecf
@ -75,6 +75,7 @@ export type CommandMappings = {
|
|||||||
searchString?: string;
|
searchString?: string;
|
||||||
ancestorNoteId?: string | null;
|
ancestorNoteId?: string | null;
|
||||||
};
|
};
|
||||||
|
showLaunchBarSubtree: CommandData;
|
||||||
showOptions: CommandData & {
|
showOptions: CommandData & {
|
||||||
section: string;
|
section: string;
|
||||||
};
|
};
|
||||||
|
@ -6,6 +6,10 @@ import appContext from "../components/app_context.js";
|
|||||||
const TPL = `<div class="spacer"></div>`;
|
const TPL = `<div class="spacer"></div>`;
|
||||||
|
|
||||||
export default class SpacerWidget extends BasicWidget {
|
export default class SpacerWidget extends BasicWidget {
|
||||||
|
|
||||||
|
private baseSize: number;
|
||||||
|
private growthFactor: number;
|
||||||
|
|
||||||
constructor(baseSize = 0, growthFactor = 1000) {
|
constructor(baseSize = 0, growthFactor = 1000) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
@ -29,7 +33,9 @@ export default class SpacerWidget extends BasicWidget {
|
|||||||
{title: t("spacer.configure_launchbar"), command: "showLaunchBarSubtree", uiIcon: "bx bx-sidebar"}
|
{title: t("spacer.configure_launchbar"), command: "showLaunchBarSubtree", uiIcon: "bx bx-sidebar"}
|
||||||
],
|
],
|
||||||
selectMenuItemHandler: ({command}) => {
|
selectMenuItemHandler: ({command}) => {
|
||||||
appContext.triggerCommand(command);
|
if (command) {
|
||||||
|
appContext.triggerCommand(command);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user