mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
note list should show the prefix, #4362
This commit is contained in:
parent
48e98b2ac3
commit
eb0a68d0ab
@ -3,6 +3,7 @@ import contentRenderer from "./content_renderer.js";
|
||||
import froca from "./froca.js";
|
||||
import attributeRenderer from "./attribute_renderer.js";
|
||||
import libraryLoader from "./library_loader.js";
|
||||
import treeService from "./tree.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="note-list">
|
||||
@ -294,7 +295,7 @@ class NoteListRenderer {
|
||||
.append($expander)
|
||||
.append($('<span class="note-icon">').addClass(note.getIcon()))
|
||||
.append(this.viewType === 'grid'
|
||||
? $('<span class="note-book-title">').text(note.title)
|
||||
? $('<span class="note-book-title">').text(await treeService.getNoteTitle(note.noteId, this.parentNote.noteId))
|
||||
: (await linkService.createLink(notePath, {showTooltip: false, showNotePath: this.showNotePath}))
|
||||
.addClass("note-book-title")
|
||||
)
|
||||
|
@ -217,7 +217,7 @@ async function getNoteTitle(noteId, parentNoteId = null) {
|
||||
if (branchId) {
|
||||
const branch = froca.getBranch(branchId);
|
||||
|
||||
if (branch && branch.prefix) {
|
||||
if (branch?.prefix) {
|
||||
title = `${branch.prefix} - ${title}`;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user