mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
reimplement note source to open in a new tab
This commit is contained in:
@@ -187,23 +187,17 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {
|
||||
|
||||
let type = note.type;
|
||||
|
||||
if (type === 'text' && await this.noteContext.isReadOnly()) {
|
||||
type = 'readOnlyText';
|
||||
}
|
||||
|
||||
if ((type === 'code' || type === 'mermaid') && await this.noteContext.isReadOnly()) {
|
||||
if (type === 'text' && this.noteContext.viewScope.viewMode === 'source') {
|
||||
type = 'readOnlyCode';
|
||||
}
|
||||
|
||||
if (type === 'text') {
|
||||
} else if (type === 'text' && await this.noteContext.isReadOnly()) {
|
||||
type = 'readOnlyText';
|
||||
} else if ((type === 'code' || type === 'mermaid') && await this.noteContext.isReadOnly()) {
|
||||
type = 'readOnlyCode';
|
||||
} else if (type === 'text') {
|
||||
type = 'editableText';
|
||||
}
|
||||
|
||||
if (type === 'code' || type === 'mermaid') {
|
||||
} else if (type === 'code' || type === 'mermaid') {
|
||||
type = 'editableCode';
|
||||
}
|
||||
|
||||
if (type === 'launcher') {
|
||||
} else if (type === 'launcher') {
|
||||
type = 'doc';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user