Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
feat(ui): remove show statuses pie preference
Browse files Browse the repository at this point in the history
  • Loading branch information
s-r-x committed Sep 17, 2021
1 parent 20fec69 commit 6185c7d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
13 changes: 0 additions & 13 deletions packages/ui/src/components/Settings/Preferences/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export default function Preferences() {
toggleConfirmDangerousActions,
groupQueuesByPrefix,
toggleGroupQueuesByPrefix,
showStatusesPieInDrawer,
toggleShowStatusesPieInDrawer,
} = usePreferencesStore();
return (
<div>
Expand All @@ -26,17 +24,6 @@ export default function Preferences() {
label="Confirm dangerous actions"
/>
</FormControl>
<FormControl margin="dense">
<FormControlLabel
control={
<Switch
checked={showStatusesPieInDrawer}
onChange={toggleShowStatusesPieInDrawer}
/>
}
label="Show statuses pies in drawer"
/>
</FormControl>
<FormControl margin="dense">
<FormControlLabel
control={
Expand Down
10 changes: 0 additions & 10 deletions packages/ui/src/stores/preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,23 @@ import { StorageConfig } from '@/config/storage';
type TState = {
confirmDangerousActions: boolean;
groupQueuesByPrefix: boolean;
showStatusesPieInDrawer: boolean;

changeConfirmDangerousActions: (value: boolean) => void;
changeShowStatusesPieInDrawer: (value: boolean) => void;
toggleShowStatusesPieInDrawer: () => void;
toggleConfirmDangerousActions: () => void;
toggleGroupQueuesByPrefix: () => void;
};
export const usePreferencesStore = createStore<TState>(
persist(
(set) => ({
showStatusesPieInDrawer: true,
confirmDangerousActions: true,
groupQueuesByPrefix: false,

changeShowStatusesPieInDrawer: (showStatusesPieInDrawer) =>
set({ showStatusesPieInDrawer }),
changeConfirmDangerousActions: (confirmDangerousActions) =>
set({ confirmDangerousActions }),
toggleConfirmDangerousActions: () =>
set((state) => ({
confirmDangerousActions: !state.confirmDangerousActions,
})),
toggleShowStatusesPieInDrawer: () =>
set((state) => ({
showStatusesPieInDrawer: !state.showStatusesPieInDrawer,
})),
toggleGroupQueuesByPrefix: () =>
set((state) => ({
groupQueuesByPrefix: !state.groupQueuesByPrefix,
Expand Down

0 comments on commit 6185c7d

Please sign in to comment.