mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 00:05:50 +01:00
keyboard shortcuts for ribbon tabs
This commit is contained in:
@@ -46,6 +46,10 @@ export default class BasicPropertiesWidget extends NoteContextAwareWidget {
|
||||
this.child(this.noteTypeWidget, this.protectedNoteSwitchWidget, this.editabilitySelectWidget);
|
||||
}
|
||||
|
||||
get name() {
|
||||
return "basicProperties";
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
return this.note && (this.note.type === 'text' || this.note.type === 'code');
|
||||
}
|
||||
|
||||
@@ -42,6 +42,10 @@ const TPL = `
|
||||
</div>
|
||||
`;
|
||||
export default class BookPropertiesWidget extends NoteContextAwareWidget {
|
||||
get name() {
|
||||
return "bookProperties";
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
return this.note && this.note.type === 'book';
|
||||
}
|
||||
|
||||
@@ -55,6 +55,10 @@ const TPL = `
|
||||
</div>`;
|
||||
|
||||
export default class FilePropertiesWidget extends NoteContextAwareWidget {
|
||||
get name() {
|
||||
return "fileProperties";
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
return this.note && this.note.type === 'file';
|
||||
}
|
||||
|
||||
@@ -37,6 +37,10 @@ const TPL = `
|
||||
</div>`;
|
||||
|
||||
export default class ImagePropertiesWidget extends NoteContextAwareWidget {
|
||||
get name() {
|
||||
return "imageProperties";
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
return this.note && this.note.type === 'image';
|
||||
}
|
||||
|
||||
@@ -21,6 +21,10 @@ const TPL = `
|
||||
</div>`;
|
||||
|
||||
export default class InheritedAttributesWidget extends NoteContextAwareWidget {
|
||||
get name() {
|
||||
return "inheritedAttributes";
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
|
||||
@@ -38,6 +38,10 @@ const TPL = `
|
||||
</div>`;
|
||||
|
||||
export default class LinkMapWidget extends NoteContextAwareWidget {
|
||||
get name() {
|
||||
return "linkMap";
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
return this.note;
|
||||
}
|
||||
|
||||
@@ -62,6 +62,10 @@ const TPL = `
|
||||
</div>
|
||||
`;
|
||||
export default class NoteInfoWidget extends NoteContextAwareWidget {
|
||||
get name() {
|
||||
return "noteInfo";
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
return this.note;
|
||||
}
|
||||
|
||||
@@ -36,6 +36,10 @@ const TPL = `
|
||||
</div>`;
|
||||
|
||||
export default class NotePathsWidget extends NoteContextAwareWidget {
|
||||
get name() {
|
||||
return "notePaths";
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
return this.note;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@ const TPL = `
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
/**
|
||||
* TODO: figure out better name or conceptualize better.
|
||||
*/
|
||||
export default class NotePropertiesWidget extends NoteContextAwareWidget {
|
||||
isEnabled() {
|
||||
return this.note && !!this.note.getLabelValue('pageUrl');
|
||||
|
||||
@@ -22,6 +22,10 @@ const TPL = `
|
||||
`;
|
||||
|
||||
export default class OwnedAttributeListWidget extends NoteContextAwareWidget {
|
||||
get name() {
|
||||
return "ownedAttributes";
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
|
||||
@@ -35,6 +35,10 @@ const TPL = `
|
||||
`;
|
||||
|
||||
export default class PromotedAttributesWidget extends NoteContextAwareWidget {
|
||||
get name() {
|
||||
return "promotedAttributes";
|
||||
}
|
||||
|
||||
doRender() {
|
||||
this.$widget = $(TPL);
|
||||
this.contentSized();
|
||||
|
||||
@@ -23,7 +23,6 @@ import Limit from "../search_options/limit.js";
|
||||
import DeleteNoteRevisionsSearchAction from "../search_actions/delete_note_revisions.js";
|
||||
import Debug from "../search_options/debug.js";
|
||||
import appContext from "../../services/app_context.js";
|
||||
import toast from "../../services/toast.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="search-definition-widget">
|
||||
|
||||
@@ -31,6 +31,10 @@ const TPL = `
|
||||
`;
|
||||
|
||||
export default class SimilarNotesWidget extends NoteContextAwareWidget {
|
||||
get name() {
|
||||
return "similarNotes";
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
return super.isEnabled()
|
||||
&& this.note.type !== 'search'
|
||||
|
||||
Reference in New Issue
Block a user