refactor(ui): normalize about modal with hidden class
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/* About Modal */
|
/* About Modal */
|
||||||
.about-modal-overlay {
|
.about-modal-overlay {
|
||||||
display: none;
|
display: flex;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
background: var(--color-overlay);
|
background: var(--color-overlay);
|
||||||
@@ -10,10 +10,6 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.about-modal-overlay.show {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.about-modal {
|
.about-modal {
|
||||||
background: var(--color-bg-surface);
|
background: var(--color-bg-surface);
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
|
|||||||
+1
-1
@@ -266,7 +266,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- About Modal -->
|
<!-- About Modal -->
|
||||||
<div class="about-modal-overlay" id="about-modal-overlay">
|
<div class="about-modal-overlay hidden" id="about-modal-overlay">
|
||||||
<div class="about-modal">
|
<div class="about-modal">
|
||||||
<div class="about-modal-logo">
|
<div class="about-modal-logo">
|
||||||
<i class="fas fa-cloud"></i>
|
<i class="fas fa-cloud"></i>
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ function setupUserMenu() {
|
|||||||
aboutBtn.addEventListener('click', () => {
|
aboutBtn.addEventListener('click', () => {
|
||||||
wrapper.classList.remove('open');
|
wrapper.classList.remove('open');
|
||||||
const overlay = document.getElementById('about-modal-overlay');
|
const overlay = document.getElementById('about-modal-overlay');
|
||||||
if (overlay) overlay.classList.add('show');
|
if (overlay) overlay.classList.remove('hidden');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,18 +137,18 @@ function setupUserMenu() {
|
|||||||
const aboutOverlay = document.getElementById('about-modal-overlay');
|
const aboutOverlay = document.getElementById('about-modal-overlay');
|
||||||
if (aboutCloseBtn) {
|
if (aboutCloseBtn) {
|
||||||
aboutCloseBtn.addEventListener('click', () => {
|
aboutCloseBtn.addEventListener('click', () => {
|
||||||
aboutOverlay.classList.remove('show');
|
aboutOverlay.classList.add('hidden');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (aboutOverlay) {
|
if (aboutOverlay) {
|
||||||
aboutOverlay.addEventListener('click', (e) => {
|
aboutOverlay.addEventListener('click', (e) => {
|
||||||
if (e.target === aboutOverlay) {
|
if (e.target === aboutOverlay) {
|
||||||
aboutOverlay.classList.remove('show');
|
aboutOverlay.classList.add('hidden');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
document.addEventListener('keydown', (e) => {
|
document.addEventListener('keydown', (e) => {
|
||||||
if (e.key === 'Escape' && aboutOverlay.classList.contains('show')) {
|
if (e.key === 'Escape' && !aboutOverlay.classList.contains('hidden')) {
|
||||||
aboutOverlay.classList.remove('show');
|
aboutOverlay.classList.add('hidden');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -218,7 +218,7 @@ function showUserProfileModal() {
|
|||||||
|
|
||||||
const overlay = document.createElement('div');
|
const overlay = document.createElement('div');
|
||||||
overlay.id = 'profile-modal-overlay';
|
overlay.id = 'profile-modal-overlay';
|
||||||
overlay.className = 'about-modal-overlay';
|
overlay.classList.add('about-modal-overlay', 'hidden');
|
||||||
overlay.innerHTML = `
|
overlay.innerHTML = `
|
||||||
<div class="about-modal about-modal-body">
|
<div class="about-modal about-modal-body">
|
||||||
<div class="about-modal-header">
|
<div class="about-modal-header">
|
||||||
|
|||||||
Reference in New Issue
Block a user