feat(ui): tweak floating preview

This commit is contained in:
psychedelicious
2023-04-30 23:08:27 +10:00
parent d5e152b35e
commit 779671753d
4 changed files with 90 additions and 111 deletions

View File

@ -23,7 +23,7 @@ const initialUIState: UIState = {
openGenerateAccordionItems: [],
openUnifiedCanvasAccordionItems: [],
floatingProgressImageCoordinates: { x: 0, y: 0 },
shouldShowProgressImage: false,
shouldShowProgressImages: false,
};
const initialState: UIState = initialUIState;
@ -114,8 +114,8 @@ export const uiSlice = createSlice({
state.floatingProgressImageCoordinates = { x: x + _x, y: y + _y };
},
shouldShowProgressImageChanged: (state, action: PayloadAction<boolean>) => {
state.shouldShowProgressImage = action.payload;
shouldShowProgressImagesToggled: (state) => {
state.shouldShowProgressImages = !state.shouldShowProgressImages;
},
},
});
@ -141,7 +141,7 @@ export const {
toggleGalleryPanel,
openAccordionItemsChanged,
floatingProgressImageMoved,
shouldShowProgressImageChanged,
shouldShowProgressImagesToggled,
} = uiSlice.actions;
export default uiSlice.reducer;

View File

@ -20,5 +20,5 @@ export interface UIState {
openGenerateAccordionItems: number[];
openUnifiedCanvasAccordionItems: number[];
floatingProgressImageCoordinates: Coordinates;
shouldShowProgressImage: boolean;
shouldShowProgressImages: boolean;
}