From 286e9a15247d725b4dd50ab938a08da0f16c1bdc Mon Sep 17 00:00:00 2001 From: David Luzar Date: Thu, 6 May 2021 21:29:05 +0200 Subject: [PATCH] feat: add temporary Excalidraw+ promo (#3540) * feat: add temporary Excalidraw+ promo * add seemingly required query params --- src/excalidraw-app/index.tsx | 59 +++++++++++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 7 deletions(-) diff --git a/src/excalidraw-app/index.tsx b/src/excalidraw-app/index.tsx index a2cfc056..56479861 100644 --- a/src/excalidraw-app/index.tsx +++ b/src/excalidraw-app/index.tsx @@ -52,7 +52,6 @@ import { } from "./data/localStorage"; import CustomStats from "./CustomStats"; import { RestoredDataState } from "../data/restore"; -import { GitHubCorner } from "./components/GitHubCorner"; const languageDetector = new LanguageDetector(); languageDetector.init({ @@ -162,6 +161,20 @@ const initializeScene = async (opts: { return null; }; +const PlusLinkJSX = ( +

+ Introducing Excalidraw+ +
+ + Try out now! + +

+); + const ExcalidrawWrapper = () => { const [errorMessage, setErrorMessage] = useState(""); const currentLangCode = languageDetector.detect() || defaultLang.code; @@ -294,8 +307,16 @@ const ExcalidrawWrapper = () => { const renderTopRight = useCallback( (isMobile: boolean, appState: AppState) => { return ( -
- +
+ {/* */} + {/* FIXME remove after 2021-05-20 */} + {PlusLinkJSX}
); }, @@ -315,11 +336,35 @@ const ExcalidrawWrapper = () => { /> ); if (isMobile) { + const isTinyDevice = window.innerWidth < 362; return ( -
- {t("labels.language")} - {renderLanguageList()} -
+
+
+ {t("labels.language")} + {renderLanguageList()} +
+ {/* FIXME remove after 2021-05-20 */} +
+ {PlusLinkJSX} +
+
); } return renderLanguageList();