diff --git a/package-lock.json b/package-lock.json index 219caa086..e1ebe1eff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "@material-ui/lab": "^4.0.0-alpha.61", "@material-ui/styles": "^4.11.4", "@reach/auto-id": "^0.16.0", - "@saleor/macaw-ui": "^0.8.0-pre.66", + "@saleor/macaw-ui": "^0.8.0-pre.68", "@saleor/sdk": "^0.4.6", "@sentry/react": "^6.0.0", "@types/faker": "^5.1.6", @@ -7988,9 +7988,9 @@ } }, "node_modules/@saleor/macaw-ui": { - "version": "0.8.0-pre.66", - "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-0.8.0-pre.66.tgz", - "integrity": "sha512-7iBMoevVsVlGwBIFXUVjIUnuVzKjUph6yMbLy6N5jTxiKOlFK75atRf254er5K4U7cjkTjVw3HorRfvWm7MpeA==", + "version": "0.8.0-pre.68", + "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-0.8.0-pre.68.tgz", + "integrity": "sha512-4P1Ec4dpNk0MyejtosBZLd0EHl3pOBY1aFt09/R0Qpdiyu2+O7Jh/O1pwG+cpaG7J6hcrtMGsfYfLl24PwIAAA==", "dependencies": { "@dessert-box/react": "^0.4.0", "@floating-ui/react-dom-interactions": "^0.5.0", @@ -43153,9 +43153,9 @@ } }, "@saleor/macaw-ui": { - "version": "0.8.0-pre.66", - "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-0.8.0-pre.66.tgz", - "integrity": "sha512-7iBMoevVsVlGwBIFXUVjIUnuVzKjUph6yMbLy6N5jTxiKOlFK75atRf254er5K4U7cjkTjVw3HorRfvWm7MpeA==", + "version": "0.8.0-pre.68", + "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-0.8.0-pre.68.tgz", + "integrity": "sha512-4P1Ec4dpNk0MyejtosBZLd0EHl3pOBY1aFt09/R0Qpdiyu2+O7Jh/O1pwG+cpaG7J6hcrtMGsfYfLl24PwIAAA==", "requires": { "@dessert-box/react": "^0.4.0", "@floating-ui/react-dom-interactions": "^0.5.0", diff --git a/package.json b/package.json index 252f61539..2bce39af4 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@material-ui/lab": "^4.0.0-alpha.61", "@material-ui/styles": "^4.11.4", "@reach/auto-id": "^0.16.0", - "@saleor/macaw-ui": "^0.8.0-pre.66", + "@saleor/macaw-ui": "^0.8.0-pre.68", "@saleor/sdk": "^0.4.6", "@sentry/react": "^6.0.0", "@types/faker": "^5.1.6", diff --git a/src/apps/components/AppListRow/AppListCardActions.tsx b/src/apps/components/AppListRow/AppListCardActions.tsx index 88e745d0e..f5563064f 100644 --- a/src/apps/components/AppListRow/AppListCardActions.tsx +++ b/src/apps/components/AppListRow/AppListCardActions.tsx @@ -2,8 +2,7 @@ import { appInstallationStatusMessages } from "@dashboard/apps/messages"; import { IS_CLOUD_INSTANCE } from "@dashboard/config"; import { AppInstallationFragment } from "@dashboard/graphql"; import { buttonMessages } from "@dashboard/intl"; -import { Tooltip } from "@material-ui/core"; -import { Box, Button, Text } from "@saleor/macaw-ui/next"; +import { Box, Button, Text, Tooltip } from "@saleor/macaw-ui/next"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -74,20 +73,24 @@ const AppListCardActions: React.FC = ({ )} {installHandler && !IS_CLOUD_INSTANCE && ( - -
- -
+ + + + + + + + + {intl.formatMessage(messages.installationCloudOnly)} + )} {installationPending && ( diff --git a/src/apps/components/AppListRow/ErrorInstallAction.tsx b/src/apps/components/AppListRow/ErrorInstallAction.tsx index 7cd89d90b..19f1a0017 100644 --- a/src/apps/components/AppListRow/ErrorInstallAction.tsx +++ b/src/apps/components/AppListRow/ErrorInstallAction.tsx @@ -2,12 +2,8 @@ import { appInstallationStatusMessages } from "@dashboard/apps/messages"; import { AppInstallationFragment } from "@dashboard/graphql"; import { buttonMessages } from "@dashboard/intl"; import { Typography } from "@material-ui/core"; -import { - Button, - Indicator, - Tooltip, - TooltipMountWrapper, -} from "@saleor/macaw-ui"; +import { Button, Indicator, TooltipMountWrapper } from "@saleor/macaw-ui"; +import { Tooltip } from "@saleor/macaw-ui/next"; import React from "react"; import { FormattedMessage } from "react-intl"; @@ -37,10 +33,16 @@ const InstallErrorAction = ({ data-test-id="app-installation-failed" > - - - - + + + + + + + + + {appInstallation?.message} + {retryInstall && ( diff --git a/src/apps/components/AppManifestTableDisplay/AppManifestTableDisplay.tsx b/src/apps/components/AppManifestTableDisplay/AppManifestTableDisplay.tsx index 0199e6001..b8c8567ff 100644 --- a/src/apps/components/AppManifestTableDisplay/AppManifestTableDisplay.tsx +++ b/src/apps/components/AppManifestTableDisplay/AppManifestTableDisplay.tsx @@ -1,6 +1,7 @@ import { appsMessages } from "@dashboard/apps/messages"; import { Typography } from "@material-ui/core"; -import { CopyIcon, Tooltip } from "@saleor/macaw-ui"; +import { CopyIcon } from "@saleor/macaw-ui"; +import { Tooltip } from "@saleor/macaw-ui/next"; import clsx from "clsx"; import React, { useState } from "react"; import { useIntl } from "react-intl"; @@ -21,35 +22,40 @@ export const AppManifestTableDisplay = ({ const [copied, setCopied] = useState(false); return ( - - setCopied(false)} - className={styles.manifestText} - onClick={e => { - try { - e.stopPropagation(); - e.preventDefault(); + + + setCopied(false)} + className={styles.manifestText} + onClick={e => { + try { + e.stopPropagation(); + e.preventDefault(); - navigator.clipboard.writeText(manifestUrl); - setCopied(true); - } catch (e) { - // Copy not supported, ignore - } - }} - > - {getAppDomainFromManifest(manifestUrl)} - {!!navigator.clipboard && ( - - )} - + navigator.clipboard.writeText(manifestUrl); + setCopied(true); + } catch (e) { + // Copy not supported, ignore + } + }} + > + {getAppDomainFromManifest(manifestUrl)} + {!!navigator.clipboard && ( + + )} + + + + + + {intl.formatMessage(appsMessages.appManifestUrl)} + + {manifestUrl} + ); }; diff --git a/src/apps/components/AppPermissions/AppPermissions.tsx b/src/apps/components/AppPermissions/AppPermissions.tsx index 6b3922f9e..24c534c07 100644 --- a/src/apps/components/AppPermissions/AppPermissions.tsx +++ b/src/apps/components/AppPermissions/AppPermissions.tsx @@ -1,6 +1,5 @@ import { AppPermissionFragment } from "@dashboard/graphql"; -import { Tooltip } from "@saleor/macaw-ui"; -import { Box, InfoIcon } from "@saleor/macaw-ui/next"; +import { Box, InfoIcon, Tooltip } from "@saleor/macaw-ui/next"; import React from "react"; import { FormattedMessage } from "react-intl"; @@ -17,9 +16,17 @@ export const AppPermissions: React.FC = ({ const classes = useStyles(); return ( - } - title={ + + + + + + + + + + +
    {permissions?.length ? ( permissions?.map(permission => ( @@ -31,11 +38,7 @@ export const AppPermissions: React.FC = ({ )}
- } - > - - - +
); }; diff --git a/src/apps/components/InstalledAppListRow/AppManifestUrl.tsx b/src/apps/components/InstalledAppListRow/AppManifestUrl.tsx index aa2b8afdb..f1acf11a1 100644 --- a/src/apps/components/InstalledAppListRow/AppManifestUrl.tsx +++ b/src/apps/components/InstalledAppListRow/AppManifestUrl.tsx @@ -1,7 +1,9 @@ -import { Tooltip } from "@saleor/macaw-ui"; -import { Box, CopyIcon, Text } from "@saleor/macaw-ui/next"; +import { Box, CopyIcon, Text, Tooltip } from "@saleor/macaw-ui/next"; import clsx from "clsx"; import React, { useState } from "react"; +import { FormattedMessage } from "react-intl"; + +import { appsMessages } from "../../messages"; interface AppManifestUrlProps { manifestUrl: string; @@ -27,12 +29,21 @@ export const AppManifestUrl: React.FC = ({ } }} > - - - - {new URL(manifestUrl).host} - - + + + + + {new URL(manifestUrl).host} + + + + + + + + + {manifestUrl} + = props => { )} {appInstallation?.status === JobStatusEnum.FAILED && ( <> - - - - - - - + + + + + + + + + + + + {appInstallation.message} +