Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2025-11-09 15:50:36 +08:00
commit a9edf35b2c
12 changed files with 37 additions and 46 deletions

View file

@ -1,8 +1,8 @@
productName: "SiYuan"
appId: "org.b3log.siyuan"
asar: false
compression: "store"
copyright: "© 2024 Yunnan Liandi Technology Co., Ltd."
compression: "normal"
copyright: "© 2020-present Yunnan Liandi Technology Co., Ltd."
artifactName: "siyuan-${version}-${os}-arm64.${ext}"
extraMetadata:
main: "electron/main.js"

View file

@ -2,7 +2,7 @@ productName: "SiYuan"
appId: "org.b3log.siyuan"
asar: false
compression: "normal"
copyright: "© 2024 Yunnan Liandi Technology Co., Ltd."
copyright: "© 2020-present Yunnan Liandi Technology Co., Ltd."
artifactName: "siyuan-${version}-${os}-arm64.${ext}"
extraMetadata:
main: "electron/main.js"

View file

@ -2,7 +2,7 @@ productName: "SiYuan"
appId: "org.b3log.siyuan"
asar: false
compression: "normal"
copyright: "© 2024 Yunnan Liandi Technology Co., Ltd."
copyright: "© 2020-present Yunnan Liandi Technology Co., Ltd."
artifactName: "siyuan-${version}-${os}.${ext}"
extraMetadata:
main: "electron/main.js"

View file

@ -1,8 +1,8 @@
productName: "SiYuan"
appId: "org.b3log.siyuan"
asar: false
compression: "store"
copyright: "© 2024 Yunnan Liandi Technology Co., Ltd."
compression: "normal"
copyright: "© 2020-present Yunnan Liandi Technology Co., Ltd."
artifactName: "siyuan-${version}-${os}-arm64.${ext}"
extraMetadata:
main: "electron/main.js"

View file

@ -1,8 +1,8 @@
productName: "SiYuan"
appId: "org.b3log.siyuan"
asar: false
compression: "store"
copyright: "© 2024 Yunnan Liandi Technology Co., Ltd."
compression: "normal"
copyright: "© 2020-present Yunnan Liandi Technology Co., Ltd."
artifactName: "siyuan-${version}-${os}.${ext}"
extraMetadata:
main: "electron/main.js"

View file

@ -1,8 +1,8 @@
productName: "SiYuan"
appId: "org.b3log.siyuan"
asar: false
compression: "store"
copyright: "© 2024 Yunnan Liandi Technology Co., Ltd."
compression: "normal"
copyright: "© 2020-present Yunnan Liandi Technology Co., Ltd."
artifactName: "siyuan-${version}-${os}.${ext}"
extraMetadata:
main: "electron/main.js"

View file

@ -2,13 +2,7 @@ import {hasClosestBlock, hasClosestByClassName} from "../../util/hasClosest";
import {focusBlock} from "../../util/selection";
import {Menu} from "../../../plugin/Menu";
import {transaction} from "../../wysiwyg/transaction";
import {
genCellValue,
genCellValueByElement,
getTypeByCellElement,
renderCell,
renderCellAttr
} from "./cell";
import {genCellValue, genCellValueByElement, getTypeByCellElement, renderCell, renderCellAttr} from "./cell";
import {fetchPost} from "../../../util/fetch";
import * as dayjs from "dayjs";
import {Constants} from "../../../constants";
@ -268,6 +262,20 @@ export const setPageSize = (options: {
return;
}
const currentPageSize = options.target.dataset.size;
menu.addItem({
iconHTML: "",
label: "5",
checked: currentPageSize === "5",
click() {
updatePageSize({
currentPageSize,
newPageSize: "5",
protyle: options.protyle,
avID: options.avID,
nodeElement: options.nodeElement
});
}
});
menu.addItem({
iconHTML: "",
label: "10",

File diff suppressed because one or more lines are too long

View file

@ -8,7 +8,7 @@ require (
github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48
github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7
github.com/88250/gulu v1.2.3-0.20251107023402-569f52804e3b
github.com/88250/lute v1.7.7-0.20251103025135-1f72e6b8cc35
github.com/88250/lute v1.7.7-0.20251109064501-546ce0f563a3
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
github.com/ClarkThan/ahocorasick v0.0.0-20231011042242-30d1ef1347f4
github.com/ConradIrwin/font v0.2.1

View file

@ -14,8 +14,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 h1:Pa5hMiBceT
github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/88250/gulu v1.2.3-0.20251107023402-569f52804e3b h1:b6Rp0KiGIkEs5O5skKFeUngQ2grxRWZ4um2Xn01ZFzs=
github.com/88250/gulu v1.2.3-0.20251107023402-569f52804e3b/go.mod h1:Wz/JGuHPqxmvGSBtXrXNWklMxNdCADIrL5+VjSgCZyo=
github.com/88250/lute v1.7.7-0.20251103025135-1f72e6b8cc35 h1:+eKHHnvO3tVDN6fhIwrISVL5nVXhMhaqZpZP+CzDdX0=
github.com/88250/lute v1.7.7-0.20251103025135-1f72e6b8cc35/go.mod h1:WYyUw//5yVw9BJnoVjx7rI/3szsISxNZCYGOqTIrV0o=
github.com/88250/lute v1.7.7-0.20251109064501-546ce0f563a3 h1:BnefWHy/uIfI6m/WY4gofo2PdXRxp3eg/a5EsgIP9Oc=
github.com/88250/lute v1.7.7-0.20251109064501-546ce0f563a3/go.mod h1:WYyUw//5yVw9BJnoVjx7rI/3szsISxNZCYGOqTIrV0o=
github.com/88250/pdfcpu v0.3.14-0.20250424122812-f10e8d9d8d46 h1:Bq1JsDfVbHKUxNL/B2JXd8cC/1h6aFjrlXpGycnh0Hk=
github.com/88250/pdfcpu v0.3.14-0.20250424122812-f10e8d9d8d46/go.mod h1:fVfOloBzs2+W2VJCCbq60XIxc3yJHAZ0Gahv1oO0gyI=
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=

View file

@ -290,6 +290,10 @@ func getAttrViewAddingBlockDefaultValues(attrView *av.AttributeView, view, group
newValue = av.GetAttributeViewDefaultValue(ast.NewNodeID(), groupKey.ID, addingItemID, groupKey.Type, false)
if av.KeyTypeText == groupView.GroupVal.Type {
content := groupView.GroupVal.Text.Content
if groupValueDefault == content {
content = ""
}
switch newValue.Type {
case av.KeyTypeBlock:
newValue.Block.Content = content

View file

@ -33,21 +33,6 @@ import (
"github.com/siyuan-note/logging"
)
func ValidOptionalPort(port string) bool {
if port == "" {
return true
}
if port[0] != ':' {
return false
}
for _, b := range port[1:] {
if b < '0' || b > '9' {
return false
}
}
return true
}
func IsLocalHostname(hostname string) bool {
if "localhost" == hostname || strings.HasSuffix(hostname, ".localhost") {
return true
@ -67,8 +52,8 @@ func IsLocalHost(host string) bool {
}
func IsLocalOrigin(origin string) bool {
if url, err := url.Parse(origin); err == nil {
return IsLocalHostname(url.Hostname())
if u, err := url.Parse(origin); err == nil {
return IsLocalHostname(u.Hostname())
}
return false
}
@ -121,7 +106,6 @@ func isOnline(checkURL string, skipTlsVerify bool, timeout int) (ret bool) {
for i := 0; i < 2; i++ {
resp, err := c.R().Get(checkURL)
if resp.GetHeader("Location") != "" {
return true
}
@ -140,8 +124,8 @@ func isOnline(checkURL string, skipTlsVerify bool, timeout int) (ret bool) {
break
}
time.Sleep(1 * time.Second)
logging.LogWarnf("check url [%s] is online failed: %s", checkURL, err)
time.Sleep(1 * time.Second)
}
return
}
@ -181,11 +165,6 @@ func InvalidIDPattern(idArg string, result *gulu.Result) bool {
return true
}
func IsValidURL(str string) bool {
_, err := url.Parse(str)
return err == nil
}
func initHttpClient() {
http.DefaultClient = httpclient.GetCloudFileClient2Min()
http.DefaultTransport = httpclient.NewTransport(false)