client: Create empty toolbar ribbon

This commit is contained in:
Elian Doran 2024-11-09 09:18:59 +02:00
parent 918f425e1f
commit 48bc9204ac
No known key found for this signature in database
2 changed files with 29 additions and 0 deletions

View File

@ -82,6 +82,7 @@ import MovePaneButton from "../widgets/buttons/move_pane_button.js";
import UploadAttachmentsDialog from "../widgets/dialogs/upload_attachments.js";
import CopyImageReferenceButton from "../widgets/floating_buttons/copy_image_reference_button.js";
import ScrollPaddingWidget from "../widgets/scroll_padding.js";
import ClassicEditorToolbar from "../widgets/ribbon_widgets/classic_editor_toolbar.js";
export default class DesktopLayout {
constructor(customWidgets) {
@ -140,6 +141,7 @@ export default class DesktopLayout {
// the order of the widgets matter. Some of these want to "activate" themselves
// when visible. When this happens to multiple of them, the first one "wins".
// promoted attributes should always win.
.ribbon(new ClassicEditorToolbar())
.ribbon(new PromotedAttributesWidget())
.ribbon(new ScriptExecutorWidget())
.ribbon(new SearchDefinitionWidget())

View File

@ -0,0 +1,27 @@
import NoteContextAwareWidget from "../note_context_aware_widget.js";
const TPL = `\
<div class="classic-toolbar-widget">
Classic toolbar goes here.
</div>
`;
export default class ClassicEditorToolbar extends NoteContextAwareWidget {
get name() {
return "classicToolbar";
}
doRender() {
this.$widget = $(TPL);
this.contentSized();
}
getTitle(note) {
return {
show: true,
title: "Editor toolbar",
icon: "bx bx-edit-alt"
};
}
}