mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fixes
This commit is contained in:
parent
7528181ca2
commit
d68ea201a3
@ -146,6 +146,7 @@ export default class DesktopLayout {
|
|||||||
return new RootContainer()
|
return new RootContainer()
|
||||||
.setParent(appContext)
|
.setParent(appContext)
|
||||||
.child(new FlexContainer("column")
|
.child(new FlexContainer("column")
|
||||||
|
.id("launcher-pane")
|
||||||
.child(new GlobalMenuWidget())
|
.child(new GlobalMenuWidget())
|
||||||
.child(new ButtonWidget()
|
.child(new ButtonWidget()
|
||||||
.icon("bx-file-blank")
|
.icon("bx-file-blank")
|
||||||
@ -199,7 +200,9 @@ export default class DesktopLayout {
|
|||||||
.child(new ButtonWidget()
|
.child(new ButtonWidget()
|
||||||
.icon("bx-window-open bx-rotate-90")
|
.icon("bx-window-open bx-rotate-90")
|
||||||
.title("Create new pane")
|
.title("Create new pane")
|
||||||
.command("openNewPane"))
|
.titlePlacement("bottom")
|
||||||
|
.command("openNewPane")
|
||||||
|
)
|
||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
new CollapsibleSectionContainer()
|
new CollapsibleSectionContainer()
|
||||||
|
@ -3,7 +3,6 @@ import BasicWidget from "./basic_widget.js";
|
|||||||
const TPL = `
|
const TPL = `
|
||||||
<span class="button-widget"
|
<span class="button-widget"
|
||||||
data-toggle="tooltip"
|
data-toggle="tooltip"
|
||||||
data-placement="right"
|
|
||||||
title="">
|
title="">
|
||||||
<span class="bx"></span>
|
<span class="bx"></span>
|
||||||
</span>
|
</span>
|
||||||
@ -13,7 +12,9 @@ export default class ButtonWidget extends BasicWidget {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.settings = {};
|
this.settings = {
|
||||||
|
titlePlacement: 'right'
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
doRender() {
|
doRender() {
|
||||||
@ -31,7 +32,9 @@ export default class ButtonWidget extends BasicWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
refreshIcon() {
|
refreshIcon() {
|
||||||
this.$widget.attr("title", this.settings.title);
|
this.$widget
|
||||||
|
.attr("title", this.settings.title)
|
||||||
|
.attr("data-placement", this.settings.titlePlacement);
|
||||||
this.$widget.find("span.bx")
|
this.$widget.find("span.bx")
|
||||||
.removeClass()
|
.removeClass()
|
||||||
.addClass("bx")
|
.addClass("bx")
|
||||||
@ -52,6 +55,11 @@ export default class ButtonWidget extends BasicWidget {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
titlePlacement(placement) {
|
||||||
|
this.settings.titlePlacement = placement;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
command(command) {
|
command(command) {
|
||||||
this.settings.command = command;
|
this.settings.command = command;
|
||||||
return this;
|
return this;
|
||||||
|
@ -23,6 +23,8 @@ export default class PaneContainer extends FlexContainer {
|
|||||||
|
|
||||||
this.$widget.append($renderedWidget);
|
this.$widget.append($renderedWidget);
|
||||||
|
|
||||||
|
widget.handleEvent('initialRenderComplete');
|
||||||
|
|
||||||
widget.toggleExt(false);
|
widget.toggleExt(false);
|
||||||
|
|
||||||
this.widgets[noteContext.ntxId] = widget;
|
this.widgets[noteContext.ntxId] = widget;
|
||||||
@ -60,7 +62,7 @@ export default class PaneContainer extends FlexContainer {
|
|||||||
|
|
||||||
for (const ntxId in this.widgets) {
|
for (const ntxId in this.widgets) {
|
||||||
const noteContext = appContext.tabManager.getNoteContextById(ntxId);
|
const noteContext = appContext.tabManager.getNoteContextById(ntxId);
|
||||||
|
console.log(noteContext, activeNtxId);
|
||||||
const widget = this.widgets[ntxId];
|
const widget = this.widgets[ntxId];
|
||||||
widget.toggleExt(show && activeNtxId && [noteContext.ntxId, noteContext.mainNtxId].includes(activeNtxId));
|
widget.toggleExt(show && activeNtxId && [noteContext.ntxId, noteContext.mainNtxId].includes(activeNtxId));
|
||||||
}
|
}
|
||||||
@ -116,6 +118,8 @@ export default class PaneContainer extends FlexContainer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.refresh();
|
||||||
|
|
||||||
return Promise.all(promises);
|
return Promise.all(promises);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,8 @@ export default class NoteContextCachingWidget extends NoteContextAwareWidget {
|
|||||||
|
|
||||||
this.$widget.after($renderedWidget);
|
this.$widget.after($renderedWidget);
|
||||||
|
|
||||||
|
this.widgets[ntxId].handleEvent('initialRenderComplete');
|
||||||
|
|
||||||
keyboardActionsService.updateDisplayedShortcuts($renderedWidget);
|
keyboardActionsService.updateDisplayedShortcuts($renderedWidget);
|
||||||
|
|
||||||
await this.widgets[ntxId].handleEvent('setNoteContext', {noteContext});
|
await this.widgets[ntxId].handleEvent('setNoteContext', {noteContext});
|
||||||
|
@ -10,7 +10,12 @@ const TPL = `
|
|||||||
<div class="quick-search input-group input-group-sm">
|
<div class="quick-search input-group input-group-sm">
|
||||||
<style>
|
<style>
|
||||||
.quick-search {
|
.quick-search {
|
||||||
padding: 4px 10px 10px;
|
padding: 10px 10px 10px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.quick-search button, .quick-search input {
|
||||||
|
border: 0;
|
||||||
|
font-size: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-search .dropdown-menu {
|
.quick-search .dropdown-menu {
|
||||||
@ -23,13 +28,13 @@ const TPL = `
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<input type="text" class="form-control form-control-sm search-string" placeholder="Quick search">
|
<div class="input-group-prepend">
|
||||||
<div class="input-group-append">
|
|
||||||
<button class="btn btn-outline-secondary search-button" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<button class="btn btn-outline-secondary search-button" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
<span class="bx bx-search"></span>
|
<span class="bx bx-search"></span>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu dropdown-menu-right"></div>
|
<div class="dropdown-menu dropdown-menu-right"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<input type="text" class="form-control form-control-sm search-string" placeholder="Quick search">
|
||||||
</div>
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
|
@ -297,11 +297,14 @@ div.ui-tooltip {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn:not(.btn-primary) {
|
.btn:not(.btn-primary) {
|
||||||
border-color: var(--button-border-color);
|
|
||||||
background-color: var(--button-background-color);
|
background-color: var(--button-background-color);
|
||||||
color: var(--button-text-color);
|
color: var(--button-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn:not(.btn-primary):hover {
|
||||||
|
border-color: var(--button-border-color);
|
||||||
|
}
|
||||||
|
|
||||||
.btn.active:not(.btn-primary) {
|
.btn.active:not(.btn-primary) {
|
||||||
background-color: var(--button-disabled-background-color) !important;
|
background-color: var(--button-disabled-background-color) !important;
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
@ -930,13 +933,17 @@ ul.fancytree-container li {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.button-widget .bx {
|
.button-widget .bx {
|
||||||
font-size: 150%;
|
font-size: 120%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#launcher-pane .button-widget .bx {
|
||||||
|
font-size: 150%;
|
||||||
|
}
|
||||||
|
|
||||||
.button-widget:hover .bx {
|
.button-widget:hover .bx {
|
||||||
background-color: var(--hover-item-background-color);
|
background-color: var(--hover-item-background-color);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user