qwq
This commit is contained in:
12
src/App.tsx
12
src/App.tsx
@@ -31,6 +31,18 @@ export const applyThemeWithOverrides = (themeConfig: ThemeOptions): ThemeOptions
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
MuiBackdrop: {
|
||||||
|
styleOverrides: {
|
||||||
|
root: {
|
||||||
|
backgroundColor: "rgba(255, 255, 255, 0.15)",
|
||||||
|
backdropFilter: "blur(8px)",
|
||||||
|
"&.MuiBackdrop-invisible": {
|
||||||
|
backgroundColor: "transparent",
|
||||||
|
backdropFilter: "none",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
MuiTooltip: {
|
MuiTooltip: {
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
enterDelay: 500,
|
enterDelay: 500,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export default function PasskeyLoginButton({ autoComplete, ...rest }: PasskeyLog
|
|||||||
window.PublicKeyCredential &&
|
window.PublicKeyCredential &&
|
||||||
PublicKeyCredential.isConditionalMediationAvailable
|
PublicKeyCredential.isConditionalMediationAvailable
|
||||||
) {
|
) {
|
||||||
PublicKeyCredential.isConditionalMediationAvailable().then((v) => {
|
PublicKeyCredential.isConditionalMediationAvailable().then(() => {
|
||||||
if (!abortRef.current.signal.aborted) startLogin(true)();
|
if (!abortRef.current.signal.aborted) startLogin(true)();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -43,12 +43,7 @@ export default function PasskeyLoginButton({ autoComplete, ...rest }: PasskeyLog
|
|||||||
|
|
||||||
const startLogin = (conditional: boolean) => async () => {
|
const startLogin = (conditional: boolean) => async () => {
|
||||||
if (!navigator.credentials || !window.PublicKeyCredential) {
|
if (!navigator.credentials || !window.PublicKeyCredential) {
|
||||||
enqueueSnackbar({
|
enqueueSnackbar(t("setting.browserNotSupported"), { variant: "error", action: DefaultCloseAction });
|
||||||
message: t("setting.browserNotSupported"),
|
|
||||||
variant: "warning",
|
|
||||||
action: DefaultCloseAction,
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,12 +37,7 @@ const PasskeyList = (props: PasskeyProps) => {
|
|||||||
const [deleteLoading, setDeleteLoading] = useState(false);
|
const [deleteLoading, setDeleteLoading] = useState(false);
|
||||||
const addPasskey = async () => {
|
const addPasskey = async () => {
|
||||||
if (!navigator.credentials || !window.PublicKeyCredential) {
|
if (!navigator.credentials || !window.PublicKeyCredential) {
|
||||||
enqueueSnackbar({
|
dispatch(confirmOperation(t("setting.browserNotSupported")));
|
||||||
message: t("setting.browserNotSupported"),
|
|
||||||
variant: "warning",
|
|
||||||
action: DefaultCloseAction,
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user