mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 02:43:33 +00:00
parent
3636384508
commit
f07393c82a
6 changed files with 63 additions and 2 deletions
|
|
@ -202,6 +202,7 @@ export interface SettingsSlice extends SettingsState {
|
|||
setTable: (type: TableType, data: DataTableProps) => void;
|
||||
setTranscodingConfig: (config: TranscodingConfig) => void;
|
||||
toggleContextMenuItem: (item: ContextMenuItemType) => void;
|
||||
toggleMediaSession: () => void;
|
||||
toggleSidebarCollapseShare: () => void;
|
||||
};
|
||||
}
|
||||
|
|
@ -298,6 +299,7 @@ export interface SettingsState {
|
|||
audioDeviceId?: null | string;
|
||||
crossfadeDuration: number;
|
||||
crossfadeStyle: CrossfadeStyle;
|
||||
mediaSession: boolean;
|
||||
mpvExtraParameters: string[];
|
||||
mpvProperties: MpvSettings;
|
||||
muted: boolean;
|
||||
|
|
@ -491,6 +493,7 @@ const initialState: SettingsState = {
|
|||
audioDeviceId: undefined,
|
||||
crossfadeDuration: 5,
|
||||
crossfadeStyle: CrossfadeStyle.EQUALPOWER,
|
||||
mediaSession: false,
|
||||
mpvExtraParameters: [],
|
||||
mpvProperties: {
|
||||
audioExclusiveMode: 'no',
|
||||
|
|
@ -752,6 +755,11 @@ export const useSettingsStore = createWithEqualityFn<SettingsSlice>()(
|
|||
!state.general.disabledContextMenu[item];
|
||||
});
|
||||
},
|
||||
toggleMediaSession: () => {
|
||||
set((state) => {
|
||||
state.playback.mediaSession = !state.playback.mediaSession;
|
||||
});
|
||||
},
|
||||
toggleSidebarCollapseShare: () => {
|
||||
set((state) => {
|
||||
state.general.sidebarCollapseShared =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue