launchbar WIP

This commit is contained in:
zadam
2022-08-05 16:44:26 +02:00
parent 7565458332
commit 42cade17cb
24 changed files with 208 additions and 53 deletions

View File

@@ -44,7 +44,7 @@ const DROPDOWN_TPL = `
export default class BookmarkFolderWidget extends RightDropdownButtonWidget {
constructor(note) {
super(note.getIcon(), note.title, DROPDOWN_TPL);
super(note.title, note.getIcon(), DROPDOWN_TPL);
this.note = note;
}

View File

@@ -28,8 +28,8 @@ const DROPDOWN_TPL = `
</div>`;
export default class CalendarWidget extends RightDropdownButtonWidget {
constructor() {
super("bx-calendar", "Calendar", DROPDOWN_TPL);
constructor(title, icon) {
super(title, icon, DROPDOWN_TPL);
}
doRender() {

View File

@@ -2,6 +2,8 @@ import ButtonWidget from "./button_widget.js";
import appContext from "../../services/app_context.js";
import froca from "../../services/froca.js";
// FIXME: this widget might not be useful anymore
export default class OpenNoteButtonWidget extends ButtonWidget {
targetNote(noteId) {
froca.getNote(noteId).then(note => {

View File

@@ -18,7 +18,7 @@ const TPL = `
`;
export default class RightDropdownButtonWidget extends BasicWidget {
constructor(iconClass, title, dropdownTpl) {
constructor(title, iconClass, dropdownTpl) {
super();
this.iconClass = iconClass;