Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/15825

Vanessae37ab0db78af
diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.ts
index 4459c92ac6..a2c8498a7b 100644
--- a/app/src/layout/dock/Files.ts
+++ b/app/src/layout/dock/Files.ts
@@ -173,18 +173,6 @@ export class Files extends Model {
event.stopPropagation();
event.preventDefault();
break;
- } else if (type === "remove") {
- confirmDialog(window.siyuan.languages.deleteOpConfirm,
- `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(target.parentElement.querySelector(".b3-list-item__text").textContent)}</b>?`, () => {
- fetchPost("/api/notebook/removeNotebook", {
- notebook: target.getAttribute("data-url"),
- callback: Constants.CB_MOUNT_REMOVE
- });
- }, undefined, true);
- window.siyuan.menus.menu.remove();
- event.stopPropagation();
- event.preventDefault();
- break;
} else if (type === "open") {
fetchPost("/api/notebook/openNotebook", {
notebook: target.getAttribute("data-url")
@@ -808,14 +796,14 @@ export class Files extends Model {
private genNotebook(item: INotebook) {
const emojiHTML = `<span class="b3-list-item__icon b3-tooltips b3-tooltips__e" aria-label="${window.siyuan.languages.changeIcon}">${unicode2Emoji(item.icon || window.siyuan.storage[Constants.LOCAL_IMAGES].note)}</span>`;
if (item.closed) {
- return `<li data-type="open" data-url="${item.id}" class="b3-list-item b3-list-item--hide-action">
+ return `<li data-url="${item.id}" class="b3-list-item b3-list-item--hide-action">
<span class="b3-list-item__toggle fn__hidden">
<svg class="b3-list-item__arrow"><use xlink:href="#iconRight"></use></svg>
</span>
${emojiHTML}
- <span class="b3-list-item__text">${escapeHtml(item.name)}</span>
- <span data-type="remove" data-url="${item.id}" class="b3-list-item__action b3-tooltips b3-tooltips__w${(window.siyuan.config.readonly) ? " fn__none" : ""}" aria-label="${window.siyuan.languages.delete}">
- <svg><use xlink:href="#iconTrashcan"></use></svg>
+ <span class="b3-list-item__text" style="cursor: default;">${escapeHtml(item.name)}</span>
+ <span data-type="open" data-url="${item.id}" class="b3-list-item__action b3-tooltips b3-tooltips__w${(window.siyuan.config.readonly) ? " fn__none" : ""}" aria-label="${window.siyuan.languages.openBy}">
+ <svg><use xlink:href="#iconOpen"></use></svg>
</span>
</li>`;
} else {
diff --git a/app/src/mobile/dock/MobileFiles.ts b/app/src/mobile/dock/MobileFiles.ts
index 5bc672843c..0dc7a26341 100644
--- a/app/src/mobile/dock/MobileFiles.ts
+++ b/app/src/mobile/dock/MobileFiles.ts
@@ -176,17 +176,6 @@ export class MobileFiles extends Model {
event.stopPropagation();
event.preventDefault();
break;
- } else if (type === "remove") {
- confirmDialog(window.siyuan.languages.deleteOpConfirm,
- `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(target.parentElement.querySelector(".b3-list-item__text").textContent)}</b>?`, () => {
- fetchPost("/api/notebook/removeNotebook", {
- notebook: target.getAttribute("data-url"),
- callback: Constants.CB_MOUNT_REMOVE
- });
- }, undefined, true);
- event.stopPropagation();
- event.preventDefault();
- break;
} else if (type === "open") {
fetchPost("/api/notebook/openNotebook", {
notebook: target.getAttribute("data-url")
@@ -309,14 +298,14 @@ export class MobileFiles extends Model {
private genNotebook(item: INotebook) {
const emojiHTML = `<span class="b3-list-item__icon b3-tooltips b3-tooltips__e" aria-label="${window.siyuan.languages.changeIcon}">${unicode2Emoji(item.icon || window.siyuan.storage[Constants.LOCAL_IMAGES].note)}</span>`;
if (item.closed) {
- return `<li data-type="open" data-url="${item.id}" class="b3-list-item">
+ return `<li data-url="${item.id}" class="b3-list-item">
<span class="b3-list-item__toggle fn__hidden">
<svg class="b3-list-item__arrow"><use xlink:href="#iconRight"></use></svg>
</span>
${emojiHTML}
<span class="b3-list-item__text">${escapeHtml(item.name)}</span>
- <span data-type="remove" data-url="${item.id}" class="b3-list-item__action${(window.siyuan.config.readonly) ? " fn__none" : ""}">
- <svg><use xlink:href="#iconTrashcan"></use></svg>
+ <span data-type="open" data-url="${item.id}" class="b3-list-item__action${(window.siyuan.config.readonly) ? " fn__none" : ""}">
+ <svg><use xlink:href="#iconOpen"></use></svg>
</span>
</li>`;
} else {