mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
refactor: sonar issues
This commit is contained in:
parent
13eeb2cee7
commit
afcd99a6fd
5 changed files with 3 additions and 24 deletions
|
@ -6,7 +6,6 @@ const injectCSS = async (
|
||||||
cssString: string
|
cssString: string
|
||||||
) => {
|
) => {
|
||||||
WindowManager.mainWindow?.webContents.send("css-injected", cssString);
|
WindowManager.mainWindow?.webContents.send("css-injected", cssString);
|
||||||
return;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
registerEvent("injectCSS", injectCSS);
|
registerEvent("injectCSS", injectCSS);
|
||||||
|
|
|
@ -23,7 +23,7 @@ import { AuthPage } from "@shared";
|
||||||
export class WindowManager {
|
export class WindowManager {
|
||||||
public static mainWindow: Electron.BrowserWindow | null = null;
|
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 = "") {
|
private static loadMainWindowURL(hash = "") {
|
||||||
// HMR for renderer base on electron-vite cli.
|
// HMR for renderer base on electron-vite cli.
|
||||||
|
|
|
@ -62,8 +62,8 @@ export const injectCustomCss = (css: string) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const style = document.createElement("style");
|
const style = document.createElement("style");
|
||||||
|
|
||||||
style.id = "custom-css";
|
style.id = "custom-css";
|
||||||
style.type = "text/css";
|
|
||||||
style.textContent = `
|
style.textContent = `
|
||||||
${css}
|
${css}
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { GlobeIcon, TrashIcon } from "@primer/octicons-react";
|
import { GlobeIcon, TrashIcon, PlusIcon } from "@primer/octicons-react";
|
||||||
import { PlusIcon } from "@primer/octicons-react";
|
|
||||||
import { Button } from "@renderer/components/button/button";
|
import { Button } from "@renderer/components/button/button";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { AddThemeModal, DeleteAllThemesModal } from "../index";
|
import { AddThemeModal, DeleteAllThemesModal } from "../index";
|
||||||
|
|
|
@ -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 {}
|
|
Loading…
Add table
Add a link
Reference in a new issue