Fix settings bug.. again.
This commit is contained in:
parent
f1ace2f821
commit
9ae1e5220f
2 changed files with 6 additions and 4 deletions
|
|
@ -47,13 +47,13 @@ const t = useTranslations(lang);
|
||||||
<div id="current-content"></div>
|
<div id="current-content"></div>
|
||||||
</div>
|
</div>
|
||||||
<script is:inline>
|
<script is:inline>
|
||||||
|
window.loadedContentStorage = {};
|
||||||
|
window.currentlySelectedTab;
|
||||||
function settingsLoad() {
|
function settingsLoad() {
|
||||||
document.addEventListener("astro:after-swap", () => {
|
document.addEventListener("astro:after-swap", () => {
|
||||||
window.currentlySelectedTab = "";
|
window.currentlySelectedTab = "";
|
||||||
document.removeEventListener("setting-tabChange", determineListener);
|
document.removeEventListener("setting-tabChange", determineListener);
|
||||||
});
|
});
|
||||||
window.currentlySelectedTab;
|
|
||||||
window.loadedContentStorage = {};
|
|
||||||
Array.from(document.getElementsByClassName("setting-tab")).forEach((tab) => {
|
Array.from(document.getElementsByClassName("setting-tab")).forEach((tab) => {
|
||||||
let contentToLoad = document.getElementById("content-" + tab.id);
|
let contentToLoad = document.getElementById("content-" + tab.id);
|
||||||
if (contentToLoad) {
|
if (contentToLoad) {
|
||||||
|
|
@ -344,7 +344,10 @@ const t = useTranslations(lang);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
document.addEventListener('astro:after-swap', () => {
|
document.addEventListener('astro:after-swap', () => {
|
||||||
settingsLoad()
|
setTimeout(() => {
|
||||||
|
settingsLoad();
|
||||||
|
}, 300);
|
||||||
|
|
||||||
})
|
})
|
||||||
settingsLoad()
|
settingsLoad()
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ const { title, optionalPreloads } = Astro.props;
|
||||||
<ThemeLoader transition:persist />
|
<ThemeLoader transition:persist />
|
||||||
<CloakLoader transition:persist />
|
<CloakLoader transition:persist />
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="description" content="Astro description" />
|
|
||||||
<meta name="viewport" content="width=device-width" />
|
<meta name="viewport" content="width=device-width" />
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue