mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 09:20:18 +08:00
refactor: improve code formatting and consistency across components
- Updated button and span elements in ThemeToggle.vue and TopActions.vue for better readability. - Enhanced UninstallConfirmModal.vue and UpdateAppsModal.vue with consistent indentation and spacing. - Refactored downloadStatus.ts and storeConfig.ts for improved code clarity. - Standardized string quotes and spacing in typedefinition.ts and processInstall.ts. - Ensured consistent use of arrow functions and improved variable declarations throughout the codebase.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { BrowserWindow } from 'electron';
|
||||
import { deepLink } from './deeplink';
|
||||
import { isLoaded } from '../global';
|
||||
import pino from 'pino';
|
||||
import { BrowserWindow } from "electron";
|
||||
import { deepLink } from "./deeplink";
|
||||
import { isLoaded } from "../global";
|
||||
import pino from "pino";
|
||||
|
||||
const logger = pino({ 'name': 'handle-url-scheme.ts' });
|
||||
const logger = pino({ name: "handle-url-scheme.ts" });
|
||||
|
||||
const pendingActions: Array<() => void> = [];
|
||||
|
||||
@@ -24,22 +24,26 @@ new Promise<void>((resolve) => {
|
||||
});
|
||||
|
||||
deepLink.on("event", (query) => {
|
||||
logger.info(`Deep link: event "event" fired with query: ${JSON.stringify(query)}`);
|
||||
logger.info(
|
||||
`Deep link: event "event" fired with query: ${JSON.stringify(query)}`,
|
||||
);
|
||||
});
|
||||
|
||||
deepLink.on("action", (query) => {
|
||||
logger.info(`Deep link: event "action" fired with query: ${JSON.stringify(query)}`);
|
||||
|
||||
logger.info(
|
||||
`Deep link: event "action" fired with query: ${JSON.stringify(query)}`,
|
||||
);
|
||||
|
||||
const action = () => {
|
||||
const win = BrowserWindow.getAllWindows()[0];
|
||||
if (!win) return;
|
||||
|
||||
if (query.cmd === 'update') {
|
||||
win.webContents.send('deep-link-update');
|
||||
if (query.cmd === "update") {
|
||||
win.webContents.send("deep-link-update");
|
||||
if (win.isMinimized()) win.restore();
|
||||
win.focus();
|
||||
} else if (query.cmd === 'list') {
|
||||
win.webContents.send('deep-link-installed');
|
||||
} else if (query.cmd === "list") {
|
||||
win.webContents.send("deep-link-installed");
|
||||
if (win.isMinimized()) win.restore();
|
||||
win.focus();
|
||||
}
|
||||
@@ -55,14 +59,16 @@ deepLink.on("action", (query) => {
|
||||
});
|
||||
|
||||
deepLink.on("install", (query) => {
|
||||
logger.info(`Deep link: event "install" fired with query: ${JSON.stringify(query)}`);
|
||||
|
||||
logger.info(
|
||||
`Deep link: event "install" fired with query: ${JSON.stringify(query)}`,
|
||||
);
|
||||
|
||||
const action = () => {
|
||||
const win = BrowserWindow.getAllWindows()[0];
|
||||
if (!win) return;
|
||||
|
||||
if (query.pkg) {
|
||||
win.webContents.send('deep-link-install', query.pkg);
|
||||
win.webContents.send("deep-link-install", query.pkg);
|
||||
if (win.isMinimized()) win.restore();
|
||||
win.focus();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user