refactor: sonar issues

This commit is contained in:
Hachi-R 2025-01-30 03:08:19 -03:00
parent 13eeb2cee7
commit afcd99a6fd
5 changed files with 3 additions and 24 deletions

View File

@ -6,7 +6,6 @@ const injectCSS = async (
cssString: string
) => {
WindowManager.mainWindow?.webContents.send("css-injected", cssString);
return;
};
registerEvent("injectCSS", injectCSS);

View File

@ -23,7 +23,7 @@ import { AuthPage } from "@shared";
export class WindowManager {
public static mainWindow: Electron.BrowserWindow | null = null;
private static editorWindows: Map<string, BrowserWindow> = new Map();
private static readonly editorWindows: Map<string, BrowserWindow> = new Map();
private static loadMainWindowURL(hash = "") {
// HMR for renderer base on electron-vite cli.

View File

@ -62,8 +62,8 @@ export const injectCustomCss = (css: string) => {
}
const style = document.createElement("style");
style.id = "custom-css";
style.type = "text/css";
style.textContent = `
${css}
`;

View File

@ -1,5 +1,4 @@
import { GlobeIcon, TrashIcon } from "@primer/octicons-react";
import { PlusIcon } from "@primer/octicons-react";
import { GlobeIcon, TrashIcon, PlusIcon } from "@primer/octicons-react";
import { Button } from "@renderer/components/button/button";
import { useTranslation } from "react-i18next";
import { AddThemeModal, DeleteAllThemesModal } from "../index";

View File

@ -1,19 +0,0 @@
export interface Theme {
id: string;
name: string;
isActive: boolean;
description: string;
author: string | null;
authorId: string | null;
version: string;
code: string;
colors: {
accent: string;
surface: string;
background: string;
optional1?: string;
optional2?: string;
};
}
export class ThemesManager {}