skinswitcher/html/partials/settings.html

51 lines
1.5 KiB
HTML

<h1 class="title">Settings</h1>
<div class="columns is-mobile">
<div class="column">
<p class="mb-1">
<span class="has-text-weight-semibold">Credits</span><br>
Code by <a href="https://arnweb.nl">McArn</a><br>
Assets by Cirkel
</p>
</div>
<div class="column">
<p class="mb-1">
<span class="has-text-weight-semibold">Theme</span><br>
Use a theme with SkinSwitcher, changing this will reload your current session
</p>
<div class="buttons has-addons">
<button class="button" id="light">Light</button>
<button class="button" id="dark">Dark</button>
</div>
<p class="mb-1">
<span class="has-text-weight-semibold">Reset all settings</span><br>
Resetting will delete all settings, credentials and saved skins.
</p>
<div class="buttons">
<button class="button is-danger" id="reset">Reset</button>
</div>
</div>
</div>
<script>
switch (settings.theme) {
case "light":
$("button#light").addClass("is-primary is-selected")
break;
case "dark":
$("button#dark").addClass("is-primary is-selected")
break;
}
$("button#light").on("click", () => {
settings.theme = "light";
save();
location.reload();
});
$("button#dark").on("click", () => {
settings.theme = "dark";
save();
location.reload();
});
</script>