From 10f4a8b8fffc8dea4113ff1023fed22c38d1c9e0 Mon Sep 17 00:00:00 2001 From: viviSoltus Date: Sat, 3 Dec 2022 16:39:31 +0800 Subject: [PATCH] no message --- script/CPUI.min.js | 1 - script/config.js | 86 ---------------- script/fun.min.js | 1 - script/kernel.js | 47 +++++++++ script/module/CPM.js | 152 ----------------------------- script/module/ChangeFontSize.js | 90 ----------------- script/module/CustomBoot.min.js | 1 - script/module/DTL.js | 135 ------------------------- script/module/SSS.min.js | 1 - script/module/XML/CPDialog.js | 13 --- script/module/XML/ConfirmDialog.js | 4 - script/module/dev.js | 63 ------------ script/utils/api.min.js | 1 - src/S2.svg | 1 - src/loading.gif | Bin 13999 -> 0 bytes src/pin.svg | 1 - theme.js | 2 +- 17 files changed, 48 insertions(+), 551 deletions(-) delete mode 100644 script/CPUI.min.js delete mode 100644 script/config.js delete mode 100644 script/fun.min.js create mode 100644 script/kernel.js delete mode 100644 script/module/CPM.js delete mode 100644 script/module/ChangeFontSize.js delete mode 100644 script/module/CustomBoot.min.js delete mode 100644 script/module/DTL.js delete mode 100644 script/module/SSS.min.js delete mode 100644 script/module/XML/CPDialog.js delete mode 100644 script/module/XML/ConfirmDialog.js delete mode 100644 script/module/dev.js delete mode 100644 script/utils/api.min.js delete mode 100644 src/S2.svg delete mode 100644 src/loading.gif delete mode 100644 src/pin.svg diff --git a/script/CPUI.min.js b/script/CPUI.min.js deleted file mode 100644 index a39464a..0000000 --- a/script/CPUI.min.js +++ /dev/null @@ -1 +0,0 @@ -import{ConfirmDialog,CPDialog}from"./module/CPM.js";import{ConfirmDialog1}from"./module/XML/ConfirmDialog.js";import*as API from"./utils/api.min.js";import*as config from"./config.js";if(API.isPhone()){const e=document.getElementById("sidebar");if(null==document.getElementById("Sofill-CDUI-1")){const t=document.createElement("svg");t.id="Sofill-CDUI-1",t.className="Sofill-CDUI-btn1 toolbar__icon",t.innerHTML='',t.style.width="17px",t.style.height="100%",t.style.marginLeft="5px",e.children[0].insertAdjacentElement("beforeend",t);let o=new CPDialog({isCancel:!0,dragable:!1,maskable:!0});document.querySelector(".Sofill-CDUI-btn1").onclick=function(){o.open()}}}else{const e=document.getElementById("barHelp");if(null==document.getElementById("Sofill-CDUI-1")){const t=document.createElement("button");t.id="Sofill-CDUI-1",t.className="Sofill-CDUI-btn1 b3-menu__item",t.ariaLabel="主题设置(实验性)",t.innerHTML='主题设置',e.children[1].insertAdjacentElement("afterbegin",t);let o=new CPDialog({isCancel:!0,dragable:!1,maskable:!0});document.querySelector(".Sofill-CDUI-btn1").onclick=function(){o.open()}}}var obj={};function bindDomWithObject(e){var t=document.getElementById(e.id),o=e.obj,n=e.prop,a=e.callback,c=e.type,l=e.updated;Object.defineProperty(o,n,{get:function(){return t.value},set:function(e){t.value=e,localStorage.setItem(n,e)},configurable:!0}),t.addEventListener(c,(function(){o[n]=o[n],"function"==typeof l&&l(o,n,t)})),"function"==typeof a&&a(e,o,t)}function propInit(e,t){bindDomWithObject({id:e,obj:obj,prop:e,type:t,callback:function(t,o,n){API.isEmpty(localStorage.getItem(e))||(o[t.prop]=localStorage.getItem(e))}})}function propChange(e,t){bindDomWithObject({id:e,obj:obj,prop:e,type:"change",updated:t}),t()}function checkedInit(e){"true"===localStorage.getItem(e.id)?e.checked=!0:e.checked=!1}function checkedChange(e,t,o){!0===e.checked?(localStorage.setItem(e.id,"true"),t()):(localStorage.setItem(e.id,"false"),o()),e.addEventListener("click",(function(){!0===e.checked?(localStorage.setItem(e.id,"true"),t()):(localStorage.setItem(e.id,"false"),o())}))}let selectList=document.querySelectorAll("select[id^='SC_winsay_cp']");selectList.forEach((function(e){propInit(e.id,"change")}));let rangeSliderList=document.querySelectorAll("input[id^='SC_winsay_cp'][type='range']");rangeSliderList.forEach((function(e){propInit(e.id,"change")}));let checkboxList=document.querySelectorAll("input[id^='SC_winsay_cp'][type='checkbox']");checkboxList.forEach((function(e){checkedInit(e)})),propChange("SC_winsay_cp_appearance__TabBarMode",(function(){var e=localStorage.getItem("SC_winsay_cp_appearance__TabBarMode"),t=API.isEmpty(e)?"sweet/MI-TabBar-D.css":e;window.funs.updateStyle("TabBar",`/appearance/themes/Sofill-/style/${t}`)})),checkedChange(document.getElementById("SC_winsay_cp_appearance__ToolBarMode"),(()=>{document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-height-max","11px"),document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-child-visibility","hidden"),document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-svg-height","0px")}),(()=>{document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-height-max","37px"),document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-child-visibility","visible"),document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-svg-height","14px")})),propChange("SC_winsay_cp_appearance__ToolBarMode__height",(function(){var e=localStorage.getItem("SC_winsay_cp_appearance__ToolBarMode__height");API.isEmpty(e)||(document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-height",e),document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-svg-height",parseInt(e)/2+1+"px"),document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-svg-hover-height",parseInt(e)/2+1+"px"))})),propChange("SC_winsay_cp_appearance__ToolBarMode__NotFocus__bgColor",(function(){var e=localStorage.getItem("SC_winsay_cp_appearance__ToolBarMode__NotFocus__bgColor");API.isEmpty(e)||document.documentElement.style.setProperty("--b3-toolbar-background",e)})),checkedChange(document.getElementById("SC_winsay_cp_appearance__DockBgColorFilter"),(()=>{document.querySelector("#dockLeft").style.setProperty("background-image","linear-gradient(to top,#cccccc16,#ffffff06)"),document.querySelector("#dockRight").style.setProperty("background-image","linear-gradient(to top left,#cccccc16,#ffffff06)"),document.querySelector("#status").style.setProperty("background-image","linear-gradient(to top right,#cccccc16,#ffffff06)")}),(()=>{document.querySelector("#dockLeft").style.setProperty("background-image","none"),document.querySelector("#dockRight").style.setProperty("background-image","none"),document.querySelector("#status").style.setProperty("background-image","none")})),checkedChange(document.getElementById("SC_winsay_cp_appearance__ToolBarMode__HideList__docName"),(()=>{document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-docName-opacity","0")}),(()=>{document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-docName-opacity","0.77")})),checkedChange(document.getElementById("SC_winsay_cp_appearance__ToolBarMode__HideList__VIP"),(()=>{document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-VIP-opacity","0")}),(()=>{document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-VIP-opacity","0.77")})),checkedChange(document.getElementById("SC_winsay_cp_appearance__ToolBarMode__HideList__windowX"),(()=>{document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-windowX-opacity","0")}),(()=>{document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-windowX-opacity","0.77")})),checkedChange(document.getElementById("SC_winsay_cp_appearance__ToolBarMode__HideList__Other"),(()=>{document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-Other-opacity","0")}),(()=>{document.documentElement.style.setProperty("--SCC-Variables-MI-ToolBar-Other-opacity","0.77")})),checkedChange(document.getElementById("SC_winsay_cp_filetree__Hide_untitle"),(()=>{document.documentElement.style.setProperty("--SCC-Variables-MI-DocTree-Untitle-opacity","0")}),(()=>{document.documentElement.style.setProperty("--SCC-Variables-MI-DocTree-Untitle-opacity","1")})),checkedChange(document.getElementById("SC_winsay_cp_editor__LH_Adaptive"),(()=>{window.funs.updateStyle("LH_Adaptive","/appearance/themes/Sofill-/style/sweet/LH-Adaptive.css")}),(()=>{API.removejscssfile(`${config.THEME_ROOT}style/sweet/LH-Adaptive.css`,"css")})),propChange("SC_winsay_cp_editor__LH_Adaptive__pIndent",(function(){var e=localStorage.getItem("SC_winsay_cp_editor__LH_Adaptive__pIndent");API.isEmpty(e)||document.documentElement.style.setProperty("--SCC-Variables-MI-Doc-pIndent",`${e}rem`)})),propChange("SC_winsay_cp_editor__LH_Adaptive__LH",(function(){var e=localStorage.getItem("SC_winsay_cp_editor__LH_Adaptive__LH");API.isEmpty(e)||(document.documentElement.style.setProperty("--SCC-Variables-MI-Doc-LH",`${e}`),document.getElementById("SC_winsay_cp_editor__LH_Adaptive__LH__label").setAttribute("aria-label",`${e}`),localStorage.setItem("SC_winsay_cp_editor__LH_Adaptive__LH__label",e))})),propChange("SC_winsay_cp_editor__LH_Adaptive__marginTop",(function(){var e=localStorage.getItem("SC_winsay_cp_editor__LH_Adaptive__marginTop");API.isEmpty(e)||document.documentElement.style.setProperty("--SCC-Variables-MI-Doc-marginTop",`${e}rem`)})),propChange("SC_winsay_cp_editor__LH_Adaptive__marginBottom",(function(){var e=localStorage.getItem("SC_winsay_cp_editor__LH_Adaptive__marginBottom");API.isEmpty(e)||document.documentElement.style.setProperty("--SCC-Variables-MI-Doc-marginBottom",`${e}rem`)})),propChange("SC_winsay_cp_editor__LH_Adaptive__lSpacing",(function(){var e=localStorage.getItem("SC_winsay_cp_editor__LH_Adaptive__lSpacing");API.isEmpty(e)||(document.documentElement.style.setProperty("--SCC-Variables-MI-Doc-lSpacing",`${e}rem`),document.getElementById("SC_winsay_cp_editor__LH_Adaptive__lSpacing__label").setAttribute("aria-label",`${e}`),localStorage.setItem("SC_winsay_cp_editor__LH_Adaptive__lSpacing__label",e))})),checkedChange(document.getElementById("SC_winsay_cp_filetree__Adaptive_display"),(()=>{window.funs.updateStyle("MI-DocTree-Adaptive","/appearance/themes/Sofill-/style/sweet/MI-DocTree-Adaptive.css")}),(()=>{API.removejscssfile(`${config.THEME_ROOT}style/sweet/MI-DocTree-Adaptive.css`,"css")})),propChange("SC_winsay_cp_filetree__docFontsize",(function(){var e=localStorage.getItem("SC_winsay_cp_filetree__docFontsize");API.isEmpty(e)||(document.documentElement.style.setProperty("--SCC-Variables-MI-DocTree-docFontsize",`${e}pt`),document.getElementById("SC_winsay_cp_filetree__docFontsize__label").setAttribute("aria-label",`${e}`),localStorage.setItem("SC_winsay_cp_filetree__docFontsize__label",e))})),propChange("SC_winsay_cp_filetree__nbFontsize",(function(){var e=localStorage.getItem("SC_winsay_cp_filetree__nbFontsize");API.isEmpty(e)||(document.documentElement.style.setProperty("--SCC-Variables-MI-DocTree-nbFontsize",`${e}pt`),document.getElementById("SC_winsay_cp_filetree__nbFontsize__label").setAttribute("aria-label",`${e}`),localStorage.setItem("SC_winsay_cp_filetree__nbFontsize__label",e))})),propChange("SC_winsay_cp_filetree__nbMargin",(function(){var e=localStorage.getItem("SC_winsay_cp_filetree__nbMargin");API.isEmpty(e)||(document.documentElement.style.setProperty("--SCC-Variables-MI-DocTree-nbMargin",`${e}em`),document.getElementById("SC_winsay_cp_filetree__nbMargin__label").setAttribute("aria-label",`${e}`),localStorage.setItem("SC_winsay_cp_filetree__nbMargin__label",e))})),document.getElementById("SC_winsay_cp_system__ClearlocalStorage").addEventListener("click",(function(){new ConfirmDialog({isCancel:!0,dragable:!1,XML:ConfirmDialog1,success(){for(var e=0,t=0;t页面即将刷新`),setTimeout((()=>{window.location.reload()}),3e3)},cancel(){},maskable:!0}).open()})),checkedChange(document.getElementById("SC_winsay_cp_editor__FocusEnhanc_inlineCode"),(()=>{document.documentElement.style.setProperty("--SCC-Variables-Block-Inline-span__code__before-content","'<'"),document.documentElement.style.setProperty("--SCC-Variables-Block-Inline-span__code__after-content","'>'")}),(()=>{document.documentElement.style.setProperty("--SCC-Variables-Block-Inline-span__code__before-content",""),document.documentElement.style.setProperty("--SCC-Variables-Block-Inline-span__code__after-content","")})); \ No newline at end of file diff --git a/script/config.js b/script/config.js deleted file mode 100644 index 1abbff8..0000000 --- a/script/config.js +++ /dev/null @@ -1,86 +0,0 @@ -import * as API from "./utils/api.min.js"; - -const config_Custom = "/conf/appearance/themes/Sofill-/config/Custom.json"; -const config_UI = "/conf/appearance/themes/Sofill-/config/UI.json"; -const themeStyle = document.getElementById("themeStyle"); // 当前主题引用路径 -const THEME_ROOT = new URL(themeStyle.href).pathname.replace("theme.css", ""); - -const ID_COLOR_STYLE = "theme-color-style"; - -/* DOM 节点 ID */ -const IDs = { - STYLE_COLOR: "custom-id-style-theme-color", - BUTTON_TOOLBAR_CHANGE_COLOR: "custom-id-button-toolbar-change-color", -}; - -var colors = [ - "style-S2/root.css", - "style-S2/root-L-Blue.css", - "style-S2/root-L-Red.css", - "style-S2/root-L-Pink.css", - "style-S2/root-L-Green.css", - "style-S2/root-L-Yellow.css", -]; - -var colors2 = [ - "style-S2/root-D-BlackGoldBlue.css", - "style-S2/root-D-InkGreenPurple.css", -]; - -const latest_LC_href = "SC_winsay_style_LC_href"; -const latest_DC_href = "SC_winsay_style_DC_href"; -/* 循环迭代器 */ -var Iterator = function* (items) { - for (let i = 0; true; i = (i + 1) % items.length) { - yield items[i]; - } -}; -var Iterator2 = function* (items) { - for (let i = 0; true; i = (i + 1) % items.length) { - yield items[i]; - } -}; - -// 安卓手机:android + body--mobile -// 安卓平板:android + body--desktop - -/** - * 获取客户端模式 - * @return {string} 'app' 或 'desktop' 或 'mobile' - */ -var clientMode = (() => { - let url = new URL(window.location.href); - switch (true) { - case url.pathname.startsWith("/stage/build/app"): - return "body--app"; - case url.pathname.startsWith("/stage/build/desktop"): - return "body--desktop"; - case url.pathname.startsWith("/stage/build/mobile"): - return "body--mobile"; - default: - return null; - } -})(); -document.body.classList.add(clientMode); -document.body.classList.add(window.theme.OS); - -var kernelVersion = window.siyuan.config.system.kernelVersion; -var cv_result = API.compareVersion(kernelVersion, "2.4.2"); - - -export { - cv_result, - clientMode, - Iterator2, - Iterator, - latest_DC_href, - latest_LC_href, - colors2, - colors, - IDs, - ID_COLOR_STYLE, - THEME_ROOT, - themeStyle, - config_UI, - config_Custom, -}; diff --git a/script/fun.min.js b/script/fun.min.js deleted file mode 100644 index 7d9a453..0000000 --- a/script/fun.min.js +++ /dev/null @@ -1 +0,0 @@ -import*as API from"./utils/api.min.js";function InsertMenuItem(e,t){let n=document.getElementById("commonMenu"),s=n.querySelector(".b3-menu__item--readonly"),u=n.querySelector('[id="viewselect"]');s&&(u||(n.insertBefore(ViewSelect(e,t),s),n.insertBefore(MenuSeparator(),s)))}function ViewMonitor(e){let t=e.currentTarget.getAttribute("data-node-id"),n="custom-"+e.currentTarget.getAttribute("custom-attr-name"),s=e.currentTarget.getAttribute("custom-attr-value"),u=document.querySelectorAll(`.protyle-wysiwyg [data-node-id="${t}"]`);u&&u.forEach((e=>e.setAttribute(n,s)));let a={};a[n]=s,API.setBlockAttrs(t,a)}function ViewSelect(e,t){let n=document.createElement("button");return n.id="viewselect",n.className="b3-menu__item",n.innerHTML='视图选择',n.appendChild(SubMenu(e,t)),n}function SubMenu(e,t,n="b3-menu__submenu"){let s=document.createElement("div");return s.className=n,"NodeList"==t&&(s.appendChild(GraphView(e)),s.appendChild(TableView(e)),s.appendChild(kanbanView(e)),s.appendChild(DefaultView(e))),"NodeTable"==t&&(s.appendChild(FixWidth(e)),s.appendChild(AutoWidth(e)),s.appendChild(FullWidth(e)),s.appendChild(dHeader(e)),s.appendChild(vHeader(e)),s.appendChild(Removeth(e)),s.appendChild(Defaultth(e))),"NodeBlockquote"==t&&(s.appendChild(Error(e)),s.appendChild(Warn(e)),s.appendChild(Bug(e)),s.appendChild(Check(e)),s.appendChild(Light(e)),s.appendChild(Question(e)),s.appendChild(Wrong(e)),s.appendChild(Info(e)),s.appendChild(Pen(e)),s.appendChild(Note(e)),s.appendChild(Bell(e)),s.appendChild(Defaultbq(e))),s}function GraphView(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","f"),t.setAttribute("custom-attr-value","dt"),t.innerHTML='转换为导图',t.onclick=ViewMonitor,t}function TableView(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","f"),t.setAttribute("custom-attr-value","bg"),t.innerHTML='转换为表格',t.onclick=ViewMonitor,t}function kanbanView(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","f"),t.setAttribute("custom-attr-value","kb"),t.innerHTML='转换为看板',t.onclick=ViewMonitor,t}function DefaultView(e){let t=document.createElement("button");return t.className="b3-menu__item",t.onclick=ViewMonitor,t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","f"),t.setAttribute("custom-attr-value",""),t.innerHTML='恢复为列表',t}function FixWidth(e){let t=document.createElement("button");return t.className="b3-menu__item",t.onclick=ViewMonitor,t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","f"),t.setAttribute("custom-attr-value",""),t.innerHTML='自动宽度(换行)',t}function AutoWidth(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","f"),t.setAttribute("custom-attr-value","auto"),t.innerHTML='自动宽度(不换行)',t.onclick=ViewMonitor,t}function FullWidth(e){let t=document.createElement("button");return t.className="b3-menu__item",t.onclick=ViewMonitor,t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","f"),t.setAttribute("custom-attr-value","full"),t.innerHTML='页面宽度',t}function dHeader(e){let t=document.createElement("button");return t.className="b3-menu__item",t.onclick=ViewMonitor,t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","t"),t.setAttribute("custom-attr-value","dongjie"),t.innerHTML='冻结表头滚屏',t}function vHeader(e){let t=document.createElement("button");return t.className="b3-menu__item",t.onclick=ViewMonitor,t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","t"),t.setAttribute("custom-attr-value","vbiaotou"),t.innerHTML='竖向表头样式',t}function Removeth(e){let t=document.createElement("button");return t.className="b3-menu__item",t.onclick=ViewMonitor,t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","t"),t.setAttribute("custom-attr-value","biaotou"),t.innerHTML='空白表头样式',t}function Defaultth(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","t"),t.setAttribute("custom-attr-value",""),t.innerHTML='恢复表头样式',t.onclick=ViewMonitor,t}function Error(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","b"),t.setAttribute("custom-attr-value","error"),t.innerHTML='禁止',t.onclick=ViewMonitor,t}function Warn(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","b"),t.setAttribute("custom-attr-value","warn"),t.innerHTML='警告',t.onclick=ViewMonitor,t}function Bug(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","b"),t.setAttribute("custom-attr-value","bug"),t.innerHTML='bug',t.onclick=ViewMonitor,t}function Check(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","b"),t.setAttribute("custom-attr-value","check"),t.innerHTML='正确',t.onclick=ViewMonitor,t}function Light(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","b"),t.setAttribute("custom-attr-value","light"),t.innerHTML='灵感',t.onclick=ViewMonitor,t}function Question(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","b"),t.setAttribute("custom-attr-value","question"),t.innerHTML='问题',t.onclick=ViewMonitor,t}function Wrong(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","b"),t.setAttribute("custom-attr-value","wrong"),t.innerHTML='错误',t.onclick=ViewMonitor,t}function Info(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","b"),t.setAttribute("custom-attr-value","info"),t.innerHTML='信息',t.onclick=ViewMonitor,t}function Pen(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","b"),t.setAttribute("custom-attr-value","pen"),t.innerHTML='记录',t.onclick=ViewMonitor,t}function Note(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","b"),t.setAttribute("custom-attr-value","note"),t.innerHTML='汇总',t.onclick=ViewMonitor,t}function Bell(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","b"),t.setAttribute("custom-attr-value","bell"),t.innerHTML='提醒',t.onclick=ViewMonitor,t}function Defaultbq(e){let t=document.createElement("button");return t.className="b3-menu__item",t.setAttribute("data-node-id",e),t.setAttribute("custom-attr-name","b"),t.setAttribute("custom-attr-value",""),t.innerHTML='恢复默认样式',t.onclick=ViewMonitor,t}function MenuSeparator(e="b3-menu__separator"){let t=document.createElement("button");return t.className=e,t}window.funs.getThemeMode=(()=>{switch(window.siyuan.config.appearance.mode){case 0:return"light";case 1:return"dark";default:return null}})(),window.funs.MenuShow=function(){setTimeout((()=>{let e=API.getBlockSelected();if(e){let t=e.type,n=e.id;"NodeList"==t&&setTimeout((()=>InsertMenuItem(n,t)),0)}}),0)},setTimeout((()=>window.addEventListener("mouseup",window.funs.MenuShow)),1e3); \ No newline at end of file diff --git a/script/kernel.js b/script/kernel.js new file mode 100644 index 0000000..34870ff --- /dev/null +++ b/script/kernel.js @@ -0,0 +1,47 @@ +import * as API from "./../../Sofill-/script/utils/api.min.js"; +import * as config from "./../../Sofill-/script/config.js"; +const fs = require("fs"); +const winsay_ROOT = `${window.siyuan.config.system.confDir}\\appearance\\themes\\Sofill-\\`; + +async function isFileExisted(path_way) { + return new Promise((response) => { + fs.access(path_way, (err) => { + if (err) { + response(false); + } else { + response(true); + } + }) + }) +}; + +async function winsayKernel(path_way) { + try { + isFileExisted(path_way).then((response)=>{ + if (response) { + window.funs.loadScript( + window.funs.addURLParam("/appearance/themes/Sofill-/theme.js"), + undefined, + true + ); + console.log("Sofill- kernel loaded"); + } else { + new Notification("Sofill- 内核损坏", { + body: "请前往集市重装 Sofill- 后继续", + }).onclick = () => + (console.log("Notification clicked!")); + } + }) + } catch (error) { + console.log(error); + } +} + +if (!window.siyuan.config.appearance.lightThemes.includes("Sofill-")) { + new Notification("Sofill- 内核未安装", { + body: "请前往集市安装 Sofill- 后继续", + }).onclick = () => + (console.log("Notification clicked!")); +} else { + winsayKernel(`${winsay_ROOT}theme.js`); +} diff --git a/script/module/CPM.js b/script/module/CPM.js deleted file mode 100644 index 522ffb0..0000000 --- a/script/module/CPM.js +++ /dev/null @@ -1,152 +0,0 @@ -import { CP } from "./XML/CPDialog.js"; -class Dialog extends EventTarget { - constructor(options) { - super(); - - // 默认配置 - let defalultOptions = { - width: "30%", - height: "250px", - title: "测试标题", - XML: "测试内容", - dragable: false, //是否可拖拽 - maskable: true, //是否有遮罩 - isCancel: false, //是否有取消 - success() {}, - cancel() {}, - }; - // 合并配置; - this.opts = { ...defalultOptions, ...options }; - this.init(); - } - // 初始化组件方法 - init() { - this.createElement(); - this.addEventListener("success", this.opts.success); - if (!this.opts.maskable) { - this.divEles.querySelector(".SCC-wrapper").style.display = "none"; - } - if (this.opts.dragable) { - this.drag(); - } - } - // 创建节点 - createElement() { - // console.log(this.opts.width) - let divEles = document.createElement("div"); - divEles.innerHTML = `
`; - divEles.style.display = "none"; - document.body.appendChild(divEles); - this.divEles = divEles; - } - - sure(value) { - let success = new CustomEvent("success", { - detail: value, - }); - this.dispatchEvent(success); - } - // 关闭组件 - close() { - this.divEles.style.display = "none"; - } - // 打开组件 - open() { - this.divEles.style.display = "block"; - } - drag() { - let kDialog = this.divEles.querySelector(".SCC-dialog"); - kDialog.onmousedown = function (e) { - let x = e.clientX - this.offsetLeft; - let y = e.clientY - this.offsetTop; - this.onmousemove = function (e) { - let xx = e.clientX; - let yy = e.clientY; - this.style.left = xx - x + "px"; - this.style.top = yy - y + "px"; - }; - }; - document.onmouseup = function () { - kDialog.onmousemove = ""; - }; - } -} - -// 通过继承扩展功能; -export class ConfirmDialog extends Dialog { - constructor(options) { - super(options); - this.create(); - this.addEleEvent(); - } - create() { - this.divEles.innerHTML = this.opts.XML; - } - sure() { - super.sure(); - } - // 添加事件 - addEleEvent() { - // 事件委托 - let SCCDialog = this.divEles.querySelector(".SCC-dialog"); - SCCDialog.addEventListener("click", (e) => { - // console.log(e.target); - let cl = e.target.classList; - if (cl.contains("SCC-close") || cl.contains("b3-dialog__scrim")) { - this.close(); - } - if (cl.contains("SCC-default") || cl.contains("b3-button--cancel")) { - this.opts.cancel(); - this.close(); - } - if (cl.contains("SCC-primary")) { - this.sure(); - this.close(); - } - }); - } -} -export class CPDialog extends Dialog { - constructor(options) { - super(options); - this.create(); - this.addEleEvent(); - } - create() { - this.divEles.innerHTML = CP; - } - // 添加事件 - addEleEvent() { - // 事件委托 - let SCCDialog = this.divEles.querySelector(".SCC-dialog"); - SCCDialog.addEventListener("click", (e) => { - // console.log(e.target); - let cl = e.target.classList; - if (cl.contains("SCC-close") || cl.contains("b3-dialog__scrim")) { - this.close(); - } - if (cl.contains("SCC-default") || cl.contains("b3-button--cancel")) { - this.opts.cancel(); - this.close(); - } - }); - } -} - -// class ConfirmDialog extends HTMLElement { -// constructor() { -// super(); -// let dialog = new Dialog({ -// title: this.title, -// success: (e) => { -// // console.log("点击了确定") -// this.dispatchEvent(new CustomEvent("success")); -// }, -// }); -// dialog.open(); -// } -// get title() { -// return this.getAttribute("title") ?? "默认标题"; -// } -// } -// customElements.define("ConfirmDialog", ConfirmDialog); diff --git a/script/module/ChangeFontSize.js b/script/module/ChangeFontSize.js deleted file mode 100644 index 0440cdd..0000000 --- a/script/module/ChangeFontSize.js +++ /dev/null @@ -1,90 +0,0 @@ -const config = { - theme: { - regs: { - // 正则表达式 - fontsize: /(?<=\.b3-typography|protyle-wysiwyg|protyle-title\s*\{\s*font-size\s*:\s*)(\d+)(?=px(?:\s+\!important)?(?:\s*;|\}))/, - }, - wheel: { - enable: true, // 滚轮功能开关 - zoom: { - enable: true, // 滚轮缩放功能开关 - threshold: 100, // 滚轮缩放阈值 - min: 9, // 最小字号(px) - max: 72, // 最大字号(px) - }, - }, - hotkeys: { - wheel: { - zoom: { - // 鼠标滚轮缩放(Ctrl + wheel) - enable: true, - CtrlCmd: true, - WinCtrl: false, - Shift: false, - Alt: false, - type: 'mousewheel', - }, - }, - }, - }, -}; - -/** - * 设置编辑器字号 - * REF https://github.com/siyuan-note/siyuan/blob/7fbae2f7438a313837218e419468e0b189163c6a/app/src/util/assets.ts#L120-L145 - * @param {number} fontSize 字号 - * @return {number} 设置后的字号 - * @return {null} 没有找到字号 - */ -function setFontSize(fontSize) { - let style = document.getElementById('editorFontSize'); - if (style) { - const height = Math.floor(fontSize * 1.625); - style.innerHTML = ` -.b3-typography, .protyle-wysiwyg, .protyle-title {font-size:${fontSize}px !important} -.b3-typography code:not(.hljs), .protyle-wysiwyg span[data-type~=code] { font-variant-ligatures: ${window.siyuan.config.editor.codeLigatures ? "normal" : "none"} } -.li > .protyle-action {height:${height + 8}px;line-height: ${height + 8}px} -.protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h1, .protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h2, .protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h3, .protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h4, .protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h5, .protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h6 {line-height:${height + 8}px;} -.protyle-wysiwyg [data-node-id].li > .protyle-action:after {height: ${fontSize}px;width: ${fontSize}px;margin:-${fontSize / 2}px 0 0 -${fontSize / 2}px} -.protyle-wysiwyg [data-node-id].li > .protyle-action svg {height: ${Math.max(14, fontSize - 8)}px} -.protyle-wysiwyg [data-node-id] [spellcheck="false"] {min-height:${height}px} -.protyle-wysiwyg .li {min-height:${height + 8}px} -.protyle-gutters button svg {height:${height}px} -.protyle-wysiwyg img.emoji, .b3-typography img.emoji {width:${height - 8}px} -.protyle-wysiwyg .h1 img.emoji, .b3-typography h1 img.emoji {width:${Math.floor(fontSize * 1.75 * 1.25)}px} -.protyle-wysiwyg .h2 img.emoji, .b3-typography h2 img.emoji {width:${Math.floor(fontSize * 1.55 * 1.25)}px} -.protyle-wysiwyg .h3 img.emoji, .b3-typography h3 img.emoji {width:${Math.floor(fontSize * 1.38 * 1.25)}px} -.protyle-wysiwyg .h4 img.emoji, .b3-typography h4 img.emoji {width:${Math.floor(fontSize * 1.25 * 1.25)}px} -.protyle-wysiwyg .h5 img.emoji, .b3-typography h5 img.emoji {width:${Math.floor(fontSize * 1.13 * 1.25)}px} -.protyle-wysiwyg .h6 img.emoji, .b3-typography h6 img.emoji {width:${Math.floor(fontSize * 1.25)}px} -.b3-typography:not(.b3-typography--default), .protyle-wysiwyg, .protyle-title, .protyle-title__input{font-family: "${window.siyuan.config.editor.fontFamily}", "quote", "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans GB", "Microsoft Yahei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols" !important;} -`; - return parseInt(config.theme.regs.fontsize.exec(style.innerHTML)); - } - return null; -} - -/* 字号更改 */ -function changeFontSize(delta) { - let size = delta / config.theme.wheel.zoom.threshold | 0; - let old_size = window.siyuan.config.editor.fontSize; - let new_size = Math.max(Math.min(old_size + size, config.theme.wheel.zoom.max), config.theme.wheel.zoom.min); - new_size = setFontSize(new_size); - if (new_size) window.siyuan.config.editor.fontSize = new_size; -} - -function isEvent(event, key) { - return (event.type === key.type - && event.altKey === key.Alt - && event.shiftKey === key.Shift - && (event.ctrlKey || event.metaKey) === key.CtrlCmd - && (event.ctrlKey && event.metaKey) === key.WinCtrl - ) -} - -document.addEventListener('mousewheel', e => { - if (isEvent(e, config.theme.hotkeys.wheel.zoom)) { - e.stopPropagation(); - setTimeout(() => changeFontSize(e.wheelDeltaY), 0); - } -}, true); \ No newline at end of file diff --git a/script/module/CustomBoot.min.js b/script/module/CustomBoot.min.js deleted file mode 100644 index fe55b1d..0000000 --- a/script/module/CustomBoot.min.js +++ /dev/null @@ -1 +0,0 @@ -import*as config from"../config.js";import*as API from"./../utils/api.min.js";let SC_winsay_cp_appearance__TabBarMode=localStorage.getItem("SC_winsay_cp_appearance__TabBarMode");async function ghostTabBar(){API.isEmpty(SC_winsay_cp_appearance__TabBarMode)?new Promise((function(e){var a=new XMLHttpRequest;a.open("POST","http://127.0.0.1:6806/api/file/getFile",!0),a.setRequestHeader("Content-type","application/json");var s={path:config.config_UI};a.send(JSON.stringify(s)),a.onreadystatechange=function(){if(4==a.readyState&&200==a.status){var s=a.responseText;e(JSON.parse(s))}}})).then((function(e){window.funs.updateStyle("TabBar",`/appearance/themes/Sofill-/style/${e.style.TabBar}`)})):window.funs.updateStyle("TabBar",`/appearance/themes/Sofill-/style/${SC_winsay_cp_appearance__TabBarMode}`)}switch(ghostTabBar(),window.funs.updateStyle("MI","/appearance/themes/Sofill-/style/MI.min.css"),window.theme.OS){case"android":window.funs.updateStyle("MI-DocTree","/appearance/themes/Sofill-/style/MI-DocTree.css"),window.funs.updateStyle("MI-Doc&Breadcrumb","/appearance/themes/Sofill-/style/MI-Doc&Breadcrumb.css"),window.funs.updateStyle("Mobile","/appearance/themes/Sofill-/style/android/Mobile.css");break;default:window.funs.updateStyle("MI-DocTree","/appearance/themes/Sofill-/style/MI-DocTree.css"),window.funs.updateStyle("MI-Doc&Breadcrumb","/appearance/themes/Sofill-/style/MI-Doc&Breadcrumb.css");break}window.funs.updateStyle("Init","/appearance/themes/Sofill-/style/Init.min.css"),window.funs.updateStyle("SCC","/appearance/themes/Sofill-/style/SCC.min.css"),window.funs.updateStyle("Popup","/appearance/themes/Sofill-/style/Popup.min.css"),window.funs.updateStyle("CP","/appearance/themes/Sofill-/style/CP.min.css"),window.funs.updateStyle("Patch","/appearance/themes/Sofill-/style/Patch.css"),window.funs.updateStyle("/MI-ToolBar-Auto","/appearance/themes/Sofill-/style/sweet/MI-ToolBar-Auto.css"),window.funs.updateStyle("MI-TabBar-Common","/appearance/themes/Sofill-/style/MI-TabBar-Common.css"),window.funs.updateStyle("MI-TagTree","/appearance/themes/Sofill-/style/MI-TagTree.css"),window.funs.updateStyle("MI-HDTree","/appearance/themes/Sofill-/style/MI-HDTree.css"),window.funs.updateStyle("MI-Dock","/appearance/themes/Sofill-/style/MI-Dock.css"),window.funs.updateStyle("MI-Dynamic","/appearance/themes/Sofill-/style/MI-Dynamic.css"),window.funs.updateStyle("Funs-list2","/appearance/themes/Sofill-/style/Funs-list2.min.css"); \ No newline at end of file diff --git a/script/module/DTL.js b/script/module/DTL.js deleted file mode 100644 index 80d16f8..0000000 --- a/script/module/DTL.js +++ /dev/null @@ -1,135 +0,0 @@ -import { - insertCreateAfter, - addinsertCreateElement, - getTextWidth, - isPhone, -} from "./../utils/api.min.js"; - -/** 为打开文档的标题下显示文档创建日期 */ -function showDocumentCreationDate() { - setInterval(DocumentCreationDate, 300); -} - -function DocumentCreationDate() { - var allDocumentTitleElement = getAllDocumentTitleElement(); - for (let index = 0; index < allDocumentTitleElement.length; index++) { - const element = allDocumentTitleElement[index]; - var documentCreatTimeElement = creatTimeSpanElement(element.parentElement); - var spanTxt = documentCreatTimeElement.innerText; - if (spanTxt == "" || spanTxt == "日期获取中……") { - var documentCreatTimeTxt = getDocumentTime(element); - documentCreatTimeElement.innerText = documentCreatTimeTxt; - } - } -} - -/**获取所有打开文档的标题元素 */ -function getAllDocumentTitleElement() { - return document.querySelectorAll(".protyle-title__input"); -} - -/**为文档标题元素下创建时间容器元素 */ -function creatTimeSpanElement(tilteElement) { - var item = tilteElement.children; - for (let index = 0; index < item.length; index++) { - const element = item[index]; - if (element.getAttribute("documentCreatTimeElement") != null) { - return element; - } - } - var documentCreatTimeElement = addinsertCreateElement(tilteElement, "span"); - documentCreatTimeElement.setAttribute("documentCreatTimeElement", "true"); - documentCreatTimeElement.style.display = "block"; - documentCreatTimeElement.style.marginLeft = "7px"; - documentCreatTimeElement.style.marginBottom = "0px"; - documentCreatTimeElement.style.fontSize = "70%"; - documentCreatTimeElement.style.color = "#484550"; - documentCreatTimeElement.style.opacity = "0.58"; - return documentCreatTimeElement; -} - -/** 获得这个文档的创建时间 */ -function getDocumentTime(tilteElement) { - var tS = - tilteElement.parentElement.previousElementSibling.getAttribute( - "data-node-id" - ); - if (tS == null) { - return ""; - } - var year = tS.substring(0, 4); - var moon = tS.substring(4, 6); - var day = tS.substring(6, 8); - var hour = tS.substring(8, 10); - var minute = tS.substring(10, 12); - var second = tS.substring(12, 14); - return "since " + year + "-" + moon + "-" + day; -} - - -/** 为文档标题创建动态下划线 */ -function rundynamicUnderline() { - setInterval(dynamicUnderline, 200); -} - -function dynamicUnderline() { - var AllDocumentTitleElement = getAllDocumentTitleElement(); - for (let index = 0; index < AllDocumentTitleElement.length; index++) { - const element = AllDocumentTitleElement[index]; - var line = createLine(element); - var txt = getTileTxt(element); - var maxWidth = element.offsetWidth; - var Style = getComputedStyle(element, null); - var font = Style.font; - var width = getTextWidth(txt, font) + 13; - if (width < 58) { - width = 58; - } //动态下划线最小宽度 - if (width > maxWidth) { - width = maxWidth; - } //不超过一行 - line.style.width = width + "px"; - } -} - -function createLine(TitleElement) { - var item = TitleElement.parentElement.children; - for (let index = 0; index < item.length; index++) { - const element = item[index]; - if (element.getAttribute("Line") != null) { - return element; - } - } - var line = insertCreateAfter(TitleElement, "div"); - line.setAttribute("Line", "true"); - line.setAttribute("class", "scc-dynamic"); - line.setAttribute("id", "doc-underline"); - line.style.opacity = "0.13"; - line.style.height = "1.3px"; - line.style.marginTop = "3.1px"; - line.style.marginBottom = "5.8px"; - line.style.backgroundImage = - "linear-gradient(to right, #ff0000, #0070c0, #ff3399, #912997)"; //动态下划线颜色 - return line; -} - -function getTileTxt(TitleElement) { - return TitleElement.innerText; -} - -(function (w, und) { - Refresh(); -})(window, undefined); - -function Refresh() { - if (isPhone()) { - //手机模式执行的 - setTimeout(() => {}, 1000); - } else { - //pc模式执行的 - setTimeout(() => { - rundynamicUnderline(); //为文档标题创建动态下划线 - showDocumentCreationDate(); //为打开文档标题下面显示文档创建日期 - }, 500); - } -} diff --git a/script/module/SSS.min.js b/script/module/SSS.min.js deleted file mode 100644 index 38c5a7b..0000000 --- a/script/module/SSS.min.js +++ /dev/null @@ -1 +0,0 @@ -import*as API from"./../utils/api.min.js";import*as config from"./../config.js";function createSofillToolbar(){var e=document.getElementById("toolbar"),t=document.getElementById("SofillToolbar"),o=document.getElementById("windowControls");t&&e.removeChild(t),(t=API.insertCreateBefore(o,"div","SofillToolbar")).style.marginRight="3px",t.style.marginTop="1px",t.style.marginLeft="10px"}function AndroidChangeColor(){var e=document.getElementById("SofillToolbar");if(null==e){var t=document.getElementById("toolbarEdit"),o=document.getElementById("windowControls");null==t&&null!=o?((e=document.createElement("div")).id="SofillToolbar",e.style.marginRight="3px",e.style.marginTop="1px",e.style.marginLeft="10px",o.parentElement.insertBefore(e,o)):null!=t&&((e=API.insertCreateBefore(t,"div","SofillToolbar")).style.position="relative",e.style.height="25px",e.style.overflowY="scroll",e.style.paddingTop="7px",e.style.marginRight="9px",e.style.marginLeft="10px")}const n=API.addinsertCreateElement(e,"div");n.id=config.IDs.BUTTON_TOOLBAR_CHANGE_COLOR,n.style.width="17px",n.style.height="100%",n.style.float="left",n.style.marginLeft="10px",n.style.backgroundImage="url(/appearance/themes/Sofill-/src/S2.svg)",n.style.backgroundRepeat="no-repeat",n.style.backgroundPosition="left top",n.style.backgroundSize="100%",n.addEventListener("click",(e=>{const t=window.theme.iter.next().value;switch(window.funs.getThemeMode){case"dark":localStorage.setItem(config.latest_DC_href,t);break;case"light":default:localStorage.setItem(config.latest_LC_href,t);break}window.funs.updateStyle(config.IDs.STYLE_COLOR,t)}))}function iterLC(){let e=[],t=[],o=localStorage.getItem(config.latest_LC_href);if(window.theme.iter=config.Iterator(e),o){t=config.colors,t.forEach((t=>e.push(`${config.THEME_ROOT}${t}`))),window.funs.updateStyle(config.IDs.STYLE_COLOR,o);for(let e=0;ee.push(`${config.THEME_ROOT}${t}`))),window.theme.iter=config.Iterator(e),o=`/appearance/themes/Sofill-/style-S2/${n.color.light}`,localStorage.setItem(config.latest_LC_href,o),window.funs.updateStyle(config.IDs.STYLE_COLOR,o);for(let e=0;ee.push(`${config.THEME_ROOT}${t}`))),window.funs.updateStyle(config.IDs.STYLE_COLOR,o);for(let e=0;ee.push(`${config.THEME_ROOT}${t}`))),window.theme.iter=config.Iterator2(e),o=`/appearance/themes/Sofill-/style-S2/${n.color.dark}`,localStorage.setItem(config.latest_DC_href,o),window.funs.updateStyle(config.IDs.STYLE_COLOR,o);for(let e=0;e{const t=window.theme.iter.next().value;switch(window.funs.getThemeMode){case"dark":localStorage.setItem(config.latest_DC_href,t);break;case"light":default:localStorage.setItem(config.latest_LC_href,t);break}window.funs.updateStyle(config.IDs.STYLE_COLOR,t)})),null==document.getElementById(config.IDs.BUTTON_TOOLBAR_CHANGE_COLOR)&&e.insertAdjacentElement("afterend",t)}}async function changeStyleMod(){switch(window.funs.getThemeMode){case"dark":iterDC();break;case"light":default:iterLC();break}API.isPhone()?(AndroidChangeColor(),createSofillToolbar()):DesktopChangeColor()}function changeThemeModeByApp(){let e=null;switch(window.funs.getThemeMode){case"light":e="/appearance/themes/Sofill-/style-S2/root-base-light.css",config.colors2.forEach((e=>API.removejscssfile(`${config.THEME_ROOT}${e}`,"css"))),API.removejscssfile("/appearance/themes/Sofill-/style-S2/root-base-dark.css","css");break;case"dark":default:e="/appearance/themes/Sofill-/style-S2/root-base-dark.css",config.colors.forEach((e=>API.removejscssfile(`${config.THEME_ROOT}${e}`,"css"))),API.removejscssfile("/appearance/themes/Sofill-/style-S2/root-base-light.css","css");break}window.funs.updateStyle(config.ID_COLOR_STYLE,e),changeStyleMod()}setTimeout((()=>{changeThemeModeByApp()}),0); \ No newline at end of file diff --git a/script/module/XML/CPDialog.js b/script/module/XML/CPDialog.js deleted file mode 100644 index e0578f4..0000000 --- a/script/module/XML/CPDialog.js +++ /dev/null @@ -1,13 +0,0 @@ -export {CP}; -switch (window.theme.OS) { - case "android": - var CP = ` -
Sofill- v0 CP
敬请期待
敬请期待
敬请期待
敬请期待
敬请期待
-` - break; - default: - var CP = ` -
Sofill- v0 CP
聚焦提示增强
配置非聚焦时隐藏的顶栏元素
敬请期待
敬请期待
敬请期待
敬请期待
敬请期待
-` - break; -} \ No newline at end of file diff --git a/script/module/XML/ConfirmDialog.js b/script/module/XML/ConfirmDialog.js deleted file mode 100644 index e2fe952..0000000 --- a/script/module/XML/ConfirmDialog.js +++ /dev/null @@ -1,4 +0,0 @@ -export {ConfirmDialog1}; -var ConfirmDialog1 = ` -
⚠️ 删除操作确认
确定清除 全部配置数据? 操作不可恢复,用户自定义配置将丢失!
-` \ No newline at end of file diff --git a/script/module/dev.js b/script/module/dev.js deleted file mode 100644 index d51975d..0000000 --- a/script/module/dev.js +++ /dev/null @@ -1,63 +0,0 @@ -import * as API from "./../utils/api.min.js"; -import * as config from "./../config.js"; - -// 初始缩放比例 -let originPixelRatio = localStorage.SC_winsay_data_devicePixelRatio; -if (!originPixelRatio) { - originPixelRatio = window.devicePixelRatio; - // 整数才保存 - if (Number.isInteger(originPixelRatio)) { - localStorage.SC_winsay_data_devicePixelRatio = originPixelRatio; - } -} -// 来源:https://www.zhangxinxu.com/wordpress/2021/02/js-if-page-zoom/ -let lastPixelRatio = originPixelRatio; -window.addEventListener("resize", function () { - let currentPixelRatio = window.devicePixelRatio; - if (currentPixelRatio !== lastPixelRatio) { - console.log( - "缩放比例是:" + - Math.round(1000 * (currentPixelRatio / originPixelRatio)) / 10 + - "%(100%基准为软件初始缩放,并非实际缩放,仅供参考)" - ); - } - // 记住上一次的设备像素比 - lastPixelRatio = currentPixelRatio; -}); - -//夜间返回true,白天返回false,(这里夜间时间设置为23:00 -- 07:00) -function isDaylight() { - var currdate = new Date(); - if (currdate.getHours() >= 23 || currdate.getHours() < 7) { - return true; - } else { - return false; - } -} - -var setSleepNote; -new Promise(function (response) { - var url = `http://127.0.0.1:6806/api/file/getFile`; - var httpRequest = new XMLHttpRequest(); - httpRequest.open("POST", url, true); - httpRequest.setRequestHeader("Content-type", "application/json"); - var obj = { path: config.config_Custom }; - httpRequest.send(JSON.stringify(obj)); - // 响应后的回调函数 - httpRequest.onreadystatechange = function () { - if (httpRequest.readyState == 4 && httpRequest.status == 200) { - var json = httpRequest.responseText; - response(JSON.parse(json)); - } - }; -}).then(function (response) { - if (isDaylight || parseInt(response.gotoSleep) < 1) { - clearInterval(setSleepNote); - } else { - setSleepNote = setInterval(() => { - var currdate = new Date(); - let h = currdate.getHours(); - API.通知(`⏰ 现在已经 ${h} 点啦
劳逸结合是维持效率的秘诀 ~`); - }, 3600000 * parseInt(response.gotoSleep)); - } -}); \ No newline at end of file diff --git a/script/utils/api.min.js b/script/utils/api.min.js deleted file mode 100644 index 8b73e74..0000000 --- a/script/utils/api.min.js +++ /dev/null @@ -1 +0,0 @@ -export{insertCreateAfter,addinsertCreateElement,getTextWidth,isPhone,removejscssfile,insertCreateBefore,getBlockSelected,compareVersion,isEmpty,向思源请求数据 as request,交互业务 as transactions,以sql向思源请求块数据 as sql,获取思源块链接锚文本 as getAnchor,新建思源笔记本 as createNotebook,删除思源笔记本 as removeNotebook,保存思源笔记本配置 as setNotebookConf,向思源请求笔记本列表 as lsNotebooks,获取思源笔记本配置 as getNotebookConf,打开思源笔记本 as openNotebook,关闭思源笔记本 as closeNotebook,重命名思源笔记本 as renameNotebook,通过markdown创建文档 as createDocWithMd,删除思源文档 as removeDoc,重命名思源文档 as renameDoc,移动思源文档 as moveDoc,以id获取文档内容 as getDoc,以id获取文档聚焦内容 as getFocusedDoc,以id获取文档块markdown as exportMdContent,以id获取文档大纲 as getDocOutline,以id获取思源块属性 as getBlockAttrs,设置思源块属性 as setBlockAttrs,根据思源路径获取人类可读路径 as getHPathByPath,根据块ID查询文档人类可读完整路径 as getHPathByID,列出指定路径下文档 as listDocsByPath,以id获取反向链接 as getBacklink,以sql获取嵌入块内容 as searchEmbedBlock,获取标签列表 as getTag,导出模板 as docSaveAsTemplate,渲染模板 as render,以id获取局部图谱 as getLocalGraph,获取全局图谱 as getGraph,以关键词搜索文档 as searchDocs,以关键词搜索块 as searchBlock,以关键词搜索模板 as searchTemplate,插入块 as insertBlock,插入前置子块 as prependBlock,插入后置子块 as appendBlock,删除块 as deleteBlock,更新块 as updateBlock,以id获取思源块信息 as getBlockByID,获取块kramdown源码 as getBlockKramdown,获取块面包屑 as getBlockBreadcrumb,获取系统字体列表 as getSysFonts,获取文件 as getFile,写入文件 as putFile,推送消息 as pushMsg,推送报错消息 as pushErrMsg,通知};async function 向思源请求数据(e,t){let n=null;return await fetch(e,{body:JSON.stringify(t),method:"POST",headers:{Authorization:"Token ''"}}).then((function(e){n=e.json()})),n}async function 解析响应体(e){let t=await e;return 0===t.code?t.data:null}async function 交互业务(e,t=[]){const n=new URL(e.ws.ws.url);return 解析响应体(向思源请求数据("/api/transactions",{app:n.searchParams.get("app"),session:n.searchParams.get("id"),transactions:t}))}async function 以sql向思源请求块数据(e){return 解析响应体(向思源请求数据("/api/query/sql",{stmt:e}))}async function 向思源请求笔记本列表(){return 解析响应体(向思源请求数据("/api/notebook/lsNotebooks",{stmt:sql语句}))}async function 获取思源块链接锚文本(e){let t=`select * from blocks where id = '${e=e.replace("((","").replace("))","")}'`,n=await 以sql向思源请求块数据(t),o="";if(n)try{o=n[0][name]?n[0][name]:n[0].content?n[0].content:e}catch(e){o="解析错误"}return o}async function 打开思源笔记本(e){return 解析响应体(向思源请求数据("/api/notebook/openNotebook",{notebook:e}))}async function 关闭思源笔记本(e){return 解析响应体(向思源请求数据("/api/notebook/closeNotebook",{notebook:e}))}async function 重命名思源笔记本(e,t){return 解析响应体(向思源请求数据("/api/notebook/renameNotebook",{notebook:e,name:t}))}async function 新建思源笔记本(e){return 解析响应体(向思源请求数据("/api/notebook/createNotebook",{name:e}))}async function 删除思源笔记本(e){return 解析响应体(向思源请求数据("/api/notebook/removeNotebook",{notebook:e}))}async function 获取思源笔记本配置(e){return 解析响应体(向思源请求数据("/api/notebook/getNotebookConf",{notebook:e}))}async function 保存思源笔记本配置(e){return 解析响应体(向思源请求数据("/api/notebook/setNotebookConf",{notebook:e}))}async function 重命名思源文档(e,t,n){return 解析响应体(向思源请求数据("/api/filetree/renameDoc",{notebook:e,path:t,title:n}))}async function 删除思源文档(e,t){return 解析响应体(向思源请求数据("/api/filetree/removeDoc",{notebook:e,path:t}))}async function 移动思源文档(e,t,n,o){return 解析响应体(向思源请求数据("/api/filetree/moveDoc",{fromNotebook:e,fromPath:t,toNotebook:n,toPath:o}))}async function 根据思源路径获取人类可读路径(e,t){return 解析响应体(向思源请求数据("/api/filetree/getHPathByPath",{Notebook:e,Path:t}))}async function 根据块ID查询文档人类可读完整路径(e){return 解析响应体(向思源请求数据("/api/filetree/getHPathByID",{id:e}))}async function 以id获取思源块属性(e){return 解析响应体(向思源请求数据("/api/attr/getBlockAttrs",{id:e}))}async function 以id获取思源块信息(e){let t=`select * from blocks where id ='${e}'`;return(await 以sql向思源请求块数据(t))[0]}async function 获取块kramdown源码(e){return 解析响应体(向思源请求数据("/api/block/getBlockKramdown",{id:e}))}async function 获取块面包屑(e){return 解析响应体(向思源请求数据("/api/block/getBlockBreadcrumb",{id:e}))}async function 设置思源块属性(e,t){return 解析响应体(向思源请求数据("/api/attr/setBlockAttrs",{id:e,attrs:t}))}async function 以id获取文档块markdown(e){return 解析响应体(向思源请求数据("/api/export/exportMdContent",{id:e}))}async function 以id获取文档大纲(e){return 解析响应体(向思源请求数据("/api/outline/getDocOutline",{id:e}))}async function 列出指定路径下文档(e){return 解析响应体(向思源请求数据("/api/filetree/listDocsByPath",{path:e}))}function html转义(e){var t=document.createElement("div");t.innerHTML=e;var n=t.innerText||t.textContent;return t=null,n}async function 以id获取反向链接(e){return 解析响应体(向思源请求数据("/api/ref/getBacklink",{id:e,beforeLen:10,k:"",mk:""}))}async function 以sql获取嵌入块内容(e,t){return 解析响应体(向思源请求数据("/api/search/searchEmbedBlock",{stmt:t,excludeIDs:e}))}async function 以id获取文档内容(e){return 解析响应体(向思源请求数据("/api/filetree/getDoc",{id:e,k:"",mode:2,size:36}))}async function 以id获取文档聚焦内容(e){return 解析响应体(向思源请求数据("/api/filetree/getDoc",{id:e,k:"",mode:0,size:36}))}async function 获取标签列表(){return 解析响应体(向思源请求数据("/api/tag/getTag",{}))}async function 以id获取局部图谱(e,t,n,o){return 解析响应体(向思源请求数据("/api/graph/getLocalGraph",{id:t,k:e,conf:n,reqId:o}))}async function 获取全局图谱(e,t,n){return 解析响应体(向思源请求数据("/api/graph/getGraph",{k:e,conf:t,reqId:n}))}async function 以关键词搜索文档(e){return 解析响应体(向思源请求数据("/api/filetree/searchDocs",{k:e}))}async function 以关键词搜索块(e){return 解析响应体(向思源请求数据("/api/search/searchBlock",{query:e}))}async function 以关键词搜索模板(e){return 解析响应体(向思源请求数据("/api/search/searchTemplate",{k:e}))}async function 通过markdown创建文档(e,t,n){return 解析响应体(向思源请求数据("/api/filetree/createDocWithMd",{notebook:e,path:t,markdown:n}))}async function 导出模板(e,t=!1){return 解析响应体(向思源请求数据("/api/template/docSaveAsTemplate",{id:e,overwrite:t}))}async function 渲染模板(e){return 解析响应体(向思源请求数据("/api/template/render",e))}async function 插入块(e,t,n){let o="/api/block/insertBlock";return 解析响应体(向思源请求数据(o=o,n={previousID:e,dataType:t,data:n}))}async function 插入前置子块(e,t,n){let o="/api/block/prependBlock";return 解析响应体(向思源请求数据(o=o,n={parentID:e,dataType:t,data:n}))}async function 插入后置子块(e,t,n){let o="/api/block/appendBlock";return 解析响应体(向思源请求数据(o=o,n={parentID:e,dataType:t,data:n}))}async function 更新块(e,t,n){let o="/api/block/updateBlock";return 解析响应体(向思源请求数据(o=o,n={id:e,dataType:t,data:n}))}async function 删除块(e){let t="/api/block/deleteBlock";return 解析响应体(向思源请求数据(t=t,data={id:e}))}async function 获取系统字体列表(){return 解析响应体(向思源请求数据("/api/system/getSysFonts"))}async function 获取文件(e){const t=await fetch("/api/file/getFile",{method:"POST",headers:{Authorization:`Token ${config.token}`},body:JSON.stringify({path:e})});return 200===t.status?t:null}async function 写入文件(e,t,n=!1,o=Date.now()){let a=new Blob([t]),r=new File([a],e.split("/").pop()),i=new FormData;i.append("path",e),i.append("file",r),i.append("isDir",n),i.append("modTime",o);const s=await fetch("/api/file/putFile",{body:i,method:"POST",headers:{Authorization:`Token ${config.token}`}});return 200===s.status?await s.json():null}const language=window.theme.languageMode;async function 推送消息(e=null,t=null,n=7e3){return 解析响应体(向思源请求数据("/api/notification/pushMsg",{msg:e?e[language]||e.other:t,timeout:n}))}function 通知(e,t=7e3){var n=new XMLHttpRequest;n.open("POST","http://127.0.0.1:6806/api/notification/pushMsg",!0),n.setRequestHeader("Content-type","application/json");var o={msg:e,timeout:7e3};n.send(JSON.stringify(o)),n.onreadystatechange=function(){if(4==n.readyState&&200==n.status)n.responseText}}async function 推送报错消息(e=null,t=null,n=7e3){return 解析响应体(向思源请求数据("/api/notification/pushErrMsg",{msg:e?e[language]||e.other:t,timeout:n}))}function pushMessage(e){var t=new XMLHttpRequest;t.open("POST","http://127.0.0.1:6806/api/notification/pushMsg",!0),t.setRequestHeader("Content-type","application/json");var n={msg:e,timeout:7e3};t.send(JSON.stringify(n)),t.onreadystatechange=function(){if(4==t.readyState&&200==t.status)t.responseText}}function getTextWidth(e,t){var n=(getTextWidth.canvas||(getTextWidth.canvas=document.createElement("canvas"))).getContext("2d");return n.font=t,n.measureText(e).width}function addinsertCreateElement(e,t,n=null){var o=document.createElement(t);return n&&(o.id=n),e.appendChild(o),o}function insertCreateAfter(e,t,n=null){var o=document.createElement(t);n&&(o.id=n);var a=e.parentNode;return a.lastChild===e?(a.appendChild(o),o):(a.insertBefore(o,e.nextSibling),o)}function AddEvent(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}function myRemoveEvent(e,t,n){e.addEventListener?e.removeEventListener(t,n,!1):e.attachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}function diguiTooONE(e,t){return null==e||null==t?null:function e(n){var o=n.children;if(o.length=0)return null;for(let n=0;n.protyle-content .protyle-wysiwyg--select");return 1===e.length&&null!=e[0].dataset.nodeId?{id:e[0].dataset.nodeId,type:e[0].dataset.type,subtype:e[0].dataset.subtype}:null}function isPhone(){return null==document.getElementById("toolbar")}function removejscssfile(e,t){for(var n="js"==t?"script":"css"==t?"link":"none",o="js"==t?"src":"css"==t?"href":"none",a=document.getElementsByTagName(n),r=a.length;r>=0;r--)a[r]&&null!=a[r].getAttribute(o)&&-1!=a[r].getAttribute(o).indexOf(e)&&a[r].parentNode.removeChild(a[r])}function insertCreateBefore(e,t,n=null){var o=document.createElement(t);return n&&(o.id=n),e.parentElement.insertBefore(o,e),o}function compareVersion(e,t){const n=e.split("."),o=t.split("."),a=n.length,r=o.length,i=Math.min(a,r);let s=0;for(;st)return 1;if(er){for(let e=s;e \ No newline at end of file diff --git a/src/loading.gif b/src/loading.gif deleted file mode 100644 index 071ecd65ad5be0414dd952d84d0ba298e76dc59e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13999 zcmZ|01yI%d`aQe}VbiUobcd8msC0KqcO#`BsC2h*=+g2MH;09$rI1kRa$11iI*U-Z?y|+xT@g6tHmelec*$c77Zh5`4SW z2`w#EXv)Y~*qiuy4yu{hI=_Z~|7JYUoUu3ws+sKDKV6=wZP`8sRi(2RB&c;RT&Stt zy0~=B4TDODp>;LT&W?xs8_xEsUstzo<2|67?3&GGk* z;_{NXar(jC_2cmR#IL>b)x-XSZBXf$c>BVYjyC99(an6}_07%0(Nbn(Qqbf8^qs}^ zkN6vFYv}d$m9Y_YVd3=l?rx(wGv+nZlUbF98*!0fLQn_p6*I&DHDs^!qhr7!sN4IN@(9sdY z{uSum-SNrEyTLVRTJqK1-NV^d{?h*a`Hs)T=G4(azVD~0n50P?vz<=o`-g|=o#n0b z)9b0Uo7o)b_&BI87gRDsb^#TQVAcItJ-vbs52Jmbd$`zx=49R6Kb)NHff}YG=0@){ zRUb|_hL%R5AK%}-x4SdcyFVB|I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|W5*?vzJvW`jgC z7VbF;A3kQ?kb6y)Nqq3f$*4V?$9aE`_6H3_`OgW?HxQKd_nyxj3TSt|<%R<00QdII zS2Pj{e*8>)upXPbCxC?aGd>aLx@0shtMI|3HAp6&RsR9Fn*=s0JRi2cwF63c8rSn( z*q*Q14C+h#JXm#CIa3nCc~4(s@uN`0+-PX-T~V`#Zrwx3meadgi!7RK-6HivhE#w{ zJ=)KO?SY}QYdx?N9H{U;+2Aww)fQ+s=|!@O!*X{x8guyFi2O!-9HaS1o$L3T_&|A( zU)}$6$MO%LzsaFN3qTH^;^zZ^{4w!_L+g*o#eDG?%|h$P414^^3H)O$j@LT8|Jt!^ z3b+CN*O$>gSI+IZUH@P~^wvPy8!se+{wi~&RA9$a)8Lp3{I5$E?uGGwo!5@Un-|382C*eC!1 diff --git a/src/pin.svg b/src/pin.svg deleted file mode 100644 index 2ab6da3..0000000 --- a/src/pin.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/theme.js b/theme.js index f87d156..f5729ad 100644 --- a/theme.js +++ b/theme.js @@ -64,4 +64,4 @@ window.funs.addURLParam = function (url, ); } }; -window.funs.loadScript(window.funs.addURLParam("/appearance/themes/Sofill-/theme.js"), undefined, true); +window.funs.loadScript(window.funs.addURLParam("/appearance/themes/Sofill=/script/kernel.js"), undefined, true);