Fix Dialog
This commit is contained in:
11 files changed
+113438
-9510
No files matched your search
+8
-26
@@ -95,43 +95,25 @@ main,
|
||||
}
|
||||
|
||||
/*Animations*/
|
||||
@-webkit-keyframes fadeInBg {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeInBg {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes fadeIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
top: calc(50% + 150px);
|
||||
margin-bottom: -150px;
|
||||
}
|
||||
100% {
|
||||
opactiy: 1;
|
||||
top: 50%;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
top: calc(50% + 150px);
|
||||
margin-bottom: -150px;
|
||||
}
|
||||
100% {
|
||||
opactiy: 1;
|
||||
top: 50%;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,12 +121,12 @@ main,
|
||||
0% {
|
||||
display: block;
|
||||
opacity: 1;
|
||||
top: 50%;
|
||||
inset: 0 0 0 0;
|
||||
}
|
||||
99% {
|
||||
display: block;
|
||||
opacity: 0;
|
||||
top: calc(50% + 150px);
|
||||
inset: 150px 0 0 0;
|
||||
}
|
||||
100% {
|
||||
display: none;
|
||||
@@ -156,12 +138,12 @@ main,
|
||||
0% {
|
||||
display: block;
|
||||
opacity: 1;
|
||||
top: 50%;
|
||||
inset: 0 0 0 0;
|
||||
}
|
||||
99% {
|
||||
display: block;
|
||||
opacity: 0;
|
||||
top: calc(50% + 150px);
|
||||
inset: 150px 0 0 0;
|
||||
}
|
||||
100% {
|
||||
display: none;
|
||||
|
||||
+17
-6
@@ -239,15 +239,26 @@ input:focus + .input__label,
|
||||
--color: var(--error-red);
|
||||
}
|
||||
|
||||
.dialog__cont {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.dialog {
|
||||
position: fixed;
|
||||
background: var(--main-bg);
|
||||
z-index: 1;
|
||||
z-index: 5;
|
||||
height: -webkit-fit-content;
|
||||
height: -moz-fit-content;
|
||||
height: fit-content;
|
||||
inset: 50% 0 0 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
box-sizing: content-box;
|
||||
padding: 20px;
|
||||
color: black;
|
||||
@@ -291,7 +302,7 @@ input:focus + .input__label,
|
||||
}
|
||||
|
||||
.dialog__close {
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(5, 5, 5, 0.5);
|
||||
@@ -307,7 +318,7 @@ input:focus + .input__label,
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.dialog.fadeOut {
|
||||
.dialog__cont.fadeOut {
|
||||
-webkit-animation: fadeOut var(--transition-time-fast-2) forwards;
|
||||
animation: fadeOut var(--transition-time-fast-2) forwards;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
</div>
|
||||
<section class="manual__input"></section>
|
||||
</section>
|
||||
<div class="loader hide">
|
||||
<div class="loader">
|
||||
<svg width="52" height="12" viewBox="0 0 52 12" fill="none" xmlns="http://www.w3.org/2000/svg" xml:space="preserve">
|
||||
<circle cx="6" cy="6" r="6" fill="white">
|
||||
<animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.1"></animate>
|
||||
|
||||
+10
-7
@@ -73,6 +73,7 @@ window.onload = () => {
|
||||
window.getServer();
|
||||
});
|
||||
});
|
||||
document.querySelector(".loader").classList.add("hide");
|
||||
};
|
||||
|
||||
const base_token = `MediaBrowser Client="JellyPlayer", Device="${window.navigator.userAgent}", DeviceId="${generateUUID()}", Version="1.0.0"`;
|
||||
@@ -121,15 +122,14 @@ const createUserList = async (server) => {
|
||||
};
|
||||
|
||||
const closeDialog = () => {
|
||||
document.querySelector('.dialog').classList.remove('active');
|
||||
document.querySelector('.dialog__cont').classList.remove('active');
|
||||
document.querySelector('.dialog__close').classList.remove('active');
|
||||
document.querySelector('.dialog').classList.add('fadeOut');
|
||||
document.querySelector('.dialog__cont').classList.add('fadeOut');
|
||||
document.querySelector('.dialog__close').classList.add('fadeOut');
|
||||
setTimeout(() => {
|
||||
document.querySelector('.dialog').classList.remove('fadeOut');
|
||||
document.querySelector('.dialog__cont').classList.remove('fadeOut');
|
||||
document.querySelector('.dialog__close').classList.remove('fadeOut');
|
||||
document.querySelector('.dialog').remove();
|
||||
document.querySelector('.dialog__close').remove();
|
||||
document.querySelector('.dialog__cont').remove();
|
||||
}, 305);
|
||||
};
|
||||
|
||||
@@ -153,7 +153,8 @@ const createAlert = (type, msg, page) => {
|
||||
};
|
||||
|
||||
const createDialog = (title, msg, btn, type, page) => {
|
||||
html = `<div class="dialog ${type}">
|
||||
html = `<div class="dialog__cont">
|
||||
<div class="dialog ${type}">
|
||||
<div class="icon">
|
||||
<i class="bi bi-exclamation-octagon"></i>
|
||||
</div>
|
||||
@@ -164,7 +165,8 @@ const createDialog = (title, msg, btn, type, page) => {
|
||||
${msg}
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialog__close"></div>`;
|
||||
<div class="dialog__close"></div>
|
||||
</div>`;
|
||||
document.querySelector(page).insertAdjacentHTML('beforeend', html);
|
||||
if (btn == "yes__no") {
|
||||
html = `<div class="buttons">
|
||||
@@ -304,6 +306,7 @@ const changeServer = (page) => {
|
||||
};
|
||||
|
||||
const goBack = (from, to, loginForm) => {
|
||||
to.classList.remove("hide");
|
||||
to.scrollIntoView({ behavior: "smooth" });
|
||||
document.querySelector(".blue").classList.remove("active");
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -39,6 +39,4 @@ emitter.on("logged-in", async (user) => {
|
||||
console.log(item);
|
||||
mainPage.innerHTML += item.Name;
|
||||
});
|
||||
// mainPage.scrollIntoView({ behavior: "smooth" });
|
||||
// loginPage.classList.add("hide");
|
||||
});
|
||||
Reference in new issue
Block a user