This is an automated email from the ASF dual-hosted git repository.
juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git
The following commit(s) were added to refs/heads/master by this push:
new c8b235b feat: disable closing plugin drawer on clicking the mask
(#1564)
c8b235b is described below
commit c8b235bb4a60c2d91840a4385649998bd1e9a841
Author: Bisakh Mondal <[email protected]>
AuthorDate: Tue Mar 9 20:25:54 2021 +0530
feat: disable closing plugin drawer on clicking the mask (#1564)
Co-authored-by: 琚致远 <[email protected]>
Co-authored-by: 琚致远 <[email protected]>
---
web/src/components/Plugin/PluginDetail.tsx | 3 +++
web/src/components/Plugin/PluginPage.tsx | 1 +
web/src/pages/Plugin/List.tsx | 1 +
3 files changed, 5 insertions(+)
diff --git a/web/src/components/Plugin/PluginDetail.tsx
b/web/src/components/Plugin/PluginDetail.tsx
index 476d74f..23685e8 100644
--- a/web/src/components/Plugin/PluginDetail.tsx
+++ b/web/src/components/Plugin/PluginDetail.tsx
@@ -46,6 +46,7 @@ type Props = {
pluginList: PluginComponent.Meta[];
readonly?: boolean;
visible: boolean;
+ maskClosable?: boolean;
onClose?: () => void;
onChange?: (data: any) => void;
};
@@ -83,6 +84,7 @@ const PluginDetail: React.FC<Props> = ({
visible,
pluginList = [],
readonly = false,
+ maskClosable = true,
initialData = {},
onClose = () => {},
onChange = () => {},
@@ -168,6 +170,7 @@ const PluginDetail: React.FC<Props> = ({
visible={visible}
placement="right"
closable={false}
+ maskClosable={maskClosable}
onClose={onClose}
width={700}
footer={
diff --git a/web/src/components/Plugin/PluginPage.tsx
b/web/src/components/Plugin/PluginPage.tsx
index 03d2fec..e03aa82 100644
--- a/web/src/components/Plugin/PluginPage.tsx
+++ b/web/src/components/Plugin/PluginPage.tsx
@@ -241,6 +241,7 @@ const PluginPage: React.FC<Props> = ({
visible={name !== NEVER_EXIST_PLUGIN_FLAG}
schemaType={schemaType}
initialData={initialData}
+ maskClosable={false}
pluginList={pluginList}
onClose={() => {
setName(NEVER_EXIST_PLUGIN_FLAG);
diff --git a/web/src/pages/Plugin/List.tsx b/web/src/pages/Plugin/List.tsx
index 0723855..31e4fc0 100644
--- a/web/src/pages/Plugin/List.tsx
+++ b/web/src/pages/Plugin/List.tsx
@@ -110,6 +110,7 @@ const Page: React.FC = () => {
schemaType="route"
initialData={initialData}
pluginList={pluginList}
+ maskClosable={false}
onClose={() => {
setVisible(false);
}}