瀏覽代碼

Merge remote-tracking branch 'origin/release' into danieljgeiger-mathjax-maint-stage

Daniel J. Geiger 1 年之前
父節點
當前提交
1f496d9f64
共有 41 個文件被更改,包括 156 次插入46 次删除
  1. 3 0
      .env.development
  2. 4 1
      .env.production
  3. 二進制
      .github/assets/logo.png
  4. 2 2
      README.md
  5. 2 2
      dev-docs/docusaurus.config.js
  6. 二進制
      dev-docs/static/img/favicon.ico
  7. 二進制
      dev-docs/static/img/favicon.png
  8. 4 3
      dev-docs/static/img/logo.svg
  9. 二進制
      dev-docs/static/img/og-image-2.png
  10. 二進制
      dev-docs/static/img/og-image-sm.png
  11. 6 4
      index.html
  12. 二進制
      public/android-chrome-192x192.png
  13. 二進制
      public/android-chrome-512x512.png
  14. 二進制
      public/apple-touch-icon.png
  15. 二進制
      public/favicon-16x16.png
  16. 二進制
      public/favicon-32x32.png
  17. 二進制
      public/favicon.ico
  18. 4 0
      public/favicon.svg
  19. 二進制
      public/logo-180x180.png
  20. 2 2
      public/manifest.json
  21. 二進制
      public/maskable_icon_x192.png
  22. 二進制
      public/maskable_icon_x512.png
  23. 二進制
      public/og-fb-v1.png
  24. 二進制
      public/og-general-v1.png
  25. 二進制
      public/og-image-2.png
  26. 二進制
      public/og-image-sm.png
  27. 二進制
      public/og-image.png
  28. 二進制
      public/og-twitter-v1.png
  29. 73 0
      src/components/ExcalidrawLogo.scss
  30. 10 0
      src/components/ExcalidrawLogo.tsx
  31. 0 0
      src/components/icons.tsx
  32. 3 2
      src/components/welcome-screen/WelcomeScreen.Center.tsx
  33. 7 5
      src/components/welcome-screen/WelcomeScreen.scss
  34. 5 0
      src/css/theme.scss
  35. 3 1
      src/excalidraw-app/components/AppMainMenu.tsx
  36. 3 1
      src/excalidraw-app/components/AppWelcomeScreen.tsx
  37. 13 3
      src/excalidraw-app/components/ExportToExcalidrawPlus.tsx
  38. 0 9
      src/excalidraw-app/components/icons.tsx
  39. 7 9
      src/tests/__snapshots__/MobileMenu.test.tsx.snap
  40. 3 0
      src/vite-env.d.ts
  41. 2 2
      vite.config.ts

+ 3 - 0
.env.development

@@ -10,6 +10,9 @@ VITE_APP_WS_SERVER_URL=http://localhost:3002
 # set this only if using the collaboration workflow we use on excalidraw.com
 VITE_APP_PORTAL_URL=
 
+VITE_APP_PLUS_LP=https://plus.excalidraw.com
+VITE_APP_PLUS_APP=https://app.excalidraw.com
+
 VITE_APP_FIREBASE_CONFIG='{"apiKey":"AIzaSyCMkxA60XIW8KbqMYL7edC4qT5l4qHX2h8","authDomain":"excalidraw-oss-dev.firebaseapp.com","projectId":"excalidraw-oss-dev","storageBucket":"excalidraw-oss-dev.appspot.com","messagingSenderId":"664559512677","appId":"1:664559512677:web:a385181f2928d328a7aa8c"}'
 
 # put these in your .env.local, or make sure you don't commit!

+ 4 - 1
.env.production

@@ -5,11 +5,14 @@ VITE_APP_LIBRARY_URL=https://libraries.excalidraw.com
 VITE_APP_LIBRARY_BACKEND=https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries
 
 VITE_APP_PORTAL_URL=https://portal.excalidraw.com
+
+VITE_APP_PLUS_LP=https://plus.excalidraw.com
+VITE_APP_PLUS_APP=https://app.excalidraw.com
+
 # Fill to set socket server URL used for collaboration.
 # Meant for forks only: excalidraw.com uses custom VITE_APP_PORTAL_URL flow
 VITE_APP_WS_SERVER_URL=
 
 VITE_APP_FIREBASE_CONFIG='{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}'
 
-VITE_APP_PLUS_APP=https://app.excalidraw.com
 VITE_APP_DISABLE_TRACKING=

二進制
.github/assets/logo.png


