diff --git a/.env.example b/.env.example index 44839a1b..9c672c0c 100644 --- a/.env.example +++ b/.env.example @@ -45,10 +45,10 @@ NEXT_PUBLIC_VERSION= NEXT_PUBLIC_ENVIRONMENT= # ============================================================================= -# `NEXT_PRIVATE_ZEPLIN_WEB_APP_BASE_URL`: +# `NEXT_PUBLIC_ZEPLIN_WEB_APP_BASE_URL`: # The url of Zeplin web app. "https://app.zeplin.io" by default # ============================================================================= -NEXT_PRIVATE_ZEPLIN_WEB_APP_BASE_URL= +NEXT_PUBLIC_ZEPLIN_WEB_APP_BASE_URL= # ============================================================================= # `NEXT_PRIVATE_ZEPLIN_MAC_APP_URL_SCHEME`: diff --git a/src/client/containers/ConfigurationContainer/components/Login/Login.tsx b/src/client/containers/ConfigurationContainer/components/Login/Login.tsx index a52bc66a..d34424b6 100644 --- a/src/client/containers/ConfigurationContainer/components/Login/Login.tsx +++ b/src/client/containers/ConfigurationContainer/components/Login/Login.tsx @@ -1,36 +1,70 @@ import React, { FunctionComponent } from "react"; import { Button, Flex, Text, ErrorIcon } from "@fluentui/react-northstar"; +import { ZEPLIN_WEB_APP_BASE_URL } from "../../../../lib/config"; interface LoginProps { error?: string; onButtonClick: () => void; } +const signupURL = new URL(ZEPLIN_WEB_APP_BASE_URL); +signupURL.pathname = `signup`; + export const Login: FunctionComponent = ({ error, onButtonClick }) => ( - -
- - - One more step before finishing connection - - - Once proceeding, we will ask you to authorize Microsoft Teams access through a separate window. Once - it’s authorized, you can do more advanced settings on the Microsoft Teams channel linked with Zeplin. - - {error && ( - - - - {error} - - - )} + + +
+ + + One more step before finishing connection + + + Once proceeding, we will ask you to authorize Microsoft Teams access through a separate window. Once + it’s authorized, you can do more advanced settings on the Microsoft Teams channel linked with + Zeplin. If you’re not a Zeplin user, you can sign up from + here + . + + {error && ( + + + + {error} + + + )} + +
+
-
-
+ + You can learn more about the integration from + here + . + ); diff --git a/src/client/lib/config.ts b/src/client/lib/config.ts index b09b9760..7fe3f523 100644 --- a/src/client/lib/config.ts +++ b/src/client/lib/config.ts @@ -5,4 +5,6 @@ export const ENVIRONMENT = process.env.NEXT_PUBLIC_ENVIRONMENT; export const IS_DEV = process.env.NODE_ENV !== "production"; export const IS_SENTRY_ENABLED = process.env.NEXT_PUBLIC_IS_SENTRY_ENABLED ? process.env.NEXT_PUBLIC_IS_SENTRY_ENABLED.toLowerCase() === "true" - : !IS_DEV; \ No newline at end of file + : !IS_DEV; +export const ZEPLIN_WEB_APP_BASE_URL = process.env.NEXT_PUBLIC_ZEPLIN_WEB_APP_BASE_URL ?? + "https://app.zeplin.io"; \ No newline at end of file diff --git a/src/server/config.ts b/src/server/config.ts index c3f8919d..1e731234 100644 --- a/src/server/config.ts +++ b/src/server/config.ts @@ -34,7 +34,7 @@ export const { NEXT_PRIVATE_ZEPLIN_CLIENT_SECRET: ZEPLIN_CLIENT_SECRET, NEXT_PRIVATE_MONGO_URL: MONGO_URL = "mongodb://localhost:27017/zeplin-microsoft-teams-app", NEXT_PRIVATE_BASE_URL: BASE_URL, - NEXT_PRIVATE_ZEPLIN_WEB_APP_BASE_URL: ZEPLIN_WEB_APP_BASE_URL = "https://app.zeplin.io", + NEXT_PUBLIC_ZEPLIN_WEB_APP_BASE_URL: ZEPLIN_WEB_APP_BASE_URL = "https://app.zeplin.io", NEXT_PRIVATE_ZEPLIN_MAC_APP_URL_SCHEME: ZEPLIN_MAC_APP_URL_SCHEME = "zpl" } = process.env;