mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-01 20:52:27 +08:00
client: mark the links that should use the new style
This commit is contained in:
parent
f4d2c5a2d2
commit
0f2fcebe40
@ -119,15 +119,16 @@ export default class AttachmentDetailWidget extends BasicWidget {
|
|||||||
this.$wrapper.addClass(this.isFullDetail ? "full-detail" : "list-view");
|
this.$wrapper.addClass(this.isFullDetail ? "full-detail" : "list-view");
|
||||||
|
|
||||||
if (!this.isFullDetail) {
|
if (!this.isFullDetail) {
|
||||||
this.$wrapper.find(".attachment-title").append(
|
const $link = await linkService.createLink(this.attachment.ownerId, {
|
||||||
await linkService.createLink(this.attachment.ownerId, {
|
|
||||||
title: this.attachment.title,
|
title: this.attachment.title,
|
||||||
viewScope: {
|
viewScope: {
|
||||||
viewMode: "attachments",
|
viewMode: "attachments",
|
||||||
attachmentId: this.attachment.attachmentId
|
attachmentId: this.attachment.attachmentId
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
);
|
$link.addClass("use-tn-links");
|
||||||
|
|
||||||
|
this.$wrapper.find(".attachment-title").append($link);
|
||||||
} else {
|
} else {
|
||||||
this.$wrapper.find(".attachment-title").text(this.attachment.title);
|
this.$wrapper.find(".attachment-title").text(this.attachment.title);
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ const TPL = `
|
|||||||
<div class="revision-title-buttons"></div>
|
<div class="revision-title-buttons"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="revision-content"></div>
|
<div class="revision-content use-tn-links"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer py-0">
|
<div class="modal-footer py-0">
|
||||||
|
@ -48,6 +48,7 @@ export default class AttachmentListTypeWidget extends TypeWidget {
|
|||||||
utils.initHelpButtons($helpButton);
|
utils.initHelpButtons($helpButton);
|
||||||
|
|
||||||
const noteLink = await linkService.createLink(this.noteId); // do separately to avoid race condition between empty() and .append()
|
const noteLink = await linkService.createLink(this.noteId); // do separately to avoid race condition between empty() and .append()
|
||||||
|
noteLink.addClass("use-tn-links");
|
||||||
|
|
||||||
this.$linksWrapper.empty().append(
|
this.$linksWrapper.empty().append(
|
||||||
$("<div>").append(t("attachment_list.owning_note"), noteLink),
|
$("<div>").append(t("attachment_list.owning_note"), noteLink),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user