Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Apr 16, 2024
2 parents a5e32d6 + 9b64cf0 commit 22b878c
Show file tree
Hide file tree
Showing 19 changed files with 49 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ jobs:

- name: Build the Docker image
run: |
docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8 -t b3log/siyuan:latest -t b3log/siyuan:v3.0.9 .
docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8 -t b3log/siyuan:latest -t b3log/siyuan:v3.0.10 .
2 changes: 1 addition & 1 deletion app/appx/AppxManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Identity Name="89C2A984.SiYuan"
ProcessorArchitecture="x64"
Publisher="CN=087C656E-C1D9-42D8-8807-CED45A74FC0F"
Version="3.0.9.0"/>
Version="3.0.10.0"/>
<Properties>
<DisplayName>SiYuan</DisplayName>
<PublisherDisplayName>云南链滴科技有限公司</PublisherDisplayName>
Expand Down
2 changes: 2 additions & 0 deletions app/changelogs/v3.0.10/v3.0.10.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Below are the detailed changes in this version.
* [Add database `lineNumber` field type](https://github.com/siyuan-note/siyuan/pull/11008)
* [Improve mobile app appearance language setting](https://github.com/siyuan-note/siyuan/issues/11009)
* [Improve database template field calc](https://github.com/siyuan-note/siyuan/issues/11011)
* [Improve database unbind block](https://github.com/siyuan-note/siyuan/issues/11013)
* [Improve database checkbox field sorting](https://github.com/siyuan-note/siyuan/issues/11016)
* [The block icon menu will no longer be displayed after selecting Delete through the block icon menu](https://github.com/siyuan-note/siyuan/issues/11028)
* [Improve database template field to use relation/rollup field](https://github.com/siyuan-note/siyuan/issues/11029)
Expand All @@ -46,6 +47,7 @@ Below are the detailed changes in this version.
* [Hyperlinks affect backlink calculation issue](https://github.com/siyuan-note/siyuan/issues/11001)
* [Dynamic loading results in incomplete list display](https://github.com/siyuan-note/siyuan/issues/11004)
* [Primary key value unexpectedly updated when database adds row](https://github.com/siyuan-note/siyuan/issues/11018)
* [The floating window disappears when editing a new row in the database in the floating window](https://github.com/siyuan-note/siyuan/issues/11046)

## Download

Expand Down
2 changes: 2 additions & 0 deletions app/changelogs/v3.0.10/v3.0.10_zh_CHT.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* [新增資料庫 `行號` 欄位類型](https://github.com/siyuan-note/siyuan/pull/11008)
* [改進行動應用程式外觀語言設定](https://github.com/siyuan-note/siyuan/issues/11009)
* [改進資料庫範本欄位計算](https://github.com/siyuan-note/siyuan/issues/11011)
* [改進資料庫解綁區塊](https://github.com/siyuan-note/siyuan/issues/11013)
* [改進資料庫勾選方塊欄位排序](https://github.com/siyuan-note/siyuan/issues/11016)
* [透過區塊圖示選單選擇刪除後,區塊圖示選單將不再顯示](https://github.com/siyuan-note/siyuan/issues/11028)
* [改進資料庫範本欄位使用關聯/匯總欄位](https://github.com/siyuan-note/siyuan/issues/11029)
Expand All @@ -46,6 +47,7 @@
* [超連結影響反向連結計算問題](https://github.com/siyuan-note/siyuan/issues/11001)
* [動態載入導致清單顯示不完整](https://github.com/siyuan-note/siyuan/issues/11004)
* [資料庫新增行時主鍵值意外更新](https://github.com/siyuan-note/siyuan/issues/11018)
* [在浮動浮窗中編輯資料庫新建一行時浮窗消失](https://github.com/siyuan-note/siyuan/issues/11046)

## 下載

Expand Down
2 changes: 2 additions & 0 deletions app/changelogs/v3.0.10/v3.0.10_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* [添加数据库 `行号` 字段类型](https://github.com/siyuan-note/siyuan/pull/11008)
* [改进移动应用程序外观语言设置](https://github.com/siyuan-note/siyuan/issues/11009)
* [改进数据库模板字段计算](https://github.com/siyuan-note/siyuan/issues/11011)
* [改进数据库解绑块](https://github.com/siyuan-note/siyuan/issues/11013)
* [改进数据库勾选框字段排序](https://github.com/siyuan-note/siyuan/issues/11016)
* [通过块图标菜单选择删除后,块图标菜单将不再显示](https://github.com/siyuan-note/siyuan/issues/11028)
* [改进数据库模板字段使用关联/汇总字段](https://github.com/siyuan-note/siyuan/issues/11029)
Expand All @@ -46,6 +47,7 @@
* [超链接影响反向链接计算问题](https://github.com/siyuan-note/siyuan/issues/11001)
* [动态加载导致列表显示不完整](https://github.com/siyuan-note/siyuan/issues/11004)
* [数据库添加行时主键值意外更新](https://github.com/siyuan-note/siyuan/issues/11018)
* [在浮动浮窗中编辑数据库新建一行时浮窗消失](https://github.com/siyuan-note/siyuan/issues/11046)

## 下载

Expand Down
4 changes: 2 additions & 2 deletions app/electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -713,8 +713,8 @@ app.whenReady().then(() => {
}), new MenuItem({
role: "selectAll", label: langs.selectAll
})];
const menu = Menu.buildFromTemplate(template)
menu.popup({window: BrowserWindow.fromWebContents(event.sender)})
const menu = Menu.buildFromTemplate(template);
menu.popup({window: BrowserWindow.fromWebContents(event.sender)});
});
ipcMain.on("siyuan-open-folder", (event, filePath) => {
shell.showItemInFolder(filePath);
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SiYuan",
"version": "3.0.9",
"version": "3.0.10",
"description": "Refactor your thinking",
"homepage": "https://b3log.org/siyuan",
"main": "./electron/main.js",
Expand Down
4 changes: 2 additions & 2 deletions app/src/boot/globalEvent/keydown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
srcIDs: sourceIds,
avID,
}]);
focusByRange(range)
focusByRange(range);
});
} else {
const selectElement: Element[] = [];
Expand Down Expand Up @@ -363,7 +363,7 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
srcIDs: sourceIds,
avID,
}]);
focusByRange(range)
focusByRange(range);
});
}
event.preventDefault();
Expand Down
2 changes: 1 addition & 1 deletion app/src/layout/dock/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export const openOutline = async (protyle: IProtyle) => {
}
}), false, false);
newWnd.element.style.width = "200px";
newWnd.element.classList.remove("fn__flex-1")
newWnd.element.classList.remove("fn__flex-1");
switchWnd(newWnd, wnd);
fixWndFlex1(newWnd.parent);
saveLayout();
Expand Down
24 changes: 12 additions & 12 deletions app/src/layout/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ export const adjustLayout = (layout: Layout = window.siyuan.layout.centerLayout.

export const fixWndFlex1 = (layout: Layout) => {
if (layout.children.length < 2) {
return
return;
}
if (layout.children[layout.children.length - 2].element.classList.contains("fn__flex-1")) {
return;
Expand All @@ -919,27 +919,27 @@ export const fixWndFlex1 = (layout: Layout) => {
if (index !== layout.children.length - 2) {
if (layout.direction === "lr") {
if (item.element.classList.contains("fn__flex-1")) {
item.element.style.width = item.element.clientWidth + "px"
item.element.classList.remove("fn__flex-1")
item.element.style.width = item.element.clientWidth + "px";
item.element.classList.remove("fn__flex-1");
}
} else {
if (item.element.classList.contains("fn__flex-1")) {
item.element.style.height = item.element.clientHeight + "px"
item.element.classList.remove("fn__flex-1")
item.element.style.height = item.element.clientHeight + "px";
item.element.classList.remove("fn__flex-1");
}
}
}
})
const flex1Element = layout.children[layout.children.length - 2].element
});
const flex1Element = layout.children[layout.children.length - 2].element;
if (layout.direction === "lr") {
if (flex1Element.style.width) {
flex1Element.style.width = ""
flex1Element.classList.add("fn__flex-1")
flex1Element.style.width = "";
flex1Element.classList.add("fn__flex-1");
}
} else {
if (flex1Element.style.height) {
flex1Element.style.height = ""
flex1Element.classList.add("fn__flex-1")
flex1Element.style.height = "";
flex1Element.classList.add("fn__flex-1");
}
}
}
};
4 changes: 2 additions & 2 deletions app/src/protyle/gutter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ export class Gutter {
});
}
}).element);
const range = getSelection().rangeCount > 0 ? getSelection().getRangeAt(0) : undefined
const range = getSelection().rangeCount > 0 ? getSelection().getRangeAt(0) : undefined;
window.siyuan.menus.menu.append(new MenuItem({
label: window.siyuan.languages.addToDatabase,
accelerator: window.siyuan.config.keymap.general.addToDatabase.custom,
Expand Down Expand Up @@ -1279,7 +1279,7 @@ export class Gutter {
});
}
}).element);
const range = getSelection().rangeCount > 0 ? getSelection().getRangeAt(0) : undefined
const range = getSelection().rangeCount > 0 ? getSelection().getRangeAt(0) : undefined;
window.siyuan.menus.menu.append(new MenuItem({
label: window.siyuan.languages.addToDatabase,
accelerator: window.siyuan.config.keymap.general.addToDatabase.custom,
Expand Down
2 changes: 1 addition & 1 deletion app/src/protyle/header/openTitleMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const openTitleMenu = (protyle: IProtyle, position: IPosition) => {
}).element);
if (!protyle.disabled) {
window.siyuan.menus.menu.append(movePathToMenu([protyle.path]));
const range = getSelection().rangeCount > 0 ? getSelection().getRangeAt(0) : undefined
const range = getSelection().rangeCount > 0 ? getSelection().getRangeAt(0) : undefined;
window.siyuan.menus.menu.append(new MenuItem({
label: window.siyuan.languages.addToDatabase,
accelerator: window.siyuan.config.keymap.general.addToDatabase.custom,
Expand Down
2 changes: 1 addition & 1 deletion app/src/protyle/render/av/cell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ export const updateCellsValue = (protyle: IProtyle, nodeElement: HTMLElement, va
return;
}
if (type === "block" && !item.dataset.detached) {
const newId = Lute.NewNodeID()
const newId = Lute.NewNodeID();
doOperations.push({
action: "unbindAttrViewBlock",
id: rowID,
Expand Down
18 changes: 9 additions & 9 deletions app/src/protyle/render/av/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ const toggleEmpty = (element: HTMLElement, operator: string, type: TAVCol) => {

const filterSelect = (key: string) => {
window.siyuan.menus.menu.element.querySelectorAll(".b3-menu__item").forEach((item) => {
const nameElement = item.querySelector(".b3-chip.b3-chip--middle") as HTMLElement
const nameElement = item.querySelector(".b3-chip.b3-chip--middle") as HTMLElement;
if (nameElement) {
const itemName = nameElement.dataset.name.toLowerCase()
const itemName = nameElement.dataset.name.toLowerCase();
if (!key || (key.indexOf(itemName) > -1 || itemName.indexOf(key) > -1)) {
item.classList.remove("fn__none");
} else {
item.classList.add("fn__none");
}
}
})
}
});
};

export const setFilter = async (options: {
filter: IAVFilter,
Expand Down Expand Up @@ -332,7 +332,7 @@ export const setFilter = async (options: {
type: "readonly",
label: `<input class="b3-text-field fn__block" style="margin: 4px 0" placeholder="${window.siyuan.languages.search}">`,
bind(element) {
const selectSearchElement = element.querySelector("input")
const selectSearchElement = element.querySelector("input");
selectSearchElement.addEventListener("keydown", (event: KeyboardEvent) => {
if (event.isComposing) {
return;
Expand All @@ -344,18 +344,18 @@ export const setFilter = async (options: {
}
currentElement.dispatchEvent(new CustomEvent("click"));
}
})
});
selectSearchElement.addEventListener("input", (event: InputEvent) => {
if (event.isComposing) {
return;
}
filterSelect(selectSearchElement.value.toLowerCase());
})
});
selectSearchElement.addEventListener("compositionend", () => {
filterSelect(selectSearchElement.value.toLowerCase());
})
});
}
})
});
}
colData.options?.forEach((option) => {
let icon = "iconUncheck";
Expand Down
2 changes: 1 addition & 1 deletion app/src/protyle/render/highlightRender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) =
};

export const lineNumberRender = (block: HTMLElement) => {
const lineNumber = block.parentElement.getAttribute("lineNumber")
const lineNumber = block.parentElement.getAttribute("lineNumber");
if (lineNumber === "false") {
return;
}
Expand Down
12 changes: 6 additions & 6 deletions app/src/protyle/upload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,20 @@ const genUploadedLabel = (responseText: string, protyle: IProtyle) => {
});

if ((nodeElement && nodeElement.classList.contains("av"))) {
const cellElements: HTMLElement[] = []
const cellElements: HTMLElement[] = [];
nodeElement.querySelectorAll(".av__row--select:not(.av__row--header)").forEach(item => {
item.querySelectorAll(".av__cell").forEach((cellItem: HTMLElement) => {
if (getTypeByCellElement(cellItem) === "mAsset") {
cellElements.push(cellItem);
}
})
})
});
});
if (cellElements.length === 0) {
protyle.wysiwyg.element.querySelectorAll(".av__cell--active").forEach((item: HTMLElement) => {
if (getTypeByCellElement(item) === "mAsset") {
cellElements.push(item);
}
})
});
}
if (cellElements.length > 0) {
updateCellsValue(protyle, nodeElement, avAssets, cellElements);
Expand All @@ -170,12 +170,12 @@ const genUploadedLabel = (responseText: string, protyle: IProtyle) => {
}

if (document.querySelector(".av__panel")) {
const cellElements: HTMLElement[] = []
const cellElements: HTMLElement[] = [];
protyle.wysiwyg.element.querySelectorAll(".av__cell--active").forEach((item: HTMLElement) => {
if (getTypeByCellElement(item) === "mAsset") {
cellElements.push(item);
}
})
});
if (cellElements.length > 0) {
const blockElement = hasClosestBlock(cellElements[0]);
if (blockElement) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/protyle/util/selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ export const focusBlock = (element: Element, parentElement?: HTMLElement, toStar
range.collapse(true);
setRange = true;
} else if (type === "NodeAttributeView") {
const cursorElement = element.querySelector(".av__cursor")
const cursorElement = element.querySelector(".av__cursor");
if (cursorElement) {
range.setStart(cursorElement.firstChild, 0);
setRange = true;
Expand Down
2 changes: 1 addition & 1 deletion app/src/protyle/wysiwyg/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:
return;
}
if (blockElement.classList.contains("av")) {
const avCursorElement = hasClosestByClassName(range.startContainer, "av__cursor")
const avCursorElement = hasClosestByClassName(range.startContainer, "av__cursor");
if (avCursorElement) {
range.startContainer.textContent = Constants.ZWSP;
} else {
Expand Down
2 changes: 1 addition & 1 deletion kernel/util/working.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import (
var Mode = "prod"

const (
Ver = "3.0.9"
Ver = "3.0.10"
IsInsider = false
)

Expand Down

0 comments on commit 22b878c

Please sign in to comment.