mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
fix: optimize TOC initialization with a timeout and clean up button spacing in decryptor
This commit is contained in:
+6
-5
@@ -1268,10 +1268,12 @@ class FixIt {
|
||||
this.initFootnotes();
|
||||
this.initTooltip();
|
||||
if (includeToc) {
|
||||
this.fixTocScroll();
|
||||
this.initToc();
|
||||
this.initTocListener();
|
||||
this.initTocDialog();
|
||||
window.setTimeout(() => {
|
||||
this.fixTocScroll();
|
||||
this.initToc();
|
||||
this.initTocListener();
|
||||
this.initTocDialog();
|
||||
}, 100);
|
||||
}
|
||||
this.initPangu();
|
||||
this.initMathJax();
|
||||
@@ -1499,7 +1501,6 @@ class FixIt {
|
||||
this.initReward();
|
||||
this.initPostChatUser();
|
||||
|
||||
// [todo] refactor async init toc
|
||||
window.setTimeout(() => {
|
||||
this.initComment();
|
||||
if (!this.config.encryption?.all) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- hugo.Store.Set "version" "v0.4.4-20260306024648-423a7ddb" -}}
|
||||
{{- hugo.Store.Set "version" "v0.4.4-20260308095742-fda650ad" -}}
|
||||
{{- .Store.Set "this" dict -}}
|
||||
|
||||
{{- partial "init/detection-env.html" . -}}
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
<input type="password" id="{{ $id }}" class="fixit-decryptor-input" placeholder="🔑 {{ $message }}" />
|
||||
</label>
|
||||
<button class="fixit-decryptor-btn">
|
||||
{{- dict "Class" "fa-solid fa-unlock" | partial "plugin/icon.html" }} {{ T "single.enterBtn" -}}
|
||||
{{- dict "Class" "fa-solid fa-unlock" | partial "plugin/icon.html" }}{{ T "single.enterBtn" -}}
|
||||
</button>
|
||||
{{- if not .IsPartial -}}
|
||||
<button class="fixit-encryptor-btn">
|
||||
{{- dict "Class" "fa-solid fa-lock" | partial "plugin/icon.html" }} {{ T "single.encryptyAgain" -}}
|
||||
{{- dict "Class" "fa-solid fa-lock" | partial "plugin/icon.html" }}{{ T "single.encryptyAgain" -}}
|
||||
</button>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
<input type="password" id="fixit-decryptor-input" class="fixit-decryptor-input d-none" placeholder="🔑 {{ $msg }}" />
|
||||
</label>
|
||||
<button class="fixit-decryptor-btn d-none">
|
||||
{{- dict "Class" "fa-solid fa-unlock" | partial "plugin/icon.html" }} {{ T "single.enterBtn" -}}
|
||||
{{- dict "Class" "fa-solid fa-unlock" | partial "plugin/icon.html" }}{{ T "single.enterBtn" -}}
|
||||
</button>
|
||||
<button class="fixit-encryptor-btn d-none">
|
||||
{{- dict "Class" "fa-solid fa-lock" | partial "plugin/icon.html" }} {{ T "single.encryptyAgain" -}}
|
||||
{{- dict "Class" "fa-solid fa-lock" | partial "plugin/icon.html" }}{{ T "single.encryptyAgain" -}}
|
||||
</button>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user