mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix issues
This commit is contained in:
parent
b2a3e1cc04
commit
5e3c85f891
@ -31,6 +31,7 @@ export default class Layout {
|
||||
return new FlexContainer('column')
|
||||
.setParent(appContext)
|
||||
.id('root-widget')
|
||||
.css('height', '100vh')
|
||||
.child(new FlexContainer('row')
|
||||
.child(new GlobalMenuWidget())
|
||||
.child(new TabRowWidget())
|
||||
|
@ -27,25 +27,25 @@ export default class TabAwareWidget extends BasicWidget {
|
||||
return this.tabContext && this.tabContext.notePath;
|
||||
}
|
||||
|
||||
tabNoteSwitchedEvent({tabId, notePath}) {
|
||||
async tabNoteSwitchedEvent({tabId, notePath}) {
|
||||
// if notePath does not match then the tabContext has been switched to another note in the mean time
|
||||
if (this.isTab(tabId) && this.notePath === notePath) {
|
||||
this.noteSwitched();
|
||||
await this.noteSwitched();
|
||||
}
|
||||
}
|
||||
|
||||
noteTypeMimeChangedEvent({noteId}) {
|
||||
async noteTypeMimeChangedEvent({noteId}) {
|
||||
if (this.noteId === noteId) {
|
||||
this.refresh();
|
||||
await this.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
noteSwitched() {
|
||||
this.refresh();
|
||||
async noteSwitched() {
|
||||
await this.refresh();
|
||||
}
|
||||
|
||||
activeTabChanged() {
|
||||
this.refresh();
|
||||
async activeTabChanged() {
|
||||
await this.refresh();
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
@ -70,30 +70,30 @@ export default class TabAwareWidget extends BasicWidget {
|
||||
}
|
||||
}
|
||||
|
||||
refreshWithNote(note, notePath) {}
|
||||
async refreshWithNote(note, notePath) {}
|
||||
|
||||
activeTabChangedEvent() {
|
||||
async activeTabChangedEvent() {
|
||||
this.tabContext = appContext.tabManager.getActiveTabContext();
|
||||
|
||||
this.activeTabChanged();
|
||||
await this.activeTabChanged();
|
||||
}
|
||||
|
||||
// when note is both switched and activated, this should not produce double refresh
|
||||
tabNoteSwitchedAndActivatedEvent() {
|
||||
async tabNoteSwitchedAndActivatedEvent() {
|
||||
this.tabContext = appContext.tabManager.getActiveTabContext();
|
||||
|
||||
this.refresh();
|
||||
await this.refresh();
|
||||
}
|
||||
|
||||
treeCacheReloadedEvent() {
|
||||
this.refresh();
|
||||
async treeCacheReloadedEvent() {
|
||||
await this.refresh();
|
||||
}
|
||||
|
||||
lazyLoadedEvent() {
|
||||
async lazyLoadedEvent() {
|
||||
if (!this.tabContext) { // has not been loaded yet
|
||||
this.tabContext = appContext.tabManager.getActiveTabContext();
|
||||
}
|
||||
|
||||
this.refresh();
|
||||
await this.refresh();
|
||||
}
|
||||
}
|
@ -32,8 +32,6 @@ export default class RenderTypeWidget extends TypeWidget {
|
||||
|
||||
const renderNotesFound = await renderService.render(note, this.$noteDetailRenderContent);
|
||||
|
||||
console.trace("render");
|
||||
|
||||
if (!renderNotesFound) {
|
||||
this.$noteDetailRenderHelp.show();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user