mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 00:50:13 +01:00
🎨 No longer limits the number of dynamically loaded blocks in the editor https://github.com/siyuan-note/siyuan/issues/12359
This commit is contained in:
parent
604f13b34a
commit
6a3095c56c
4 changed files with 2 additions and 10 deletions
|
|
@ -165,7 +165,7 @@ export const editor = {
|
||||||
<div class="b3-label__text">${window.siyuan.languages.dynamicLoadBlocksTip}</div>
|
<div class="b3-label__text">${window.siyuan.languages.dynamicLoadBlocksTip}</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="fn__space"></span>
|
<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>
|
||||||
<div class="fn__flex b3-label config__item">
|
<div class="fn__flex b3-label config__item">
|
||||||
<div class="fn__flex-1">
|
<div class="fn__flex-1">
|
||||||
|
|
@ -328,10 +328,6 @@ export const editor = {
|
||||||
dynamicLoadBlocks = 48;
|
dynamicLoadBlocks = 48;
|
||||||
(editor.element.querySelector("#dynamicLoadBlocks") as HTMLInputElement).value = "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", {
|
fetchPost("/api/setting/setEditor", {
|
||||||
fullWidth: (editor.element.querySelector("#fullWidth") as HTMLInputElement).checked,
|
fullWidth: (editor.element.querySelector("#fullWidth") as HTMLInputElement).checked,
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,7 @@ export const initEditor = () => {
|
||||||
<div class="b3-label">
|
<div class="b3-label">
|
||||||
${window.siyuan.languages.dynamicLoadBlocks}
|
${window.siyuan.languages.dynamicLoadBlocks}
|
||||||
<span class="fn__hr"></span>
|
<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 class="b3-label__text">${window.siyuan.languages.dynamicLoadBlocksTip}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="b3-label">
|
<div class="b3-label">
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,6 @@ type Editor struct {
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MinDynamicLoadBlocks = 48
|
MinDynamicLoadBlocks = 48
|
||||||
MaxDynamicLoadBlocks = 1024
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewEditor() *Editor {
|
func NewEditor() *Editor {
|
||||||
|
|
|
||||||
|
|
@ -247,9 +247,6 @@ func InitConf() {
|
||||||
if conf.MinDynamicLoadBlocks > Conf.Editor.DynamicLoadBlocks {
|
if conf.MinDynamicLoadBlocks > Conf.Editor.DynamicLoadBlocks {
|
||||||
Conf.Editor.DynamicLoadBlocks = conf.MinDynamicLoadBlocks
|
Conf.Editor.DynamicLoadBlocks = conf.MinDynamicLoadBlocks
|
||||||
}
|
}
|
||||||
if conf.MaxDynamicLoadBlocks < Conf.Editor.DynamicLoadBlocks {
|
|
||||||
Conf.Editor.DynamicLoadBlocks = conf.MaxDynamicLoadBlocks
|
|
||||||
}
|
|
||||||
if 0 > Conf.Editor.BacklinkExpandCount {
|
if 0 > Conf.Editor.BacklinkExpandCount {
|
||||||
Conf.Editor.BacklinkExpandCount = 0
|
Conf.Editor.BacklinkExpandCount = 0
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue