Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
e382d9db0e
6 changed files with 5 additions and 13 deletions
|
@ -165,7 +165,7 @@ export const editor = {
|
|||
<div class="b3-label__text">${window.siyuan.languages.dynamicLoadBlocksTip}</div>
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-text-field fn__flex-center fn__size200" id="dynamicLoadBlocks" type="number" min="48" max="1024" value="${window.siyuan.config.editor.dynamicLoadBlocks}"/>
|
||||
<input class="b3-text-field fn__flex-center fn__size200" id="dynamicLoadBlocks" type="number" min="48" value="${window.siyuan.config.editor.dynamicLoadBlocks}"/>
|
||||
</div>
|
||||
<div class="fn__flex b3-label config__item">
|
||||
<div class="fn__flex-1">
|
||||
|
@ -328,10 +328,6 @@ export const editor = {
|
|||
dynamicLoadBlocks = 48;
|
||||
(editor.element.querySelector("#dynamicLoadBlocks") as HTMLInputElement).value = "48";
|
||||
}
|
||||
if (1024 < dynamicLoadBlocks) {
|
||||
dynamicLoadBlocks = 1024;
|
||||
(editor.element.querySelector("#dynamicLoadBlocks") as HTMLInputElement).value = "1024";
|
||||
}
|
||||
|
||||
fetchPost("/api/setting/setEditor", {
|
||||
fullWidth: (editor.element.querySelector("#fullWidth") as HTMLInputElement).checked,
|
||||
|
|
|
@ -195,7 +195,7 @@ export const initEditor = () => {
|
|||
<div class="b3-label">
|
||||
${window.siyuan.languages.dynamicLoadBlocks}
|
||||
<span class="fn__hr"></span>
|
||||
<input class="b3-text-field fn__block" id="dynamicLoadBlocks" type="number" min="48" max="1024" value="${window.siyuan.config.editor.dynamicLoadBlocks}"/>
|
||||
<input class="b3-text-field fn__block" id="dynamicLoadBlocks" type="number" min="48" value="${window.siyuan.config.editor.dynamicLoadBlocks}"/>
|
||||
<div class="b3-label__text">${window.siyuan.languages.dynamicLoadBlocksTip}</div>
|
||||
</div>
|
||||
<div class="b3-label">
|
||||
|
|
|
@ -126,7 +126,7 @@ export class Options {
|
|||
url: Constants.UPLOAD_ADDRESS,
|
||||
extraData: {},
|
||||
fieldName: "file[]",
|
||||
filename: (name: string) => name.replace(/[\\/:*?"'<>|]/g, ""),
|
||||
filename: (name: string) => name.replace(/[\\/:*?"'<>|\[\]\(\)~!`&{}=#%$]/g, ""),
|
||||
linkToImgUrl: "",
|
||||
withCredentials: false,
|
||||
}
|
||||
|
|
|
@ -56,7 +56,6 @@ type Editor struct {
|
|||
|
||||
const (
|
||||
MinDynamicLoadBlocks = 48
|
||||
MaxDynamicLoadBlocks = 1024
|
||||
)
|
||||
|
||||
func NewEditor() *Editor {
|
||||
|
|
|
@ -247,9 +247,6 @@ func InitConf() {
|
|||
if conf.MinDynamicLoadBlocks > Conf.Editor.DynamicLoadBlocks {
|
||||
Conf.Editor.DynamicLoadBlocks = conf.MinDynamicLoadBlocks
|
||||
}
|
||||
if conf.MaxDynamicLoadBlocks < Conf.Editor.DynamicLoadBlocks {
|
||||
Conf.Editor.DynamicLoadBlocks = conf.MaxDynamicLoadBlocks
|
||||
}
|
||||
if 0 > Conf.Editor.BacklinkExpandCount {
|
||||
Conf.Editor.BacklinkExpandCount = 0
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ func InsertLocalAssets(id string, assetPaths []string, isUpload bool) (succMap m
|
|||
return
|
||||
}
|
||||
f.Close()
|
||||
succMap[fName] = "assets/" + fName
|
||||
succMap[baseName] = "assets/" + fName
|
||||
}
|
||||
}
|
||||
IncSync()
|
||||
|
@ -284,7 +284,7 @@ func Upload(c *gin.Context) {
|
|||
os.RemoveAll(tmpDir2)
|
||||
}
|
||||
|
||||
succMap[fName] = strings.TrimPrefix(path.Join(relAssetsDirPath, fName), "/")
|
||||
succMap[baseName] = strings.TrimPrefix(path.Join(relAssetsDirPath, fName), "/")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue