mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-01 04:12:58 +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;
|
||||
ancestorNoteId?: string | null;
|
||||
};
|
||||
showLaunchBarSubtree: CommandData;
|
||||
showOptions: CommandData & {
|
||||
section: string;
|
||||
};
|
||||
|
@ -6,6 +6,10 @@ import appContext from "../components/app_context.js";
|
||||
const TPL = `<div class="spacer"></div>`;
|
||||
|
||||
export default class SpacerWidget extends BasicWidget {
|
||||
|
||||
private baseSize: number;
|
||||
private growthFactor: number;
|
||||
|
||||
constructor(baseSize = 0, growthFactor = 1000) {
|
||||
super();
|
||||
|
||||
@ -29,7 +33,9 @@ export default class SpacerWidget extends BasicWidget {
|
||||
{title: t("spacer.configure_launchbar"), command: "showLaunchBarSubtree", uiIcon: "bx bx-sidebar"}
|
||||
],
|
||||
selectMenuItemHandler: ({command}) => {
|
||||
appContext.triggerCommand(command);
|
||||
if (command) {
|
||||
appContext.triggerCommand(command);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user