diff --git a/.github/assets/memos-wordmark.svg b/.github/assets/memos-wordmark.svg new file mode 100644 index 000000000..ee3c28f7b --- /dev/null +++ b/.github/assets/memos-wordmark.svg @@ -0,0 +1,11 @@ + + Memos + + + + + + + + + diff --git a/README.md b/README.md index 7a27d960e..ace42224e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ > ✨ Featured sponsor: [CodeRabbit — Industry-leading AI code reviews](https://coderabbit.link/usememos). -# Memos - - +

Memos

**Your thoughts, your data, shared on your terms.** diff --git a/web/index.html b/web/index.html index 0f2e41db3..321a36eef 100644 --- a/web/index.html +++ b/web/index.html @@ -5,9 +5,9 @@ - - - + + + diff --git a/web/public/android-chrome-192x192.png b/web/public/android-chrome-192x192.png index 778cf7561..c862c34b4 100644 Binary files a/web/public/android-chrome-192x192.png and b/web/public/android-chrome-192x192.png differ diff --git a/web/public/android-chrome-512x512.png b/web/public/android-chrome-512x512.png index 5fd83fff7..bf4e55515 100644 Binary files a/web/public/android-chrome-512x512.png and b/web/public/android-chrome-512x512.png differ diff --git a/web/public/apple-touch-icon.png b/web/public/apple-touch-icon.png index e81696329..8f09366eb 100644 Binary files a/web/public/apple-touch-icon.png and b/web/public/apple-touch-icon.png differ diff --git a/web/public/favicon.svg b/web/public/favicon.svg new file mode 100644 index 000000000..cdee1fa2d --- /dev/null +++ b/web/public/favicon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/web/public/logo-small.svg b/web/public/logo-small.svg new file mode 100644 index 000000000..a8bdbd294 --- /dev/null +++ b/web/public/logo-small.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/web/public/logo.svg b/web/public/logo.svg new file mode 100644 index 000000000..d18b1c7c4 --- /dev/null +++ b/web/public/logo.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/web/public/logo.webp b/web/public/logo.webp index 522a5d9ec..b4792c6de 100644 Binary files a/web/public/logo.webp and b/web/public/logo.webp differ diff --git a/web/public/site.webmanifest b/web/public/site.webmanifest index 64cdbd381..fe5c3c83a 100644 --- a/web/public/site.webmanifest +++ b/web/public/site.webmanifest @@ -3,8 +3,8 @@ "short_name": "Memos", "description": "Your own timeline for quick notes, private by default.", "icons": [ - { "src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, - { "src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" } + { "src": "/android-chrome-192x192.png?v=celadon", "sizes": "192x192", "type": "image/png" }, + { "src": "/android-chrome-512x512.png?v=celadon", "sizes": "512x512", "type": "image/png" } ], "display": "standalone", "scope": "/", diff --git a/web/src/App.tsx b/web/src/App.tsx index e5ea7de98..fbe60c4b2 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -6,6 +6,7 @@ import { TimelineViewProvider } from "./contexts/ViewContext"; import useNavigateTo from "./hooks/useNavigateTo"; import { useUserLocale } from "./hooks/useUserLocale"; import { useUserTheme } from "./hooks/useUserTheme"; +import { DEFAULT_FAVICON, getCustomLogoUrl } from "./lib/branding"; import { cleanupExpiredOAuthState } from "./utils/oauth"; const App = () => { @@ -50,13 +51,22 @@ const App = () => { // Dynamic update metadata with customized profile useEffect(() => { - if (!instanceGeneralSetting.customProfile) { + const customProfile = instanceGeneralSetting.customProfile; + document.title = customProfile?.title || "Memos"; + const link = document.querySelector("link[rel~='icon']"); + if (!link) return; + + const logoUrl = getCustomLogoUrl(customProfile?.logoUrl); + if (logoUrl) { + link.href = logoUrl; + // Custom images may be PNG, JPEG, or SVG; let the browser detect their type. + link.removeAttribute("type"); return; } - document.title = instanceGeneralSetting.customProfile.title; - const link = document.querySelector("link[rel~='icon']") as HTMLLinkElement; - link.href = instanceGeneralSetting.customProfile.logoUrl || "/logo.webp"; + // A fixed blue stays visible when browser chrome differs from the system theme. + link.href = DEFAULT_FAVICON; + link.type = "image/svg+xml"; }, [instanceGeneralSetting.customProfile]); return ( diff --git a/web/src/assets/full-logo.webp b/web/src/assets/full-logo.webp deleted file mode 100644 index f654aae8a..000000000 Binary files a/web/src/assets/full-logo.webp and /dev/null differ diff --git a/web/src/components/AppSidebar/SpaceSwitcher.tsx b/web/src/components/AppSidebar/SpaceSwitcher.tsx index 25ef3d63b..26f13ae72 100644 --- a/web/src/components/AppSidebar/SpaceSwitcher.tsx +++ b/web/src/components/AppSidebar/SpaceSwitcher.tsx @@ -11,6 +11,7 @@ import { import { useRef, useState } from "react"; import { Link, useLocation, useNavigate } from "react-router-dom"; import CreateSpaceDialog from "@/components/CreateSpaceDialog"; +import IdentityLabel from "@/components/IdentityLabel"; import MemosLogo from "@/components/MemosLogo"; import SpaceMark from "@/components/SpaceMark"; import SpaceSelectItem from "@/components/SpaceSelectItem"; @@ -101,48 +102,42 @@ function SpaceSwitcher({ className, size = "md" }: { className?: string; size?: aria-label={`${t("space.switch")}: ${triggerLabel}`} title={triggerLabel} className={cn( - "text-start transition-colors hover:bg-sidebar-accent/65 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/40", + "memos-brand-trigger text-start transition-colors hover:bg-sidebar-accent/65 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/40", sidebarSurfaceVariants({ role: size === "header" ? "headerBrand" : "mobileBrand" }), className, )} > {showBrand ? ( - + ) : ( - - {creatorUsername && selectedSpaceName ? ( - // With a Space selected, the creator recedes to its avatar (its name stays in the tooltip) - // so the Space title keeps the width. - + + + + + + ) : creatorUsername ? ( - + ) : ( - - ) : creatorUsername ? ( - - ) : ( - - )} - - {creatorUsername && selectedSpaceName ? spaceLabel : contextLabel} - - + ) + } + /> )}