From ad036b05dd25cd0cc64db0ba2af185de995dd209 Mon Sep 17 00:00:00 2001 From: mintsweet <0x1304570@gmail.com> Date: Fri, 26 Jan 2024 22:51:01 +1300 Subject: [PATCH 1/2] fix: operator toast control error --- config-ui/src/utils/operator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config-ui/src/utils/operator.ts b/config-ui/src/utils/operator.ts index e14263b4f27..af3126ec995 100644 --- a/config-ui/src/utils/operator.ts +++ b/config-ui/src/utils/operator.ts @@ -46,14 +46,14 @@ export const operator = async (request: () => Promise, config?: OperateCon setOperating?.(true); const res = await request(); const content = formatMessage?.() ?? 'Operation successfully completed'; - if (!config?.hideToast || !config?.hideSuccessToast) { + if (!config?.hideToast && !config?.hideSuccessToast) { message.success(content); } return [true, res]; } catch (err) { console.error('Operation failed.', err); const reason = formatReason?.(err) ?? (err as any).response?.data?.message ?? 'Operation failed.'; - if (!config?.hideToast || !config?.hideErrorToast) { + if (!config?.hideToast && !config?.hideErrorToast) { message.error(reason); } From 4a890930e5d517afe6040b9387cd8923498adf4b Mon Sep 17 00:00:00 2001 From: mintsweet <0x1304570@gmail.com> Date: Fri, 26 Jan 2024 22:53:00 +1300 Subject: [PATCH 2/2] fix: adapt to small screen margins --- config-ui/src/routes/layout/layout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config-ui/src/routes/layout/layout.tsx b/config-ui/src/routes/layout/layout.tsx index 324bcac8896..bd28eea8485 100644 --- a/config-ui/src/routes/layout/layout.tsx +++ b/config-ui/src/routes/layout/layout.tsx @@ -162,7 +162,7 @@ export const Layout = () => { ))} - + {!import.meta.env.DEVLAKE_COPYRIGHT_HIDE && (