mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 10:22:29 +08:00
client: refactor
This commit is contained in:
parent
4325c90f09
commit
f2067d0b12
@ -272,8 +272,16 @@ async function getNoteTitleWithPathAsSuffix(notePath) {
|
||||
const $titleWithPath = $('<span class="note-title-with-path">')
|
||||
.append($('<span class="note-title">').text(title));
|
||||
|
||||
|
||||
$titleWithPath.append(formatPath(path));
|
||||
|
||||
return $titleWithPath;
|
||||
}
|
||||
|
||||
function formatPath(path) {
|
||||
const $notePath = $('<span class="note-path">');
|
||||
|
||||
if (path.length > 0) {
|
||||
const $notePath = $('<span class="note-path">');
|
||||
|
||||
$notePath.append($(`<span class="path-bracket"> (</span>)`));
|
||||
|
||||
@ -286,17 +294,17 @@ async function getNoteTitleWithPathAsSuffix(notePath) {
|
||||
}
|
||||
|
||||
$notePath.append($(`<span class="path-bracket">)</span>)`));
|
||||
|
||||
$titleWithPath.append($notePath);
|
||||
}
|
||||
|
||||
return $titleWithPath;
|
||||
|
||||
return $notePath;
|
||||
}
|
||||
|
||||
function isNotePathInHiddenSubtree(notePath) {
|
||||
return notePath?.includes("root/_hidden");
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
resolveNotePath,
|
||||
resolveNotePathToSegments,
|
||||
|
Loading…
x
Reference in New Issue
Block a user