From f6695817a7feffb339d549f7b12c3411c9848bd6 Mon Sep 17 00:00:00 2001 From: Lukasz Ostrowski Date: Wed, 19 Jul 2023 11:26:00 +0200 Subject: [PATCH] cms v1 - notice about deprecation (#787) --- .changeset/eleven-students-cheer.md | 5 +++++ apps/cms/README.md | 8 +++++++- .../modules/ui/error-no-longer-maintained.tsx | 18 ++++++++++++++++++ apps/cms/src/pages/home.tsx | 2 ++ apps/cms/src/pages/index.tsx | 2 ++ 5 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .changeset/eleven-students-cheer.md create mode 100644 apps/cms/src/modules/ui/error-no-longer-maintained.tsx diff --git a/.changeset/eleven-students-cheer.md b/.changeset/eleven-students-cheer.md new file mode 100644 index 0000000..b7698ca --- /dev/null +++ b/.changeset/eleven-students-cheer.md @@ -0,0 +1,5 @@ +--- +"saleor-app-cms": minor +--- + +Added warning bar that informs that app is no longer maintained diff --git a/apps/cms/README.md b/apps/cms/README.md index d156161..976f4fa 100644 --- a/apps/cms/README.md +++ b/apps/cms/README.md @@ -1,7 +1,13 @@ +# Deprecated + +This is v1 version of the CMS app. It's no longer maintained and will be removed. + +Please check [v2](../cms-v2/) + ![CMS](https://user-images.githubusercontent.com/249912/71523206-4e45f800-28c8-11ea-84ba-345a9bfc998a.png)
-

CMS

+

CMS v1

# Overview diff --git a/apps/cms/src/modules/ui/error-no-longer-maintained.tsx b/apps/cms/src/modules/ui/error-no-longer-maintained.tsx new file mode 100644 index 0000000..adea285 --- /dev/null +++ b/apps/cms/src/modules/ui/error-no-longer-maintained.tsx @@ -0,0 +1,18 @@ +export const ErrorNoLongerMaintained = () => ( +
+

+ Warning +

+

The app is no longer maintained. Please install CMS V2 app from the Saleor App Store

+
+); diff --git a/apps/cms/src/pages/home.tsx b/apps/cms/src/pages/home.tsx index 6d3fc29..3dec8d4 100644 --- a/apps/cms/src/pages/home.tsx +++ b/apps/cms/src/pages/home.tsx @@ -6,6 +6,7 @@ import { ReactElement } from "react"; import { AppTabNavButton } from "../modules/ui/app-tab-nav-button"; import { makeStyles } from "@saleor/macaw-ui"; import { Box, Typography } from "@material-ui/core"; +import { ErrorNoLongerMaintained } from "../modules/ui/error-no-longer-maintained"; const useStyles = makeStyles({ section: { @@ -70,6 +71,7 @@ const HomePage: NextPageWithLayout = () => { HomePage.getLayout = function getLayout(page: ReactElement) { return (
+ {page}
); diff --git a/apps/cms/src/pages/index.tsx b/apps/cms/src/pages/index.tsx index c35ddcd..18a78ae 100644 --- a/apps/cms/src/pages/index.tsx +++ b/apps/cms/src/pages/index.tsx @@ -4,6 +4,7 @@ import { useRouter } from "next/router"; import { useEffect } from "react"; import { useIsMounted } from "usehooks-ts"; import { isInIframe } from "@saleor/apps-shared"; +import { ErrorNoLongerMaintained } from "../modules/ui/error-no-longer-maintained"; /** * This is page publicly accessible from your app. @@ -26,6 +27,7 @@ const IndexPage: NextPage = () => { return (
+

Saleor CMS Hub

This is Saleor App that allows to use external cms providers to sync products data.

Install the app in your Saleor instance and open it in Dashboard.