restructure files onto electron-vite boilerplate

This commit is contained in:
jeffvli
2025-05-18 14:03:18 -07:00
parent 91ce2cd8a1
commit 1cf587bc8f
457 changed files with 9927 additions and 11705 deletions
@@ -1,12 +1,14 @@
import isElectron from 'is-electron';
import { Platform } from '/@/renderer/types';
import { useTranslation } from 'react-i18next';
import { useWindowSettings, useSettingsStoreActions } from '../../../../store/settings.store';
import {
SettingsSection,
SettingOption,
} from '/@/renderer/features/settings/components/settings-section';
import { useSettingsStoreActions, useWindowSettings } from '../../../../store/settings.store';
import { Select, Switch, toast } from '/@/renderer/components';
import {
SettingOption,
SettingsSection,
} from '/@/renderer/features/settings/components/settings-section';
import { Platform } from '/@/renderer/types';
const WINDOW_BAR_OPTIONS = [
{ label: 'Web (hidden)', value: Platform.WEB },
@@ -15,7 +17,7 @@ const WINDOW_BAR_OPTIONS = [
{ label: 'Native', value: Platform.LINUX },
];
const localSettings = isElectron() ? window.electron.localSettings : null;
const localSettings = isElectron() ? window.api.localSettings : null;
export const WindowSettings = () => {
const { t } = useTranslation();
@@ -28,7 +30,6 @@ export const WindowSettings = () => {
<Select
data={WINDOW_BAR_OPTIONS}
disabled={!isElectron()}
value={settings.windowBarStyle}
onChange={(e) => {
if (!e) return;
@@ -49,7 +50,7 @@ export const WindowSettings = () => {
postProcess: 'sentenceCase',
}),
onClose: () => {
window.electron.ipc!.send('app-restart');
window.api.ipc!.send('app-restart');
},
title: t('common.restartRequired', {
postProcess: 'sentenceCase',
@@ -72,6 +73,7 @@ export const WindowSettings = () => {
},
});
}}
value={settings.windowBarStyle}
/>
),
description: t('setting.windowBarStyle', {