opt: styling

This commit is contained in:
KOWX712
2025-02-27 19:10:13 +08:00
parent 56ca7ec7a1
commit 41ce39be2a
4 changed files with 48 additions and 57 deletions

View File

@@ -286,7 +286,7 @@
</div> </div>
<!-- Security Patch Overlay --> <!-- Security Patch Overlay -->
<div id="security-patch-overlay" class="security-patch-overlay"></div> <div id="security-patch-overlay" class="security-patch-overlay">
<div id="security-patch-card" class="security-patch-card"> <div id="security-patch-card" class="security-patch-card">
<div class="security-patch-header" data-i18n="security_patch.title"></div> <div class="security-patch-header" data-i18n="security_patch.title"></div>
<div class="security-patch-content"> <div class="security-patch-content">
@@ -333,6 +333,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<!-- Add System App Overlay --> <!-- Add System App Overlay -->
<div id="add-system-app-overlay" class="add-system-app-overlay"> <div id="add-system-app-overlay" class="add-system-app-overlay">

View File

@@ -1,7 +1,6 @@
import { basePath, execCommand, showPrompt } from './main.js'; import { basePath, execCommand, showPrompt } from './main.js';
const overlay = document.getElementById('security-patch-overlay'); const overlay = document.getElementById('security-patch-overlay');
const card = document.getElementById('security-patch-card');
const advancedToggle = document.getElementById('advanced-mode'); const advancedToggle = document.getElementById('advanced-mode');
const normalInputs = document.getElementById('normal-mode-inputs'); const normalInputs = document.getElementById('normal-mode-inputs');
const advancedInputs = document.getElementById('advanced-mode-inputs'); const advancedInputs = document.getElementById('advanced-mode-inputs');
@@ -16,11 +15,9 @@ const saveButton = document.getElementById('save-patch');
// Show security patch dialog // Show security patch dialog
function showSecurityPatchDialog() { function showSecurityPatchDialog() {
document.body.classList.add("no-scroll"); document.body.classList.add("no-scroll");
overlay.style.display = 'block'; overlay.style.display = 'flex';
card.style.display = 'block';
setTimeout(() => { setTimeout(() => {
overlay.style.opacity = '1'; overlay.style.opacity = '1';
card.style.opacity = '1';
loadCurrentConfig(); loadCurrentConfig();
}, 10); }, 10);
} }
@@ -29,10 +26,8 @@ function showSecurityPatchDialog() {
function hideSecurityPatchDialog() { function hideSecurityPatchDialog() {
document.body.classList.remove("no-scroll"); document.body.classList.remove("no-scroll");
overlay.style.opacity = '0'; overlay.style.opacity = '0';
card.style.opacity = '0';
setTimeout(() => { setTimeout(() => {
overlay.style.display = 'none'; overlay.style.display = 'none';
card.style.display = 'none';
}, 200); }, 200);
} }

View File

@@ -1,6 +1,7 @@
.security-patch-overlay { .security-patch-overlay {
display: none; display: none;
position: fixed; position: fixed;
justify-content: center;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
@@ -12,11 +13,9 @@
} }
.security-patch-card { .security-patch-card {
display: none; display: block;
position: fixed; position: fixed;
top: 10%; top: 10%;
left: 50%;
transform: translateX(-50%);
background-color: white; background-color: white;
padding: 30px; padding: 30px;
border-radius: 15px; border-radius: 15px;
@@ -26,8 +25,6 @@
max-width: 300px; max-width: 300px;
max-height: calc(80% - 60px); max-height: calc(80% - 60px);
overflow-y: auto; overflow-y: auto;
transition: opacity 0.2s ease;
opacity: 0;
} }
.security-patch-content { .security-patch-content {

View File

@@ -2,7 +2,6 @@
display: none; display: none;
position: fixed; position: fixed;
justify-content: center; justify-content: center;
align-items: flex-start;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
@@ -16,12 +15,13 @@
.add-system-app-card { .add-system-app-card {
position: fixed; position: fixed;
display: flex; display: flex;
margin-top: 15%; top: 10%;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center;
width: calc(90vw - 60px); width: calc(90vw - 60px);
max-width: 400px; max-width: 400px;
max-height: calc(80vh - 60px);
overflow-y: scroll;
padding: 30px; padding: 30px;
background-color: #fff; background-color: #fff;
border-radius: 10px; border-radius: 10px;
@@ -29,9 +29,9 @@
} }
.add-system-app-title { .add-system-app-title {
font-size: 24px; font-size: 26px;
font-weight: 600; user-select: none;
margin-bottom: 16px; margin-bottom: 20px;
} }
.add-system-app-content { .add-system-app-content {
@@ -77,8 +77,6 @@
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start;
width: 100%; width: 100%;
max-height: 40vh;
overflow-y: scroll;
} }
.system-app-item { .system-app-item {