mirror of
https://github.com/zumbiepig/MineXLauncher.git
synced 2025-06-08 09:24:48 +00:00
.
This commit is contained in:
parent
4daef0ece7
commit
286ac4fa63
@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>MineXLauncher</title>
|
||||
<link rel="icon" type="image/webp" href="/resources/images/icons/favicon.webp" />
|
||||
<link rel="stylesheet" href="/resources/styles/themes/default.css" />
|
||||
<link rel="stylesheet" href="/resources/styles/themes/default.css" />css" />
|
||||
<link rel="stylesheet" id="theme" />
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/resources/scripts/main.js"></script>
|
||||
@ -59,7 +59,7 @@
|
||||
<div class="settings-section">
|
||||
<label for="theme-select">Theme:</label>
|
||||
<select id="theme-select">
|
||||
<option disabled selected hidden value=""></option>
|
||||
<option disabled hidden value=""></option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- <div class="settings-section">
|
||||
|
@ -27,7 +27,7 @@
|
||||
<input id="username-input" placeholder="Enter username" />
|
||||
<label for="theme-select">Theme:</label>
|
||||
<select id="theme-select">
|
||||
<option disabled selected hidden value=""></option>
|
||||
<option disabled hidden value=""></option>
|
||||
</select>
|
||||
<!-- <label for="offline-checkbox">Enable offline use:</label>
|
||||
<input type="checkbox" id="offline-checkbox" /> -->
|
||||
|
@ -6,11 +6,7 @@ let selectedVersion: string;
|
||||
const theme = {
|
||||
load: function (themeToLoad?: string) {
|
||||
const themeElement = document.getElementById('theme') as HTMLLinkElement;
|
||||
if (themeElement) {
|
||||
document.documentElement.style.display = 'none';
|
||||
themeElement.onload = () => (document.documentElement.style.display = '');
|
||||
themeElement.href = themeToLoad ? `/resources/styles/themes/${themeToLoad}.css` : `/resources/styles/themes/${storage.local.get('theme') ?? 'default'}.css`;
|
||||
}
|
||||
if (themeElement) themeElement.href = themeToLoad ? `/resources/styles/themes/${themeToLoad}.css` : `/resources/styles/themes/${storage.local.get('theme') ?? 'default'}.css`;
|
||||
},
|
||||
set: function (newTheme: string) {
|
||||
storage.local.set('theme', newTheme);
|
||||
|
Loading…
x
Reference in New Issue
Block a user