🎨 Clean code

This commit is contained in:
Daniel 2024-04-30 08:58:20 +08:00
parent 215f37a072
commit 21823e11d8
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
12 changed files with 39 additions and 39 deletions

View file

@ -19,7 +19,7 @@ import {Files} from "../../layout/dock/Files";
/// #endif
export const commandPanel = (app: App) => {
const range = getSelection().getRangeAt(0)
const range = getSelection().getRangeAt(0);
const dialog = new Dialog({
width: isMobile() ? "92vw" : "80vw",
height: isMobile() ? "80vh" : "70vh",
@ -83,7 +83,7 @@ export const commandPanel = (app: App) => {
inputElement.focus();
/// #if !MOBILE
listElement.addEventListener("click", (event: KeyboardEvent) => {
const liElement = hasClosestByClassName(event.target as HTMLElement, "b3-list-item")
const liElement = hasClosestByClassName(event.target as HTMLElement, "b3-list-item");
if (liElement) {
const command = liElement.getAttribute("data-command");
if (command) {
@ -93,7 +93,7 @@ export const commandPanel = (app: App) => {
event.stopPropagation();
}
}
})
});
/// #endif
inputElement.addEventListener("keydown", (event: KeyboardEvent) => {
event.stopPropagation();