mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
This commit is contained in:
parent
f36dca344a
commit
adf424f7c4
3 changed files with 25 additions and 1 deletions
|
|
@ -42,6 +42,8 @@ export class Inbox extends Model {
|
|||
<div class="fn__flex fn__none">
|
||||
<span data-type="back" class="block__icon b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.back}"><svg><use xlink:href='#iconLeft'></use></svg></span>
|
||||
<span class="fn__space"></span>
|
||||
<span data-type="refreshDetails" class="block__icon b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.refresh}"><svg><use xlink:href='#iconRefresh'></use></svg></span>
|
||||
<span class="fn__space"></span>
|
||||
<span data-type="move" data-menu="true" class="block__icon b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.move}"><svg><use xlink:href='#iconMove'></use></svg></span>
|
||||
<span class="fn__space"></span>
|
||||
<span data-type="delete" class="block__icon b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.remove}"><svg><use xlink:href='#iconTrashcan'></use></svg></span>
|
||||
|
|
@ -108,6 +110,20 @@ export class Inbox extends Model {
|
|||
this.currentPage = 1;
|
||||
this.update();
|
||||
break;
|
||||
case "refreshDetails":
|
||||
fetchPost("/api/inbox/getShorthand", {
|
||||
id: detailsElement.getAttribute("data-id")
|
||||
}, (response) => {
|
||||
detailsElement.innerHTML = `<h3 class="fn__ellipsis">${response.data.shorthandTitle}</h3>
|
||||
<div class="fn__hr"></div>
|
||||
<a href="${response.data.shorthandURL}" target="_blank">${response.data.shorthandURL}</a>
|
||||
<div class="fn__hr"></div>
|
||||
<div class="b3-typography b3-typography--default">
|
||||
${(Lute.New()).MarkdownStr("", response.data.shorthandContent)}
|
||||
</div>`;
|
||||
detailsElement.scrollTop = 0;
|
||||
})
|
||||
break;
|
||||
case "delete":
|
||||
confirmDialog(window.siyuan.languages.deleteOpConfirm, window.siyuan.languages.confirmDelete + "?", () => {
|
||||
this.remove(detailsElement.getAttribute("data-id"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue