mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	refactored TabContext => NoteContext
This commit is contained in:
		@@ -2,7 +2,7 @@ import BasicWidget from "./basic_widget.js";
 | 
			
		||||
import appContext from "../services/app_context.js";
 | 
			
		||||
 | 
			
		||||
export default class NoteContextAwareWidget extends BasicWidget {
 | 
			
		||||
    isTab(ntxId) {
 | 
			
		||||
    isNoteContext(ntxId) {
 | 
			
		||||
        if (Array.isArray(ntxId)) {
 | 
			
		||||
            return this.noteContext && ntxId.includes(this.noteContext.ntxId);
 | 
			
		||||
        }
 | 
			
		||||
@@ -11,10 +11,6 @@ export default class NoteContextAwareWidget extends BasicWidget {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    isTabOrParent(ntxId) {
 | 
			
		||||
        return this.noteContext && (this.noteContext.ntxId === ntxId || this.noteContext.mainNtxId === ntxId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    isNote(noteId) {
 | 
			
		||||
        return this.noteId === noteId;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user