From c1016c8caa2f000f193afe76cbafae90732c6d5a Mon Sep 17 00:00:00 2001 From: frostime Date: Sat, 8 Jun 2024 16:52:32 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20misc:=20=E6=94=B9=E8=BF=9B=20res?= =?UTF-8?q?ervation=20dock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ package.json | 2 +- plugin.json | 2 +- src/components/list-item.svelte | 25 ++++++++++++------------- src/func/reserve/index.ts | 29 ----------------------------- 5 files changed, 20 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c67d990..a219345 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [2024-06-08] v1.6.6 + +- ✨ feat: 为 Reservation Tree Item 添加 popover icon +- 🐛 fix: 修复「查看预约块列表的弹窗」呈现位置异常的 bug + + ## [2024-05-15] v1.6.4 - 增加设置,允许插件覆盖 Alt+5 快捷键,启用后只打开默认笔记本的日记 diff --git a/package.json b/package.json index 542893f..170462d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "siyuan-dailynote-today", - "version": "1.6.5", + "version": "1.6.6", "description": "", "main": ".src/index.js", "keywords": [], diff --git a/plugin.json b/plugin.json index 7fa066c..dfeb914 100644 --- a/plugin.json +++ b/plugin.json @@ -6,7 +6,7 @@ "en_US": "Daily Note Today" }, "url": "https://github.com/frostime/siyuan-dailynote-today", - "version": "1.6.5", + "version": "1.6.6", "minAppVersion": "3.0.0", "description": { "zh_CN": "自动创建日记 + 快速打开日记 + 日程 TODO 管理 + 移动块功能", diff --git a/src/components/list-item.svelte b/src/components/list-item.svelte index 1598a82..c384626 100644 --- a/src/components/list-item.svelte +++ b/src/components/list-item.svelte @@ -59,26 +59,22 @@ const atRight = rect.right > width / 2; // list-item 是否在页面右侧 + const panelWidth = 750; + let x = 10; + if (atRight) { + x = width - panelWidth - 10; + } + plugin.addFloatLayer({ ids: blocks.map((block) => block.id), - x: 0, - y: 0 + x: x, + y: rect.bottom + 10 }); - //@ts-ignore const blockPanels: any[] = window.siyuan.blockPanels; const panel = blockPanels[blockPanels.length - 1]; const ele: HTMLElement = panel?.element; - - if (atRight) { - //将弹出框移动到 list-item 的下方 - ele.style.top = `${rect.bottom + 10}px`; // 将 y 坐标设为 list-item 下方 - ele.style.left = ''; - ele.style.right = `${width - rect.right}px`; - } else { - ele.style.top = `${rect.bottom + 10}px`; - } - + ele.style.width = `${panelWidth}px`; } @@ -142,6 +138,9 @@ > + + + {block.content}