mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
21 lines
471 B
JavaScript
21 lines
471 B
JavaScript
"use strict";
|
|
|
|
const noteCacheService = require('../note_cache/note_cache_service');
|
|
|
|
class SearchResult {
|
|
constructor(notePathArray) {
|
|
this.notePathArray = notePathArray;
|
|
this.notePathTitle = noteCacheService.getNoteTitleForPath(notePathArray);
|
|
}
|
|
|
|
get notePath() {
|
|
return this.notePathArray.join('/');
|
|
}
|
|
|
|
get noteId() {
|
|
return this.notePathArray[this.notePathArray.length - 1];
|
|
}
|
|
}
|
|
|
|
module.exports = SearchResult;
|