Додана сторінка "Стенд"

Додане повідомлення про оновлення застосунку
Оновлен Service Worker
Перероблен WebSocket APІ
This commit is contained in:
2025-10-19 00:55:30 +03:00
parent 6ec6523d71
commit 3f08f3f6c9
46 changed files with 2651 additions and 2691 deletions

View File

@@ -17,4 +17,6 @@
<option value="large">Великий</option>
</select>
</div>
<button onclick="Options.logout()">Вийти з облікового запису</button>
</div>

View File

@@ -1,13 +1,14 @@
const Options = {
init: async () => {
async init() {
let html = await fetch('/lib/pages/options/index.html').then((response) => response.text());
app.innerHTML = html;
await Options.optionPush.init();
Options.optionFont.init();
},
optionPush: {
init: async () => {
async init() {
const element = document.getElementById("page-options-notifications");
const permission = await Notification.requestPermission();
@@ -25,7 +26,8 @@ const Options = {
element.checked = false;
}
},
edit: (state) => {
edit(state) {
if (state) {
webPush.init();
} else {
@@ -33,8 +35,9 @@ const Options = {
}
}
},
optionFont: {
init: () => {
init() {
const element = document.getElementById("page-options-fontSize");
let fontSize = localStorage.getItem("fontSize")
@@ -43,9 +46,15 @@ const Options = {
element.value = fontSize;
},
edit: (mode) => {
edit(mode) {
localStorage.setItem("fontSize", mode);
applyFontMode(mode);
}
},
logout() {
localStorage.removeItem("uuid");
window.location.reload();
}
}

View File

@@ -53,4 +53,16 @@
justify-content: space-between;
cursor: pointer;
margin: 5px 0;
}
.page-options>button {
border-radius: var(--border-radius);
background: var(--PrimaryColor);
color: var(--PrimaryColorText);
width: 100%;
height: 40px;
font-size: var(--FontSize3);
font-weight: 400;
margin: 20px 0;
text-transform: uppercase;
}