mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-14 12:30:06 +02:00
Refactor settings store and components
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { lazy } from 'react';
|
||||
import isElectron from 'is-electron';
|
||||
import styled from 'styled-components';
|
||||
import { useGeneralSettings, useSettingsStore } from '/@/renderer/store/settings.store';
|
||||
import { useWindowSettings, useSettingsStore } from '/@/renderer/store/settings.store';
|
||||
import { Platform, PlaybackType } from '/@/renderer/types';
|
||||
import { MainContent } from '/@/renderer/layouts/default-layout/main-content';
|
||||
import { PlayerBar } from '/@/renderer/layouts/default-layout/player-bar';
|
||||
|
||||
if (!isElectron()) {
|
||||
useSettingsStore.getState().actions.setSettings({
|
||||
player: {
|
||||
...useSettingsStore.getState().player,
|
||||
playback: {
|
||||
...useSettingsStore.getState().playback,
|
||||
type: PlaybackType.WEB,
|
||||
},
|
||||
});
|
||||
@@ -41,7 +41,7 @@ interface DefaultLayoutProps {
|
||||
}
|
||||
|
||||
export const DefaultLayout = ({ shell }: DefaultLayoutProps) => {
|
||||
const { windowBarStyle } = useGeneralSettings();
|
||||
const { windowBarStyle } = useWindowSettings();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user