mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
note map refactoring
This commit is contained in:
@@ -20,7 +20,7 @@ import ReadOnlyTextTypeWidget from "./type_widgets/read_only_text.js";
|
||||
import ReadOnlyCodeTypeWidget from "./type_widgets/read_only_code.js";
|
||||
import NoneTypeWidget from "./type_widgets/none.js";
|
||||
import attributeService from "../services/attributes.js";
|
||||
import GlobalLinkMapTypeWidget from "./type_widgets/global_link_map.js";
|
||||
import NoteMapTypeWidget from "./type_widgets/note_map.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="note-detail">
|
||||
@@ -47,7 +47,7 @@ const typeWidgetClasses = {
|
||||
'relation-map': RelationMapTypeWidget,
|
||||
'protected-session': ProtectedSessionTypeWidget,
|
||||
'book': BookTypeWidget,
|
||||
'globallinkmap': GlobalLinkMapTypeWidget
|
||||
'note-map': NoteMapTypeWidget
|
||||
};
|
||||
|
||||
export default class NoteDetailWidget extends NoteContextAwareWidget {
|
||||
@@ -173,10 +173,6 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {
|
||||
type = 'editable-code';
|
||||
}
|
||||
|
||||
if (type === 'special') {
|
||||
type = note.noteId;
|
||||
}
|
||||
|
||||
if (note.isProtected && !protectedSessionHolder.isProtectedSessionAvailable()) {
|
||||
type = 'protected-session';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user