From d362fe8c6ce65ca7f033dc655cec274e45ac266c Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 14 Feb 2023 23:52:48 +0100 Subject: [PATCH] Implement modal changes --- .../helper/src/lib/helper-components.tsx | 25 +++++++++++++++++++ .../src/lib/remix-ui-modal-dialog.tsx | 4 +-- .../modal-dialog/src/lib/types/index.ts | 4 ++- .../run-tab/src/lib/actions/deploy.ts | 8 +++--- .../remix-ui/run-tab/src/lib/actions/index.ts | 2 +- .../src/lib/components/contractGUI.tsx | 12 ++++----- libs/remix-ui/run-tab/src/lib/run-tab.tsx | 8 +++--- libs/remix-ui/run-tab/src/lib/types/index.ts | 16 ++++++------ 8 files changed, 54 insertions(+), 25 deletions(-) diff --git a/libs/remix-ui/helper/src/lib/helper-components.tsx b/libs/remix-ui/helper/src/lib/helper-components.tsx index ba482551c9..6403557278 100644 --- a/libs/remix-ui/helper/src/lib/helper-components.tsx +++ b/libs/remix-ui/helper/src/lib/helper-components.tsx @@ -1,3 +1,4 @@ +import { LayoutCompatibilityReport } from '@openzeppelin/upgrades-core/dist/storage/report' import React from 'react' export const fileChangedToastMsg = (from: string, path: string) => ( @@ -115,3 +116,27 @@ export const upgradeWithProxyMsg = () => ( ) + +export const unavailableProxyLayoutMsg = () => ( +
+

Previous contract implementation not available for upgrade comparison.
A new storage layout will be saved for future upgrades.

+
+) + +export const upgradeReportMsg = (report: LayoutCompatibilityReport) => ( +
+
+ + + +
+ The storage layout of new implementation is NOT + compatible with the previous implementation. + Your contract's storage may be partially or fully erased! +
+
+
+ { report.explain() } +
+
+) diff --git a/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx b/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx index 936956c62a..4d74918338 100644 --- a/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx +++ b/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx @@ -98,7 +98,7 @@ export const ModalDialog = (props: ModalDialogProps) => { {/* todo add autofocus ^^ */} { props.okLabel &&