opt: add system app menu

This commit is contained in:
KOWX712
2025-03-01 06:05:53 +08:00
parent 9f859dc488
commit bf726bf863
3 changed files with 6 additions and 5 deletions

View File

@@ -362,7 +362,7 @@
<div id="add-system-app-card" class="add-system-app-card">
<div class="add-system-app-title" data-i18n="add_system_app.title"></div>
<div class="add-system-app-content">
<input type="text" id="system-app-input" placeholder="com.example.app">
<input type="text" id="system-app-input" placeholder="com.example.app" autocapitalize="none">
<button id="add-system-app-button" class="add-system-app-button ripple-element" data-i18n="add_system_app.add"></button>
<h3 class="current-system-app-list" data-i18n="add_system_app.current_list"></h3>
<div class="current-system-app-list-content"></div>

View File

@@ -105,7 +105,7 @@ export async function setupSystemAppMenu() {
// Add system app button
document.getElementById("add-system-app-button").addEventListener("click", async () => {
const input = document.getElementById("system-app-input");
const packageName = input.value;
const packageName = input.value.trim();
if (packageName) {
try {
const result = await execCommand(`pm list packages -s | grep -q ${packageName} || echo "false"`);

View File

@@ -24,7 +24,7 @@
overflow-y: scroll;
padding: 30px;
background-color: #fff;
border-radius: 10px;
border-radius: 15px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
@@ -54,7 +54,7 @@
}
.add-system-app-button {
margin-top: 10px;
margin-top: 15px;
width: 100%;
padding: 12px;
border: none;
@@ -67,8 +67,9 @@
}
.current-system-app-list {
margin-top: 20px;
margin-top: 25px;
margin-bottom: 10px;
user-select: none;
}
.current-system-app-list-content {