fixes for vesktop update

This commit is contained in:
Oleh Polisan 2024-07-05 15:52:16 +03:00
parent 01fbcffd83
commit 679b0b7342
3 changed files with 3 additions and 4 deletions

View file

@ -19,7 +19,7 @@ import { setBadgeCount } from "./appBadge";
import { autoStart } from "./autoStart";
import { VENCORD_FILES_DIR, VENCORD_QUICKCSS_FILE, VENCORD_THEMES_DIR } from "./constants";
import { getAccentColor, mainWin } from "./mainWindow";
import { Settings } from "./settings";
import { Settings, State } from "./settings";
import {
createTrayIcon,
generateTrayIcons,
@ -29,7 +29,6 @@ import {
pickTrayIcon,
setTrayIcon
} from "./tray";
import { Settings, State } from "./settings";
import { handle, handleSync } from "./utils/ipcWrappers";
import { PopoutWindows } from "./utils/popout";
import { isDeckGameMode, showGamePage } from "./utils/steamOS";

View file

@ -140,6 +140,7 @@ export async function createTrayIcon(
export async function generateTrayIcons(iconName: string = "") {
// this function generates tray icons as .png's in Vesktop cache for future use
if (!mainWin) return;
mkdirSync(ICONS_DIR, { recursive: true });
const Icons = ["speaking", "muted", "deafened", "idle"];

View file

@ -34,9 +34,8 @@ export const VesktopNative = {
},
fileManager: {
showItemInFolder: (path: string) => invoke<void>(IpcEvents.SHOW_ITEM_IN_FOLDER, path),
selectVencordDir: () => invoke<LiteralUnion<"cancelled" | "invalid", string>>(IpcEvents.SELECT_VENCORD_DIR),
selectTrayIcon: (iconName: string) =>
invoke<LiteralUnion<"cancelled" | "invalid", string>>(IpcEvents.SELECT_TRAY_ICON, iconName),
invoke<"cancelled" | "invalid" | string>(IpcEvents.SELECT_TRAY_ICON, iconName),
getVencordDir: () => sendSync<string | undefined>(IpcEvents.GET_VENCORD_DIR),
selectVencordDir: (value?: null) => invoke<"cancelled" | "invalid" | "ok">(IpcEvents.SELECT_VENCORD_DIR, value)
},