mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: scratchpad sidebar
This commit is contained in:
1 parent
981f8a4b9d
commit
e3a5543d9f
14 files changed
+239
-65
No files matched your search
@@ -11,10 +11,6 @@ export default function reducer(state = {
|
||||
: false,
|
||||
size: 200,
|
||||
},
|
||||
sidebar: {
|
||||
visible: false,
|
||||
size: 100,
|
||||
},
|
||||
records: {
|
||||
visible: UiContext.canViewRecord && localStorage.getItem('scratchpad/records') === 'true',
|
||||
size: 100,
|
||||
@@ -23,6 +19,7 @@ export default function reducer(state = {
|
||||
isPosting: false,
|
||||
waitSec: 0,
|
||||
isWaiting: false,
|
||||
activePage: 'problem',
|
||||
}, action) {
|
||||
switch (action.type) {
|
||||
case 'SCRATCHPAD_UI_CHANGE_SIZE': {
|
||||
@@ -122,6 +119,12 @@ export default function reducer(state = {
|
||||
},
|
||||
};
|
||||
}
|
||||
case 'SCRATCHPAD_SWITCH_TO_PAGE': {
|
||||
return {
|
||||
...state,
|
||||
activePage: action.payload,
|
||||
};
|
||||
}
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user