mirror of
https://github.com/mitmproxy/mitmproxy.git
synced 2024-12-27 15:56:21 +00:00
update commandBar duck to RTK (#7370)
Some checks are pending
autofix.ci / autofix (push) Waiting to run
CI / lint (push) Waiting to run
CI / filename-matching (push) Waiting to run
CI / mypy (push) Waiting to run
CI / individual-coverage (push) Waiting to run
CI / test (macos-latest, 3.13) (push) Waiting to run
CI / test (ubuntu-latest, 3.10) (push) Waiting to run
CI / test (ubuntu-latest, 3.11) (push) Waiting to run
CI / test (ubuntu-latest, 3.12) (push) Waiting to run
CI / test (ubuntu-latest, 3.13) (push) Waiting to run
CI / test (windows-latest, 3.13) (push) Waiting to run
CI / test-old-dependencies (push) Waiting to run
CI / build (macos-13, macos-x86_64) (push) Waiting to run
CI / build (macos-14, macos-arm64) (push) Waiting to run
CI / build (ubuntu-20.04, linux) (push) Waiting to run
CI / build (windows-2019, windows) (push) Waiting to run
CI / build-wheel (push) Waiting to run
CI / build-windows-installer (push) Waiting to run
CI / test-web-ui (push) Waiting to run
CI / test-docker (push) Blocked by required conditions
CI / docs (push) Waiting to run
CI / check (push) Blocked by required conditions
CI / deploy-docker (push) Blocked by required conditions
CI / deploy (push) Blocked by required conditions
Some checks are pending
autofix.ci / autofix (push) Waiting to run
CI / lint (push) Waiting to run
CI / filename-matching (push) Waiting to run
CI / mypy (push) Waiting to run
CI / individual-coverage (push) Waiting to run
CI / test (macos-latest, 3.13) (push) Waiting to run
CI / test (ubuntu-latest, 3.10) (push) Waiting to run
CI / test (ubuntu-latest, 3.11) (push) Waiting to run
CI / test (ubuntu-latest, 3.12) (push) Waiting to run
CI / test (ubuntu-latest, 3.13) (push) Waiting to run
CI / test (windows-latest, 3.13) (push) Waiting to run
CI / test-old-dependencies (push) Waiting to run
CI / build (macos-13, macos-x86_64) (push) Waiting to run
CI / build (macos-14, macos-arm64) (push) Waiting to run
CI / build (ubuntu-20.04, linux) (push) Waiting to run
CI / build (windows-2019, windows) (push) Waiting to run
CI / build-wheel (push) Waiting to run
CI / build-windows-installer (push) Waiting to run
CI / test-web-ui (push) Waiting to run
CI / test-docker (push) Blocked by required conditions
CI / docs (push) Waiting to run
CI / check (push) Blocked by required conditions
CI / deploy-docker (push) Blocked by required conditions
CI / deploy (push) Blocked by required conditions
This commit is contained in:
parent
ba356376c0
commit
6dce751e62
@ -1,4 +1,4 @@
|
|||||||
export const TOGGLE_VISIBILITY = "COMMANDBAR_TOGGLE_VISIBILITY";
|
import { createSlice } from "@reduxjs/toolkit";
|
||||||
|
|
||||||
interface CommandBarState {
|
interface CommandBarState {
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
@ -8,19 +8,16 @@ export const defaultState: CommandBarState = {
|
|||||||
visible: false,
|
visible: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function reducer(state = defaultState, action): CommandBarState {
|
export const commandBarSlice = createSlice({
|
||||||
switch (action.type) {
|
name: "commandBar",
|
||||||
case TOGGLE_VISIBILITY:
|
initialState: defaultState,
|
||||||
return {
|
reducers: {
|
||||||
...state,
|
toggleVisibility(state) {
|
||||||
visible: !state.visible,
|
state.visible = !state.visible;
|
||||||
};
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
default:
|
const { actions, reducer } = commandBarSlice;
|
||||||
return state;
|
export const { toggleVisibility } = actions;
|
||||||
}
|
export default reducer;
|
||||||
}
|
|
||||||
|
|
||||||
export function toggleVisibility() {
|
|
||||||
return { type: TOGGLE_VISIBILITY };
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user