This commit is contained in:
JellyBrick
2023-10-04 20:30:04 +09:00
parent 371a7eb475
commit 92a3a55803
4 changed files with 13 additions and 11 deletions

View File

@ -1,13 +1,18 @@
import fs from 'node:fs';
import path from 'node:path';
import { ipcMain, ipcRenderer } from 'electron';
import { app, ipcMain, ipcRenderer } from 'electron';
import is from 'electron-is';
import { ValueOf } from '../utils/type-utils';
import defaultConfig from '../config/defaults';
export const getMediaIconLocation = () =>
app.isPackaged
? path.resolve(app.getPath('userData'), 'icons')
: path.resolve(__dirname, 'assets', 'media-icons-black');
// Creates a DOM element from an HTML string
export const ElementFromHtml = (html: string): HTMLElement => {
const template = document.createElement('template');