mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-12 02:04:20 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
f4d11c59a2
6 changed files with 38 additions and 26 deletions
8
.github/CONTRIBUTING.md
vendored
8
.github/CONTRIBUTING.md
vendored
|
|
@ -7,17 +7,17 @@
|
|||
|
||||
## NPM dependencies
|
||||
|
||||
Install pnpm: `npm install -g pnpm@10.14.0`
|
||||
Install pnpm: `npm install -g pnpm@10.15.0`
|
||||
|
||||
<details>
|
||||
<summary>For China mainland</summary>
|
||||
|
||||
Set the Electron mirror environment variable and install Electron:
|
||||
|
||||
* macOS/Linux: `ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@37.2.6 -D`
|
||||
* macOS/Linux: `ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@37.3.1 -D`
|
||||
* Windows:
|
||||
* `SET ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/`
|
||||
* `pnpm install electron@37.2.6 -D`
|
||||
* `pnpm install electron@37.3.1 -D`
|
||||
|
||||
NPM mirror:
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ NPM mirror:
|
|||
|
||||
Enter the app folder and execute:
|
||||
|
||||
* `pnpm install electron@37.2.6 -D`
|
||||
* `pnpm install electron@37.3.1 -D`
|
||||
* `pnpm run dev`
|
||||
* `pnpm run start`
|
||||
|
||||
|
|
|
|||
8
.github/CONTRIBUTING_zh_CN.md
vendored
8
.github/CONTRIBUTING_zh_CN.md
vendored
|
|
@ -7,17 +7,17 @@
|
|||
|
||||
## NPM 依赖
|
||||
|
||||
安装 pnpm:`npm install -g pnpm@10.14.0`
|
||||
安装 pnpm:`npm install -g pnpm@10.15.0`
|
||||
|
||||
<details>
|
||||
<summary>适用于中国大陆</summary>
|
||||
|
||||
设置 Electron 镜像环境变量并安装 Electron:
|
||||
|
||||
* macOS/Linux:`ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@37.2.6 -D`
|
||||
* macOS/Linux:`ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@37.3.1 -D`
|
||||
* Windows:
|
||||
* `SET ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/`
|
||||
* `pnpm install electron@37.2.6 -D`
|
||||
* `pnpm install electron@37.3.1 -D`
|
||||
|
||||
NPM 镜像:
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ NPM 镜像:
|
|||
|
||||
进入 app 文件夹执行:
|
||||
|
||||
* `pnpm install electron@37.2.6 -D`
|
||||
* `pnpm install electron@37.3.1 -D`
|
||||
* `pnpm run dev`
|
||||
* `pnpm run start`
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"description": "Refactor your thinking",
|
||||
"homepage": "https://b3log.org/siyuan",
|
||||
"main": "./electron/main.js",
|
||||
"packageManager": "pnpm@10.14.0",
|
||||
"packageManager": "pnpm@10.15.0",
|
||||
"scripts": {
|
||||
"lint": "eslint . --fix --cache",
|
||||
"dev": "webpack --mode development",
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
"clean-webpack-plugin": "^4.0.0",
|
||||
"css-loader": "^7.1.2",
|
||||
"dayjs": "^1.11.5",
|
||||
"electron": "37.2.6",
|
||||
"electron": "37.3.1",
|
||||
"electron-builder": "26.0.12",
|
||||
"encoding": "^0.1.13",
|
||||
"esbuild-loader": "^3.0.1",
|
||||
|
|
|
|||
16
app/pnpm-lock.yaml
generated
16
app/pnpm-lock.yaml
generated
|
|
@ -10,7 +10,7 @@ importers:
|
|||
dependencies:
|
||||
'@electron/remote':
|
||||
specifier: ^2.1.3
|
||||
version: 2.1.3(electron@37.2.6)
|
||||
version: 2.1.3(electron@37.3.1)
|
||||
devDependencies:
|
||||
'@eslint/eslintrc':
|
||||
specifier: ^3.3.1
|
||||
|
|
@ -40,8 +40,8 @@ importers:
|
|||
specifier: ^1.11.5
|
||||
version: 1.11.13
|
||||
electron:
|
||||
specifier: 37.2.6
|
||||
version: 37.2.6
|
||||
specifier: 37.3.1
|
||||
version: 37.3.1
|
||||
electron-builder:
|
||||
specifier: 26.0.12
|
||||
version: 26.0.12(electron-builder-squirrel-windows@26.0.11)
|
||||
|
|
@ -1212,8 +1212,8 @@ packages:
|
|||
resolution: {integrity: sha512-bO3y10YikuUwUuDUQRM4KfwNkKhnpVO7IPdbsrejwN9/AABJzzTQ4GeHwyzNSrVO+tEH3/Np255a3sVZpZDjvg==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
|
||||
electron@37.2.6:
|
||||
resolution: {integrity: sha512-Ns6xyxE+hIK5UlujtRlw7w4e2Ju/ImCWXf1Q/PoOhc0N3/6SN6YW7+ujCarsHbxWnolbW+1RlkHtdklUJpjbPA==}
|
||||
electron@37.3.1:
|
||||
resolution: {integrity: sha512-7DhktRLqhe6OJh/Bo75bTI0puUYEmIwSzMinocgO63mx3MVjtIn2tYMzLmAleNIlud2htkjpsMG2zT4PiTCloA==}
|
||||
engines: {node: '>= 12.20.55'}
|
||||
hasBin: true
|
||||
|
||||
|
|
@ -2886,9 +2886,9 @@ snapshots:
|
|||
- bluebird
|
||||
- supports-color
|
||||
|
||||
'@electron/remote@2.1.3(electron@37.2.6)':
|
||||
'@electron/remote@2.1.3(electron@37.3.1)':
|
||||
dependencies:
|
||||
electron: 37.2.6
|
||||
electron: 37.3.1
|
||||
|
||||
'@electron/universal@2.0.1':
|
||||
dependencies:
|
||||
|
|
@ -4065,7 +4065,7 @@ snapshots:
|
|||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
electron@37.2.6:
|
||||
electron@37.3.1:
|
||||
dependencies:
|
||||
'@electron/get': 2.0.3
|
||||
'@types/node': 22.15.3
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@ func (value *Value) SetUpdatedAt(mills int64) {
|
|||
}
|
||||
}
|
||||
|
||||
const CheckboxCheckedStr = "√"
|
||||
|
||||
func (value *Value) String(format bool) string {
|
||||
if nil == value {
|
||||
return ""
|
||||
|
|
@ -153,7 +155,7 @@ func (value *Value) String(format bool) string {
|
|||
return ""
|
||||
}
|
||||
if value.Checkbox.Checked {
|
||||
return "√"
|
||||
return CheckboxCheckedStr
|
||||
}
|
||||
return ""
|
||||
case KeyTypeRelation:
|
||||
|
|
|
|||
|
|
@ -557,11 +557,21 @@ func SetAttributeViewGroup(avID, blockID string, group *av.ViewGroup) (err error
|
|||
}
|
||||
}
|
||||
|
||||
if firstInit || changeGroupField {
|
||||
if groupKey := view.GetGroupKey(attrView); nil != groupKey && (av.KeyTypeSelect == groupKey.Type || av.KeyTypeMSelect == groupKey.Type) {
|
||||
// 首次设置分组时,如果分组字段是单选或多选类型,则将分组方式改为按选项排序 https://github.com/siyuan-note/siyuan/issues/15534
|
||||
view.Group.Order = av.GroupOrderSelectOption
|
||||
sortGroupsBySelectOption(view, groupKey)
|
||||
if firstInit || changeGroupField { // 首次设置分组时
|
||||
if groupKey := view.GetGroupKey(attrView); nil != groupKey {
|
||||
if av.KeyTypeSelect == groupKey.Type || av.KeyTypeMSelect == groupKey.Type {
|
||||
// 如果分组字段是单选或多选,则将分组排序方式改为按选项排序 https://github.com/siyuan-note/siyuan/issues/15534
|
||||
view.Group.Order = av.GroupOrderSelectOption
|
||||
sortGroupsBySelectOption(view, groupKey)
|
||||
} else if av.KeyTypeCheckbox == groupKey.Type {
|
||||
// 如果分组字段是复选框,则将分组排序改为手动排序,并且已勾选在前面
|
||||
view.Group.Order = av.GroupOrderMan
|
||||
checked := view.GetGroupByGroupValue(av.CheckboxCheckedStr)
|
||||
unchecked := view.GetGroupByGroupValue("")
|
||||
view.Groups = nil
|
||||
view.Groups = append(view.Groups, checked, unchecked)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for i, g := range view.Groups {
|
||||
|
|
@ -1857,8 +1867,8 @@ func genAttrViewGroups(view *av.View, attrView *av.AttributeView) {
|
|||
if nil == groupItemsMap[""] {
|
||||
groupItemsMap[""] = []av.Item{}
|
||||
}
|
||||
if nil == groupItemsMap["√"] {
|
||||
groupItemsMap["√"] = []av.Item{}
|
||||
if nil == groupItemsMap[av.CheckboxCheckedStr] {
|
||||
groupItemsMap[av.CheckboxCheckedStr] = []av.Item{}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue