From a2ea89a953b3d0f538cddbaeb56c46ac7234848c Mon Sep 17 00:00:00 2001 From: Tron Date: Wed, 6 Nov 2024 17:28:51 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20v2.3.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1.js | 85 ------------------------------------------------- CHANGELOG.md | 3 ++ README_zh_CN.md | 6 +++- theme.json | 2 +- 4 files changed, 9 insertions(+), 87 deletions(-) delete mode 100644 1.js diff --git a/1.js b/1.js deleted file mode 100644 index c2650ee..0000000 --- a/1.js +++ /dev/null @@ -1,85 +0,0 @@ - -(async () => { - - window.addEventListener('keydown', function (event) { - // 检查是否按下了 Alt 键和数字 5 键 - if (event.altKey && event.key === '5') { - // 模拟按钮点击 - console.log('Alt + 5 被按下了!'); - dailynoteAddDatabase(); - } - }); - - async function dailynoteAddDatabase() { - //设置日记自动存放的数据库块id - dbBlockId = '20240911002857-lgav146'; - // 获取当前选择笔记本 - boxid = window.siyuan.storage["local-dailynoteid"] - - // 调用/api/filetree/createDailyNote获得日记id - const create_dailynote_result = await fetchSyncPost('/api/filetree/createDailyNote', { notebook: boxid, app: siyuan.ws.app.appId }) - const docID = create_dailynote_result.data.id; - - // 添加日记到数据库中 - const db = await getDataBySql(`SELECT * FROM blocks where type ='av' and id='${dbBlockId}'`); - if (db.length === 0) error("未找到数据库文档块,请检查数据库文档块id是否正确"); - const avId = db.map(av => getDataAvIdFromHtml(av.markdown))[0]; - - - // 组装文档数据参数 - const srcs = { - "id": docID, - "isDetached": false, - }; - const input = { - "avID": avId, - "blockID": dbBlockId, - 'srcs': srcs - - } - const result = await fetchSyncPost('/api/av/addAttributeViewBlocks', input) - //console.log(result); - - - - - function getDataAvIdFromHtml(htmlString) { - // 使用正则表达式匹配data-av-id的值 - const match = htmlString.match(/data-av-id="([^"]+)"/); - if (match && match[1]) { - return match[1]; // 返回匹配的值 - } - return ""; // 如果没有找到匹配项,则返回空 - } - async function getDataBySql(sql) { - const result = await fetchSyncPost('/api/query/sql', { "stmt": sql }); - if (result.code !== 0) { - console.error("查询数据库出错", result.msg); - return []; - } - return result.data; - } - async function fetchSyncPost(url, data, returnType = 'json') { - const init = { - method: "POST", - }; - if (data) { - if (data instanceof FormData) { - init.body = data; - } else { - init.body = JSON.stringify(data); - } - } - try { - const res = await fetch(url, init); - const res2 = returnType === 'json' ? await res.json() : await res.text(); - return res2; - } catch (e) { - console.log(e); - return returnType === 'json' ? { code: e.code || 1, msg: e.message || "", data: null } : ""; - } - } - - } - -})(); diff --git a/CHANGELOG.md b/CHANGELOG.md index 39ae6bc..cdca075 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v2.3.6 / 2024.11.04 +- 💄把默认的引述块样式改为蓝色了,考虑到自己不喜欢灰色的引述块还是默认蓝色吧,这样还省得添加块背景色 + ## v2.3.5 / 2024.11.03 - 💄Tsundoku 引述块大大增强 * 引述块添加背景色,嵌套引述块的border颜色为对应颜色 diff --git a/README_zh_CN.md b/README_zh_CN.md index 2b63b4b..f0bf9a6 100644 --- a/README_zh_CN.md +++ b/README_zh_CN.md @@ -29,9 +29,13 @@ **简介**:[思源笔记(Siyuan)](https://github.com/siyuan-note/siyuan)是一款本地优先的个人知识管理系统,支持完全离线使用,同时也支持端到端加密同步。融合块、大纲和双向链接,构建你永恒的数字花园。本主题为个人原创主题,专为思源笔记设计。 + ## 🚀最近更新 -v2.3.4 / 2024.11.03 +v2.3.6 / 2024.11.04 +- 💄把默认的引述块样式改为蓝色了 + +v2.3.5 / 2024.11.03 - 💄Tsundoku 引述块大大增强 * 引述块添加背景色,嵌套引述块的border颜色为对应颜色 * 引述块添加卡片背景色,嵌套引述块的border颜色可以进一步修改 diff --git a/theme.json b/theme.json index 683e5ed..561df56 100644 --- a/theme.json +++ b/theme.json @@ -2,7 +2,7 @@ "name": "Tsundoku", "author": "Achuan-2", "url": "https://github.com/Achuan-2/siyuan-themes-tsundoku", - "version": "2.3.5", + "version": "2.3.6", "displayName": { "default": "Tsundoku", "zh_CN": "積読"