Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

perf: use svg logo instead of png

thecodrr3e24201d8f7c
diff --git a/apps/web/src/assets/logo.svg b/apps/web/src/assets/logo.svg
new file mode 100644
index 000000000..7e2ede2f3
--- /dev/null
+++ b/apps/web/src/assets/logo.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 338.7 338.7"><defs/><defs><linearGradient id="b" x1="193.9" x2="198.7" y1="166.8" y2="223.3" gradientTransform="rotate(5.2 4448.4 -4204.3) scale(2.93671)" gradientUnits="userSpaceOnUse" xlink:href="#a"/><linearGradient id="a"><stop offset="0"/><stop offset="1" stop-color="#fff9f9" stop-opacity="0"/></linearGradient><linearGradient id="c" x1="167.8" x2="270.6" y1="76.9" y2="64.2" gradientTransform="scale(1.50082) rotate(5.2 310 -1365.7)" gradientUnits="userSpaceOnUse" xlink:href="#a"/></defs><g transform="translate(0 41.7)"><path fill="url(#b)" d="M159.6 205.3l154.9 41.5-141.3 44-154.9-42.1z"/><path fill="url(#c)" d="M159.6-35v240.3l154.9 41.5c0-80.1.5-159.3.5-252.7z"/><g fill="none" stroke-width="1.2"><path d="M159.6 204.7V-35.4M159.6 204.7l-141.3 44M159.6 204.7l154.9 41.5"/></g><text style="line-height:1.25;-inkscape-font-specification:'Noto Sans'" x="50.8" y="226" stroke-width=".7" font-family="Noto Sans" font-size="15.2" font-weight="400" letter-spacing="0" transform="skewY(-17.3)" word-spacing="0"><tspan x="50.8" y="226" style="-inkscape-font-specification:'Atkinson Hyperlegible Bold'" font-family="Atkinson Hyperlegible" font-size="136.5" font-weight="700">N</tspan></text><rect width="86.1" height="12.6" x="184.9" y="97.1" fill="#bebebe" ry="2.3" transform="skewY(14.8) scale(.9669 1)"/><path fill="#bebebe" d="M180.8 169l99 26.4c1.2.3 2.1 1.5 2.1 2.7v7.6c0 1.1-.9 1.8-2 1.5l-99.1-26.4c-1.1-.3-2-1.5-2-2.7v-7.6c0-1.1.9-1.9 2-1.6zM180.8 122.3l99 26.5c1.2.3 2.1 1.5 2.1 2.7v7.5c0 1.2-.9 2-2 1.6l-99.1-26.4c-1.1-.3-2-1.5-2-2.7v-7.6c0-1.2.9-1.9 2-1.6z"/></g></svg>
\ No newline at end of file
diff --git a/apps/web/src/index.js b/apps/web/src/index.js
index 9a4d96f23..6c17205df 100644
--- a/apps/web/src/index.js
+++ b/apps/web/src/index.js
@@ -29,15 +29,21 @@ const App = React.lazy(() => import("./App"));
import("react-dom").then(({ render }) => {
render(
- <Suspense fallback={<Splash />}>
- <App />
- </Suspense>,
- document.getElementById("root"),
- () => {
- import("react-modal").then(({ default: Modal }) => {
- Modal.setAppElement("#root");
- });
- },
+ <Splash
+ onLoadingFinished={() => {
+ render(
+ <Suspense fallback={<Splash noInit />}>
+ <App />
+ </Suspense>,
+ document.getElementById("root"),
+ () => {
+ import("react-modal").then(({ default: Modal }) => {
+ Modal.setAppElement("#root");
+ });
+ }
+ );
+ }}
+ />,
document.getElementById("root")
);
});
diff --git a/apps/web/src/views/splash.js b/apps/web/src/views/splash.js
index 6358952a7..9f3ecaec2 100644
--- a/apps/web/src/views/splash.js
+++ b/apps/web/src/views/splash.js
@@ -1,9 +1,10 @@
import React, { useEffect } from "react";
-import Logo from "../assets/notesnook-logo.png";
+import Logo from "../assets/logo.svg";
import { initializeDatabase } from "../common/db";
function Splash(props) {
useEffect(() => {
+ if (props.noInit) return;
(async function () {
try {
await initializeDatabase();
@@ -13,7 +14,7 @@ function Splash(props) {
// return scope;
// });
console.error(e);
- alert("Error: " + `Error initializing database: ${e.message}`);
+ alert(`Error initializing database: ${e.message}`);
} finally {
if (props.onLoadingFinished) props.onLoadingFinished();
}