+ 2 - 2
README.md

@@ -1,7 +1,7 @@
 <a href="https://excalidraw.com/" target="_blank" rel="noopener">
   <picture>
-    <source media="(prefers-color-scheme: dark)" alt="Excalidraw" srcset="https://excalidraw.nyc3.cdn.digitaloceanspaces.com/github%2FExcalidraw_Github_cover_dark.png" />
-    <img alt="Excalidraw" src="https://excalidraw.nyc3.cdn.digitaloceanspaces.com/github%2FExcalidraw_Github_cover.png" />
+    <source media="(prefers-color-scheme: dark)" alt="Excalidraw" srcset="https://excalidraw.nyc3.cdn.digitaloceanspaces.com/github/excalidraw_github_cover_2_dark.png" />
+    <img alt="Excalidraw" src="https://excalidraw.nyc3.cdn.digitaloceanspaces.com/github/excalidraw_github_cover_2.png" />
   </picture>
 </a>
 

+ 2 - 2
dev-docs/docusaurus.config.js

@@ -10,7 +10,7 @@ const config = {
   baseUrl: "/",
   onBrokenLinks: "throw",
   onBrokenMarkdownLinks: "warn",
-  favicon: "img/favicon.ico",
+  favicon: "img/favicon.png",
   organizationName: "Excalidraw", // Usually your GitHub org/user name.
   projectName: "excalidraw", // Usually your repo name.
 
@@ -123,7 +123,7 @@ const config = {
       prism: {
         theme: require("prism-react-renderer/themes/dracula"),
       },
-      image: "img/og-image.png",
+      image: "img/og-image-2.png",
       docs: {
         sidebar: {
           hideable: true,

二進制
dev-docs/static/img/favicon.ico


二進制
dev-docs/static/img/favicon.png


File diff suppressed because it is too large
+ 4 - 3
dev-docs/static/img/logo.svg


二進制
dev-docs/static/img/og-image-2.png


二進制
dev-docs/static/img/og-image-sm.png


+ 6 - 4
index.html

@@ -20,7 +20,7 @@
       name="description"
       content="Excalidraw is a virtual collaborative whiteboard tool that lets you easily sketch diagrams that have a hand-drawn feel to them."
     />
-    <meta name="image" content="https://excalidraw.com/og-general-v1.png" />
+    <meta name="image" content="https://excalidraw.com/og-image-2.png" />
 
     <!-- Open Graph / Facebook -->
     <meta property="og:site_name" content="Excalidraw" />
@@ -35,7 +35,7 @@
       property="og:description"
       content="Excalidraw is a virtual collaborative whiteboard tool that lets you easily sketch diagrams that have a hand-drawn feel to them."
     />
-    <meta property="og:image" content="https://excalidraw.com/og-fb-v1.png" />
+    <meta property="og:image" content="https://excalidraw.com/og-image-2.png" />
 
     <!-- Twitter -->
     <meta property="twitter:card" content="summary_large_image" />
@@ -51,7 +51,7 @@
     />
     <meta
       property="twitter:image"
-      content="https://excalidraw.com/og-twitter-v1.png"
+      content="https://excalidraw.com/og-twitter-v2.png"
     />
 
     <!-- General tags -->
@@ -99,7 +99,9 @@
     </script>
     <% } %>
 
-    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+    <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
+    <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
+    <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
 
     <!-- Excalidraw version -->
     <meta name="version" content="{version}" />

二進制
public/android-chrome-192x192.png


二進制
public/android-chrome-512x512.png


二進制
public/apple-touch-icon.png


二進制
public/favicon-16x16.png


二進制
public/favicon-32x32.png


二進制
public/favicon.ico


File diff suppressed because it is too large
+ 4 - 0
public/favicon.svg


二進制
public/logo-180x180.png


+ 2 - 2
public/manifest.json

@@ -4,8 +4,8 @@
   "description": "Excalidraw is a whiteboard tool that lets you easily sketch diagrams that have a hand-drawn feel to them.",
   "icons": [
     {
-      "src": "logo-180x180.png",
-      "sizes": "180x180",
+      "src": "android-chrome-192x192.png",
+      "sizes": "192x192",
       "type": "image/png"
     },
     {

二進制
public/maskable_icon_x192.png


二進制
public/maskable_icon_x512.png


二進制
public/og-fb-v1.png


二進制
public/og-general-v1.png


二進制
public/og-image-2.png


二進制
public/og-image-sm.png


二進制
public/og-image.png


二進制
public/og-twitter-v1.png


+ 73 - 0
src/components/ExcalidrawLogo.scss

@@ -0,0 +1,73 @@
+.excalidraw {
+  .ExcalidrawLogo {
+    --logo-icon--xs: 2rem;
+    --logo-text--xs: 1.5rem;
+
+    --logo-icon--small: 2.5rem;
+    --logo-text--small: 1.75rem;
+
+    --logo-icon--normal: 3rem;
+    --logo-text--normal: 2.2rem;
+
+    --logo-icon--large: 90px;
+    --logo-text--large: 65px;
+
+    display: flex;
+    align-items: center;
+
+    svg {
+      flex: 0 0 auto;
+    }
+
+    .ExcalidrawLogo-icon {
+      width: auto;
+      color: var(--color-logo-icon);
+    }
+
+    .ExcalidrawLogo-text {
+      margin-left: 0.75rem;
+      width: auto;
+      color: var(--color-logo-text);
+    }
+
+    &.is-xs {
+      .ExcalidrawLogo-icon {
+        height: var(--logo-icon--xs);
+      }
+
+      .ExcalidrawLogo-text {
+        height: var(--logo-text--xs);
+      }
+    }
+
+    &.is-small {
+      .ExcalidrawLogo-icon {
+        height: var(--logo-icon--small);
+      }
+
+      .ExcalidrawLogo-text {
+        height: var(--logo-text--small);
+      }
+    }
+
+    &.is-normal {
+      .ExcalidrawLogo-icon {
+        height: var(--logo-icon--normal);
+      }
+
+      .ExcalidrawLogo-text {
+        height: var(--logo-text--normal);
+      }
+    }
+
+    &.is-large {
+      .ExcalidrawLogo-icon {
+        height: var(--logo-icon--large);
+      }
+
+      .ExcalidrawLogo-text {
+        height: var(--logo-text--large);
+      }
+    }
+  }
+}

File diff suppressed because it is too large
+ 10 - 0
src/components/ExcalidrawLogo.tsx


File diff suppressed because it is too large
+ 0 - 0
src/components/icons.tsx


+ 3 - 2
src/components/welcome-screen/WelcomeScreen.Center.tsx

@@ -3,8 +3,9 @@ import { getShortcutFromShortcutName } from "../../actions/shortcuts";
 import { t, useI18n } from "../../i18n";
 import { useDevice, useExcalidrawActionManager } from "../App";
 import { useTunnels } from "../../context/tunnels";
-import { ExcalLogo, HelpIcon, LoadIcon, usersIcon } from "../icons";
+import { HelpIcon, LoadIcon, usersIcon } from "../icons";
 import { useUIAppState } from "../../context/ui-appState";
+import { ExcalidrawLogo } from "../ExcalidrawLogo";
 
 const WelcomeScreenMenuItemContent = ({
   icon,
@@ -109,7 +110,7 @@ Center.displayName = "Center";
 const Logo = ({ children }: { children?: React.ReactNode }) => {
   return (
     <div className="welcome-screen-center__logo virgil welcome-screen-decor">
-      {children || <>{ExcalLogo} Excalidraw</>}
+      {children || <ExcalidrawLogo withText />}
     </div>
   );
 };

+ 7 - 5
src/components/welcome-screen/WelcomeScreen.scss

@@ -10,6 +10,13 @@
     pointer-events: none;
 
     color: var(--color-gray-40);
+
+    a {
+      --color: var(--color-primary);
+      color: var(--color);
+      text-decoration: none;
+      margin-bottom: -6px;
+    }
   }
 
   &.theme--dark {
@@ -136,11 +143,6 @@
     align-items: center;
     column-gap: 0.75rem;
     font-size: 2.25rem;
-
-    svg {
-      width: 1.625rem;
-      height: auto;
-    }
   }
 
   .welcome-screen-center__heading {

+ 5 - 0
src/css/theme.scss

@@ -126,6 +126,9 @@
   --color-success: #268029;
   --color-success-lighter: #cafccc;
 
+  --color-logo-icon: var(--color-primary);
+  --color-logo-text: #190064;
+
   --border-radius-md: 0.375rem;
   --border-radius-lg: 0.5rem;
 
@@ -219,5 +222,7 @@
     --color-muted-background-darker: var(--color-gray-20);
 
     --color-promo: #d297ff;
+
+    --color-logo-text: #e2dfff;
   }
 }

+ 3 - 1
src/excalidraw-app/components/AppMainMenu.tsx

@@ -26,7 +26,9 @@ export const AppMainMenu: React.FC<{
       <MainMenu.Separator />
       <MainMenu.ItemLink
         icon={PlusPromoIcon}
-        href="https://plus.excalidraw.com/plus?utm_source=excalidraw&utm_medium=app&utm_content=hamburger"
+        href={`${
+          import.meta.env.VITE_APP_PLUS_LP
+        }/plus?utm_source=excalidraw&utm_medium=app&utm_content=hamburger`}
         className="ExcalidrawPlus"
       >
         Excalidraw+

+ 3 - 1
src/excalidraw-app/components/AppWelcomeScreen.tsx

@@ -56,7 +56,9 @@ export const AppWelcomeScreen: React.FC<{
           )}
           {!isExcalidrawPlusSignedUser && (
             <WelcomeScreen.Center.MenuItemLink
-              href="https://plus.excalidraw.com/plus?utm_source=excalidraw&utm_medium=app&utm_content=welcomeScreenGuest"
+              href={`${
+                import.meta.env.VITE_APP_PLUS_LP
+              }/plus?utm_source=excalidraw&utm_medium=app&utm_content=welcomeScreenGuest`}
               shortcut={null}
               icon={PlusPromoIcon}
             >

+ 13 - 3
src/excalidraw-app/components/ExportToExcalidrawPlus.tsx

@@ -7,7 +7,6 @@ import { FileId, NonDeletedExcalidrawElement } from "../../element/types";
 import { AppState, BinaryFileData, BinaryFiles } from "../../types";
 import { nanoid } from "nanoid";
 import { useI18n } from "../../i18n";
-import { excalidrawPlusIcon } from "./icons";
 import { encryptData, generateEncryptionKey } from "../../data/encryption";
 import { isInitializedImageElement } from "../../element/typeChecks";
 import { FILE_UPLOAD_MAX_BYTES } from "../app_constants";
@@ -15,6 +14,7 @@ import { encodeFilesForUpload } from "../data/FileManager";
 import { MIME_TYPES } from "../../constants";
 import { trackEvent } from "../../analytics";
 import { getFrame } from "../../utils";
+import { ExcalidrawLogo } from "../../components/ExcalidrawLogo";
 
 export const exportToExcalidrawPlus = async (
   elements: readonly NonDeletedExcalidrawElement[],
@@ -69,7 +69,9 @@ export const exportToExcalidrawPlus = async (
   }
 
   window.open(
-    `https://plus.excalidraw.com/import?excalidraw=${id},${encryptionKey}`,
+    `${
+      import.meta.env.VITE_APP_PLUS_APP
+    }/import?excalidraw=${id},${encryptionKey}`,
   );
 };
 
@@ -82,7 +84,15 @@ export const ExportToExcalidrawPlus: React.FC<{
   const { t } = useI18n();
   return (
     <Card color="primary">
-      <div className="Card-icon">{excalidrawPlusIcon}</div>
+      <div className="Card-icon">
+        <ExcalidrawLogo
+          style={{
+            [`--color-logo-icon` as any]: "#fff",
+            width: "2.8rem",
+            height: "2.8rem",
+          }}
+        />
+      </div>
       <h2>Excalidraw+</h2>
       <div className="Card-details">
         {t("exportDialog.excalidrawplus_description")}

File diff suppressed because it is too large
+ 0 - 9
src/excalidraw-app/components/icons.tsx


File diff suppressed because it is too large
+ 7 - 9
src/tests/__snapshots__/MobileMenu.test.tsx.snap


+ 3 - 0
src/vite-env.d.ts

@@ -47,6 +47,9 @@ interface ImportMetaEnv {
   VITE_PKG_VERSION: string;
   VITE_IS_EXCALIDRAW_NPM_PACKAGE: string;
 
+  VITE_APP_PLUS_LP: string;
+  VITE_APP_PLUS_APP: string;
+
   VITE_WORKER_ID: string;
   MODE: string;
   DEV: string;

+ 2 - 2
vite.config.ts

@@ -104,8 +104,8 @@ export default defineConfig({
           "Excalidraw is a whiteboard tool that lets you easily sketch diagrams that have a hand-drawn feel to them.",
         icons: [
           {
-            src: "logo-180x180.png",
-            sizes: "180x180",
+            src: "android-chrome-192x192.png",
+            sizes: "192x192",
             type: "image/png",
           },
           {

Some files were not shown because too many files changed in this diff