mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
Compare commits
7 commits
9a605e8692
...
a62593b2f4
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a62593b2f4 | ||
![]() |
bbd49a7b19 | ||
![]() |
605959ba27 | ||
![]() |
4a3bd72a5e | ||
![]() |
1d6a2c5d33 | ||
![]() |
b50789fa3a | ||
![]() |
2ed6bc0de7 |
8 changed files with 76 additions and 13 deletions
|
@ -44,6 +44,7 @@
|
|||
* [Unraid 部署](#unraid-部署)
|
||||
* [宝塔面板 部署](#宝塔面板部署)
|
||||
* [小皮面板 部署](#小皮面板部署)
|
||||
* [1Panel面板 部署](#1Panel面板部署)
|
||||
* [内部预览版](#内部预览版)
|
||||
* [🏘️ 社区](#️-社区)
|
||||
* [🛠️ 开发指南](#️-开发指南)
|
||||
|
@ -361,6 +362,42 @@ Publish parameters: --accessAuthCode=******(访问授权码)
|
|||
|
||||
</details>
|
||||
|
||||
### 1Panel面板部署
|
||||
|
||||
<details>
|
||||
<summary>1Panel面板 部署文档</summary>
|
||||
|
||||
#### 前提
|
||||
|
||||
- 仅适用于1Panel面板v1.10.32-lts及以上版本
|
||||
- 安装1Panel面板,前往[1Panel](https://1panel.cn/)官网,选择正式版安装脚本下载安装
|
||||
|
||||
#### 部署
|
||||
|
||||
1. 登录1Panel面板,在左侧菜单栏中点击 `应用商店`
|
||||
2. 在 `应用商店-实用工具` 中找到 `思源笔记`,点击`安装`,也可以在搜索框直接搜索
|
||||
3. 配置访问授权码等基本信息,点击 `确定`
|
||||
|
||||
- 名称:应用名称,默认 `siyuan`
|
||||
- 版本:默认最新发行版
|
||||
- 端口:默认 `6806`
|
||||
- 访问授权码:访问笔记时需要使用的`访问密码`
|
||||
- 端口外部访问:如你需通过 `IP+Port` 直接访问,请勾选,同时会开放服务器防火墙端口
|
||||
- CPU限制:默认为0,不限制,可根据实际需要设置
|
||||
- 内存限制:默认为0,不限制,可根据实际需要设置
|
||||
4. 提交后面板会自动进行应用安装启动,应用状态会变为`安装中`,大概需要`1-3`分钟,耐心等待安装完成
|
||||
5. 当应用状态变为`已启动`后,点击左侧的网站,首次使用需要安装`OpenResty`,点击`安装`
|
||||
6. 安装完成后,点击`网站`菜单栏左上角`创建`,在弹出的页面中选择`反向代理`
|
||||
7. 在`主域名`填入你的域名,网站代号会自动生成,代理选择`http`,代理地址填写`127.0.0.1:6806`,点击`确定`
|
||||
8. (可选) 配置你创建的网站,可根据需要配置`https`访问增强访问安全性
|
||||
|
||||
#### 访问思源笔记
|
||||
|
||||
- 如果你通过`OpenResty`反向代理反代了网站,并且填写了域名,请在浏览器输入`域名`访问
|
||||
- 如你选择了 `端口外部访问`,请在浏览器地输入 `http://<1Panel面板IP>:6806` 访问
|
||||
|
||||
</details>
|
||||
|
||||
### 内部预览版
|
||||
|
||||
我们会在有重大更新前发布内部预览版,请访问 [https://github.com/siyuan-note/insider](https://github.com/siyuan-note/insider)。
|
||||
|
|
|
@ -74,4 +74,8 @@
|
|||
left: -8px;
|
||||
bottom: 8px;
|
||||
}
|
||||
|
||||
&__move {
|
||||
cursor: move;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,12 @@
|
|||
display: inline-block;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
&--5 {
|
||||
width: 5px;
|
||||
display: inline-block;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&__hr {
|
||||
|
|
|
@ -138,7 +138,7 @@ export const genAVValueHTML = (value: IAVCellValue) => {
|
|||
if (item && item.block) {
|
||||
const rowID = value.relation.blockIDs[index];
|
||||
if (item?.isDetached) {
|
||||
html += `<span data-row-id="${rowID}" class="av__cell--relation"><span class="b3-menu__avemoji">➖</span><span class="av__celltext">${Lute.EscapeHTMLStr(item.block.content || window.siyuan.languages.untitled)}</span></span>`;
|
||||
html += `<span data-row-id="${rowID}" class="av__cell--relation"><span>➖<span class="fn__space--5"></span></span><span class="av__celltext">${Lute.EscapeHTMLStr(item.block.content || window.siyuan.languages.untitled)}</span></span>`;
|
||||
} else {
|
||||
// data-block-id 用于更新 emoji
|
||||
html += `<span data-row-id="${rowID}" class="av__cell--relation" data-block-id="${item.block.id}"><span class="b3-menu__avemoji" data-unicode="${item.block.icon || ""}">${unicode2Emoji(item.block.icon || window.siyuan.storage[Constants.LOCAL_IMAGES].file)}</span><span data-type="block-ref" data-id="${item.block.id}" data-subtype="s" class="av__celltext av__celltext--ref">${Lute.EscapeHTMLStr(item.block.content || window.siyuan.languages.untitled)}</span></span>`;
|
||||
|
|
|
@ -131,7 +131,7 @@ export const openCalcMenu = async (protyle: IProtyle, calcElement: HTMLElement,
|
|||
blockID,
|
||||
target: calcElement
|
||||
});
|
||||
if (panelData?.data) {
|
||||
if (panelData?.data && type !== "checkbox") {
|
||||
// 汇总字段汇总方式中才有“显示唯一值”选项 Add "Show unique values" to the calculation of the database rollup field https://github.com/siyuan-note/siyuan/issues/15852
|
||||
calcItem({
|
||||
menu,
|
||||
|
|
|
@ -993,21 +993,27 @@ export const renderCell = (cellValue: IAVCellValue, rowIndex = 0, showIcon = tru
|
|||
}
|
||||
text += "</div>";
|
||||
} else if (cellValue.type === "rollup") {
|
||||
let rollupType;
|
||||
cellValue?.rollup?.contents?.forEach((item) => {
|
||||
const rollupText = ["template", "select", "mSelect", "mAsset", "checkbox", "relation"].includes(item.type) ? renderCell(item, rowIndex, showIcon, type) : renderRollup(item, showIcon);
|
||||
const rollupText = ["template", "select", "mSelect", "mAsset", "relation"].includes(item.type) ? renderCell(item, rowIndex, showIcon, type) : renderRollup(item, showIcon);
|
||||
if (rollupText) {
|
||||
text += rollupText + ", ";
|
||||
text += rollupText + (item.type === "checkbox" ? "" : ", ");
|
||||
}
|
||||
rollupType = item.type;
|
||||
});
|
||||
if (text && text.endsWith(", ")) {
|
||||
text = text.substring(0, text.length - 2);
|
||||
if (text) {
|
||||
if (rollupType === "checkbox") {
|
||||
text = `<div class="fn__flex">${text}</div>`;
|
||||
} else if (text.endsWith(", ")) {
|
||||
text = text.substring(0, text.length - 2);
|
||||
}
|
||||
}
|
||||
} else if (cellValue.type === "relation") {
|
||||
cellValue?.relation?.contents?.forEach((item, index) => {
|
||||
if (item && item.block) {
|
||||
const rowID = cellValue.relation.blockIDs[index];
|
||||
if (item?.isDetached) {
|
||||
text += `<span data-row-id="${rowID}" class="av__cell--relation"><span class="b3-menu__avemoji${showIcon ? "" : " fn__none"}">➖</span><span class="av__celltext">${Lute.EscapeHTMLStr(item.block.content || window.siyuan.languages.untitled)}</span></span>`;
|
||||
text += `<span data-row-id="${rowID}" class="av__cell--relation"><span class="${showIcon ? "" : " fn__none"}">➖<span class="fn__space--5"></span></span><span class="av__celltext">${Lute.EscapeHTMLStr(item.block.content || window.siyuan.languages.untitled)}</span></span>`;
|
||||
} else {
|
||||
// data-block-id 用于更新 emoji
|
||||
text += `<span data-row-id="${rowID}" class="av__cell--relation" data-block-id="${item.block.id}"><span class="b3-menu__avemoji${showIcon ? "" : " fn__none"}" data-unicode="${item.block.icon || ""}">${unicode2Emoji(item.block.icon || window.siyuan.storage[Constants.LOCAL_IMAGES].file)}</span><span data-type="block-ref" data-id="${item.block.id}" data-subtype="s" class="av__celltext av__celltext--ref">${Lute.EscapeHTMLStr(item.block.content || window.siyuan.languages.untitled)}</span></span>`;
|
||||
|
@ -1050,6 +1056,8 @@ const renderRollup = (cellValue: IAVCellValue, showIcon: boolean) => {
|
|||
}
|
||||
} else if (cellValue.type === "number") {
|
||||
text = cellValue?.number.formattedContent || cellValue?.number.content.toString() || "";
|
||||
} else if (cellValue.type === "checkbox") {
|
||||
text += `<svg class="av__checkbox"><use xlink:href="#icon${cellValue?.checkbox?.checked ? "Check" : "Uncheck"}"></use></svg><span class="fn__space"></span>`;
|
||||
} else if (["date", "updated", "created"].includes(cellValue.type)) {
|
||||
const dataValue = cellValue ? cellValue[cellValue.type as "date"] : null;
|
||||
if (dataValue.formattedContent) {
|
||||
|
|
|
@ -901,7 +901,7 @@ export class Toolbar {
|
|||
this.subElement.style.padding = "0";
|
||||
}
|
||||
this.subElement.innerHTML = `<div ${(isPin && this.subElement.firstElementChild.getAttribute("data-drag") === "true") ? 'data-drag="true"' : ""}><div class="block__icons block__icons--menu fn__flex" style="border-radius: var(--b3-border-radius-b) var(--b3-border-radius-b) 0 0;">
|
||||
<span class="fn__flex-1 resize__move">
|
||||
<span class="fn__flex-1 resize__move" style="line-height: 24px;">
|
||||
${title}
|
||||
</span>
|
||||
<span class="fn__space"></span>
|
||||
|
|
|
@ -51,11 +51,19 @@ export const scrollCenter = (protyle: IProtyle, nodeElement?: Element, top = fal
|
|||
brElement.remove();
|
||||
return;
|
||||
}
|
||||
// undo 时禁止数据库滚动
|
||||
if (blockElement.classList.contains("av") && blockElement.dataset.render === "true" && (
|
||||
blockElement.querySelector(".av__row--header")?.getAttribute("style")?.indexOf("transform") > -1 ||
|
||||
blockElement.querySelector(".av__row--footer")?.getAttribute("style")?.indexOf("transform") > -1
|
||||
)) {
|
||||
|
||||
if (blockElement.classList.contains("av") && blockElement.dataset.render === "true") {
|
||||
// undo 时禁止数据库滚动
|
||||
if (blockElement.querySelector(".av__row--header")?.getAttribute("style")?.indexOf("transform") > -1 ||
|
||||
blockElement.querySelector(".av__row--footer")?.getAttribute("style")?.indexOf("transform") > -1) {
|
||||
return;
|
||||
}
|
||||
const activeElement = blockElement.querySelector(".av__cell--select, .av__row--select, .av__gallery-item--select");
|
||||
if (activeElement) {
|
||||
activeElement.scrollIntoView({block: "nearest", behavior});
|
||||
} else {
|
||||
blockElement.scrollIntoView({block: "nearest", behavior});
|
||||
}
|
||||
return;
|
||||
}
|
||||
// 撤销时 br 插入删除会导致 rang 被修改 https://github.com/siyuan-note/siyuan/issues/12679
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue