mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-13 13:30:31 +08:00
fix(monaco): disable MUI Dialog focus enforcement for Monaco editor #5885
Closes #5885
This commit is contained in:
parent
6f61759a39
commit
5afe11e55b
@ -3,6 +3,7 @@
|
|||||||
### 🐞 修复问题
|
### 🐞 修复问题
|
||||||
|
|
||||||
- 修复 macOS 有线网络 DNS 劫持失败
|
- 修复 macOS 有线网络 DNS 劫持失败
|
||||||
|
- 修复 Monaco 编辑器内右键菜单显示异常
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary><strong> ✨ 新增功能 </strong></summary>
|
<summary><strong> ✨ 新增功能 </strong></summary>
|
||||||
|
|||||||
@ -15,6 +15,7 @@ interface Props {
|
|||||||
open: boolean;
|
open: boolean;
|
||||||
okBtn?: ReactNode;
|
okBtn?: ReactNode;
|
||||||
cancelBtn?: ReactNode;
|
cancelBtn?: ReactNode;
|
||||||
|
disableEnforceFocus?: boolean;
|
||||||
disableOk?: boolean;
|
disableOk?: boolean;
|
||||||
disableCancel?: boolean;
|
disableCancel?: boolean;
|
||||||
disableFooter?: boolean;
|
disableFooter?: boolean;
|
||||||
@ -37,6 +38,7 @@ export const BaseDialog: React.FC<Props> = ({
|
|||||||
children,
|
children,
|
||||||
okBtn,
|
okBtn,
|
||||||
cancelBtn,
|
cancelBtn,
|
||||||
|
disableEnforceFocus,
|
||||||
contentSx,
|
contentSx,
|
||||||
disableCancel,
|
disableCancel,
|
||||||
disableOk,
|
disableOk,
|
||||||
@ -47,7 +49,11 @@ export const BaseDialog: React.FC<Props> = ({
|
|||||||
onClose,
|
onClose,
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onClose={onClose}>
|
<Dialog
|
||||||
|
open={open}
|
||||||
|
onClose={onClose}
|
||||||
|
disableEnforceFocus={disableEnforceFocus}
|
||||||
|
>
|
||||||
<DialogTitle>{title}</DialogTitle>
|
<DialogTitle>{title}</DialogTitle>
|
||||||
|
|
||||||
<DialogContent sx={contentSx}>{children}</DialogContent>
|
<DialogContent sx={contentSx}>{children}</DialogContent>
|
||||||
|
|||||||
@ -382,7 +382,13 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onClose={onClose} maxWidth="xl" fullWidth>
|
<Dialog
|
||||||
|
open={open}
|
||||||
|
onClose={onClose}
|
||||||
|
maxWidth="xl"
|
||||||
|
fullWidth
|
||||||
|
disableEnforceFocus
|
||||||
|
>
|
||||||
<DialogTitle>{resolvedTitle}</DialogTitle>
|
<DialogTitle>{resolvedTitle}</DialogTitle>
|
||||||
|
|
||||||
<DialogContent
|
<DialogContent
|
||||||
|
|||||||
@ -427,7 +427,13 @@ export const GroupsEditorViewer = (props: Props) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onClose={onClose} maxWidth="xl" fullWidth>
|
<Dialog
|
||||||
|
open={open}
|
||||||
|
onClose={onClose}
|
||||||
|
maxWidth="xl"
|
||||||
|
fullWidth
|
||||||
|
disableEnforceFocus={!visualization}
|
||||||
|
>
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
{
|
{
|
||||||
<Box display="flex" justifyContent="space-between">
|
<Box display="flex" justifyContent="space-between">
|
||||||
|
|||||||
@ -272,7 +272,13 @@ export const ProxiesEditorViewer = (props: Props) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onClose={onClose} maxWidth="xl" fullWidth>
|
<Dialog
|
||||||
|
open={open}
|
||||||
|
onClose={onClose}
|
||||||
|
maxWidth="xl"
|
||||||
|
fullWidth
|
||||||
|
disableEnforceFocus={!visualization}
|
||||||
|
>
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
{
|
{
|
||||||
<Box display="flex" justifyContent="space-between">
|
<Box display="flex" justifyContent="space-between">
|
||||||
|
|||||||
@ -506,7 +506,13 @@ export const RulesEditorViewer = (props: Props) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onClose={onClose} maxWidth="xl" fullWidth>
|
<Dialog
|
||||||
|
open={open}
|
||||||
|
onClose={onClose}
|
||||||
|
maxWidth="xl"
|
||||||
|
fullWidth
|
||||||
|
disableEnforceFocus={!visualization}
|
||||||
|
>
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
{
|
{
|
||||||
<Box display="flex" justifyContent="space-between">
|
<Box display="flex" justifyContent="space-between">
|
||||||
|
|||||||
@ -612,6 +612,7 @@ export function DnsViewer({ ref }: { ref?: Ref<DialogRef> }) {
|
|||||||
return (
|
return (
|
||||||
<BaseDialog
|
<BaseDialog
|
||||||
open={open}
|
open={open}
|
||||||
|
disableEnforceFocus={!visualization}
|
||||||
title={
|
title={
|
||||||
<Box display="flex" justifyContent="space-between" alignItems="center">
|
<Box display="flex" justifyContent="space-between" alignItems="center">
|
||||||
{t("settings.modals.dns.dialog.title")}
|
{t("settings.modals.dns.dialog.title")}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user