mirror of
https://github.com/cloudreve/frontend.git
synced 2025-12-26 04:02:47 +00:00
fix: cannot clear color value when creating themes
This commit is contained in:
parent
566900ccbb
commit
0deacc2d4d
|
|
@ -52,7 +52,11 @@ export default function CreateTheme({ open, onClose, onSubmit }) {
|
|||
});
|
||||
|
||||
const subTheme = useCallback(() => {
|
||||
return createMuiTheme(theme);
|
||||
try {
|
||||
return createMuiTheme(theme);
|
||||
} catch (e) {
|
||||
return createMuiTheme({});
|
||||
}
|
||||
}, [theme]);
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -483,7 +483,10 @@ export const selectFile = (file: any, event: any, fileIndex: any) => {
|
|||
const { ctrlKey, metaKey, shiftKey } = event;
|
||||
return (dispatch: any, getState: any) => {
|
||||
// 多种组合操作忽略
|
||||
if ([ctrlKey, shiftKey].filter(Boolean).length > 1 || [metaKey, shiftKey].filter(Boolean).length > 1) {
|
||||
if (
|
||||
[ctrlKey, shiftKey].filter(Boolean).length > 1 ||
|
||||
[metaKey, shiftKey].filter(Boolean).length > 1
|
||||
) {
|
||||
return;
|
||||
}
|
||||
const isMacbook = isMac();
|
||||
|
|
|
|||
Loading…
Reference in New Issue