mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
show time remaining instead of duration on click (#1179)
* show time remaining on duration click
This commit is contained in:
@@ -9,6 +9,7 @@ export interface AppSlice extends AppState {
|
||||
actions: {
|
||||
setAppStore: (data: Partial<AppSlice>) => void;
|
||||
setPrivateMode: (enabled: boolean) => void;
|
||||
setShowTimeRemaining: (enabled: boolean) => void;
|
||||
setSideBar: (options: Partial<SidebarProps>) => void;
|
||||
setTitleBar: (options: Partial<TitlebarProps>) => void;
|
||||
};
|
||||
@@ -19,6 +20,7 @@ export interface AppState {
|
||||
isReorderingQueue: boolean;
|
||||
platform: Platform;
|
||||
privateMode: boolean;
|
||||
showTimeRemaining: boolean;
|
||||
sidebar: SidebarProps;
|
||||
titlebar: TitlebarProps;
|
||||
}
|
||||
@@ -57,6 +59,11 @@ export const useAppStore = createWithEqualityFn<AppSlice>()(
|
||||
state.privateMode = privateMode;
|
||||
});
|
||||
},
|
||||
setShowTimeRemaining: (showTimeRemaining) => {
|
||||
set((state) => {
|
||||
state.showTimeRemaining = showTimeRemaining;
|
||||
});
|
||||
},
|
||||
setSideBar: (options) => {
|
||||
set((state) => {
|
||||
state.sidebar = { ...state.sidebar, ...options };
|
||||
@@ -89,6 +96,7 @@ export const useAppStore = createWithEqualityFn<AppSlice>()(
|
||||
isReorderingQueue: false,
|
||||
platform: Platform.WINDOWS,
|
||||
privateMode: false,
|
||||
showTimeRemaining: false,
|
||||
sidebar: {
|
||||
collapsed: false,
|
||||
expanded: [],
|
||||
|
||||
Reference in New Issue
Block a user