🎨 Improve backlink panel expansion configuration https://github.com/siyuan-note/siyuan/issues/11262

This commit is contained in:
Daniel 2024-05-11 09:50:19 +08:00
parent 032db177d3
commit 7771490175
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 6 additions and 6 deletions

View file

@ -197,13 +197,13 @@ export const initEditor = () => {
<div class="b3-label fn__displayblock">
${window.siyuan.languages.backlinkExpand}
<span class="fn__hr"></span>
<input class="b3-text-field fn__block" id="backlinkExpandCount" type="number" min="0" max="512" value="${window.siyuan.config.editor.backlinkExpandCount}"/>
<input class="b3-text-field fn__block" id="backlinkExpandCount" type="number" min="-1" max="512" value="${window.siyuan.config.editor.backlinkExpandCount}"/>
<div class="b3-label__text">${window.siyuan.languages.backlinkExpandTip}</div>
</div>
<div class="b3-label fn__displayblock">
${window.siyuan.languages.backmentionExpand}
<span class="fn__hr"></span>
<input class="b3-text-field fn__block" id="backmentionExpandCount" type="number" min="0" max="512" value="${window.siyuan.config.editor.backmentionExpandCount}"/>
<input class="b3-text-field fn__block" id="backmentionExpandCount" type="number" min="-1" max="512" value="${window.siyuan.config.editor.backmentionExpandCount}"/>
<div class="b3-label__text">${window.siyuan.languages.backmentionExpandTip}</div>
</div>
<div class="b3-label fn__displayblock">

View file

@ -249,11 +249,11 @@ func InitConf() {
if conf.MaxDynamicLoadBlocks < Conf.Editor.DynamicLoadBlocks {
Conf.Editor.DynamicLoadBlocks = conf.MaxDynamicLoadBlocks
}
if 0 > Conf.Editor.BacklinkExpandCount {
Conf.Editor.BacklinkExpandCount = 0
if -1 > Conf.Editor.BacklinkExpandCount {
Conf.Editor.BacklinkExpandCount = -1
}
if 0 > Conf.Editor.BackmentionExpandCount {
Conf.Editor.BackmentionExpandCount = 0
if -1 > Conf.Editor.BackmentionExpandCount {
Conf.Editor.BackmentionExpandCount = -1
}
if nil == Conf.Editor.Markdown {
Conf.Editor.Markdown = &util.Markdown{}