chore(brand): adopt SVG bird logo across app and README
Share logo and identity typography across navigation, auth, and About while preserving custom branding. Use a transparent blue favicon and Celadon installation icons with refreshed cache versions.
|
After Width: | Height: | Size: 6.9 KiB |
@@ -1,8 +1,6 @@
|
||||
> ✨ Featured sponsor: [CodeRabbit — Industry-leading AI code reviews](https://coderabbit.link/usememos).
|
||||
|
||||
# Memos
|
||||
|
||||
<img src="./web/public/logo.webp" alt="" width="96" align="right">
|
||||
<h1 id="memos"><img src="./.github/assets/memos-wordmark.svg" alt="Memos" width="145" height="48"></h1>
|
||||
|
||||
**Your thoughts, your data, shared on your terms.**
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||
<link rel="icon" type="image/webp" href="/logo.webp" />
|
||||
<link rel="manifest" href="/site.webmanifest" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=celadon" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg?v=bird-blue" />
|
||||
<link rel="manifest" href="/site.webmanifest?v=celadon" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
||||
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#faf9f5" />
|
||||
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1d1f23" />
|
||||
|
||||
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 9.8 KiB |
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512" role="img" aria-label="Memos" color="#477FA8" fill="currentColor" stroke="currentColor" stroke-width="3" stroke-linejoin="round">
|
||||
<!-- A light stroke reinforces the official small mark at favicon sizes. -->
|
||||
<g transform="translate(256 256) scale(1.08) translate(-256 -256)"><g transform="translate(3.189 13.356) scale(1.522148 1.409396)"><path fill="currentColor" fill-rule="evenodd" d="M126 35 C142 26 162 27 178 35 C195 44 204 63 204 84 C205 102 197 116 197 130 C199 141 212 150 223 165 C242 187 250 221 248 247 Q247 261 240 264 C233 251 232 238 230 225 C227 196 217 173 202 154 C189 141 184 133 189 116 C194 103 196 89 193 78 C184 89 174 100 160 103 Q156 104 152 100 C145 122 133 145 130 167 C144 185 161 195 177 220 C198 248 207 278 201 300 Q198 310 191 311 C187 286 183 266 173 242 C163 219 145 202 129 188 L128 225 Q128 233 120 237 Q115 240 113 245 C114 261 120 279 125 294 Q126 303 119 297 C111 285 108 273 104 261 C96 278 97 299 104 318 Q106 326 99 323 C82 304 79 278 89 255 C97 243 107 231 119 225 C113 207 114 185 118 166 C125 142 136 119 145 95 Q147 87 139 82 L111 67 C104 78 94 85 88 89 Q84 91 87 85 C93 72 102 57 113 49 Q115 43 120 43 Q124 44 118 51 L115 56 L141 69 C145 58 146 46 151 40 Q156 37 156 45 C156 59 151 76 152 87 Q154 95 164 92 C178 87 188 76 188 69 C184 51 172 40 155 37 Q140 34 126 39 Q119 41 126 35 Z M161 139 C158 149 151 159 149 166 Q147 172 153 169 C160 166 168 160 168 155 Q168 148 164 141 Q162 136 161 139 Z M196 164 C190 179 187 194 183 205 Q182 210 186 216 C198 236 204 257 207 280 Q208 287 213 284 C225 258 216 232 205 212 Q201 206 201 198 C203 184 204 173 202 165 Q200 159 196 164 Z"/></g>
|
||||
</g></svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512" role="img" aria-label="Memos" fill="currentColor">
|
||||
<style>:root{color:#262b2b}@media(prefers-color-scheme:dark){:root{color:#eae5d8}}</style>
|
||||
<rect width="512" height="512" fill="none" style="fill:var(--logo-background,none);rx:var(--logo-radius,0px)"/>
|
||||
<g transform="translate(3.189 13.356) scale(1.522148 1.409396)"><path fill="currentColor" fill-rule="evenodd" d="M126 35 C142 26 162 27 178 35 C195 44 204 63 204 84 C205 102 197 116 197 130 C199 141 212 150 223 165 C242 187 250 221 248 247 Q247 261 240 264 C233 251 232 238 230 225 C227 196 217 173 202 154 C189 141 184 133 189 116 C194 103 196 89 193 78 C184 89 174 100 160 103 Q156 104 152 100 C145 122 133 145 130 167 C144 185 161 195 177 220 C198 248 207 278 201 300 Q198 310 191 311 C187 286 183 266 173 242 C163 219 145 202 129 188 L128 225 Q128 233 120 237 Q115 240 113 245 C114 261 120 279 125 294 Q126 303 119 297 C111 285 108 273 104 261 C96 278 97 299 104 318 Q106 326 99 323 C82 304 79 278 89 255 C97 243 107 231 119 225 C113 207 114 185 118 166 C125 142 136 119 145 95 Q147 87 139 82 L111 67 C104 78 94 85 88 89 Q84 91 87 85 C93 72 102 57 113 49 Q115 43 120 43 Q124 44 118 51 L115 56 L141 69 C145 58 146 46 151 40 Q156 37 156 45 C156 59 151 76 152 87 Q154 95 164 92 C178 87 188 76 188 69 C184 51 172 40 155 37 Q140 34 126 39 Q119 41 126 35 Z M161 139 C158 149 151 159 149 166 Q147 172 153 169 C160 166 168 160 168 155 Q168 148 164 141 Q162 136 161 139 Z M196 164 C190 179 187 194 183 205 Q182 210 186 216 C198 236 204 257 207 280 Q208 287 213 284 C225 258 216 232 205 212 Q201 206 201 198 C203 184 204 173 202 165 Q200 159 196 164 Z"/></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512" role="img" aria-label="Memos" fill="currentColor">
|
||||
<style>:root{color:#262b2b}@media(prefers-color-scheme:dark){:root{color:#eae5d8}}</style>
|
||||
<rect width="512" height="512" fill="none" style="fill:var(--logo-background,none);rx:var(--logo-radius,0px)"/>
|
||||
<g transform="translate(17.067 28.624) scale(1.427919 1.322148)"><path fill="currentColor" fill-rule="evenodd" d="M126 35 C142 26 162 27 178 35 C195 44 204 63 204 84 C205 102 197 116 197 130 C199 141 212 150 223 165 C239 187 247 221 245 247 Q245 260 239 264 C233 251 232 238 230 225 C227 196 217 173 202 154 C189 141 184 133 189 116 C194 103 196 89 193 78 C184 89 174 100 160 103 Q156 104 152 100 C145 122 133 145 130 167 C144 185 161 195 177 220 C195 248 204 278 198 300 Q196 307 192 309 C187 286 183 266 173 242 C163 219 145 202 129 188 L128 225 Q128 233 120 237 Q115 240 113 245 C114 261 120 279 125 294 Q126 303 119 297 C111 285 108 273 104 261 C96 278 97 299 104 318 Q106 326 99 323 C86 304 82 278 92 256 C97 243 107 231 119 225 C116 207 117 185 121 166 C125 142 136 119 145 95 Q147 87 139 82 L111 67 C104 78 94 85 88 89 Q84 91 87 85 C93 72 102 57 113 49 Q115 43 120 43 Q124 44 118 51 L115 56 L141 69 C145 58 146 46 151 40 Q156 37 156 45 C156 59 151 76 152 87 Q154 95 164 92 C178 87 188 76 188 69 C184 51 172 40 155 37 Q140 34 126 39 Q119 41 126 35 Z M162 130 C157 145 150 158 147 168 Q146 172 151 170 L156 166 L162 151 L166 168 L158 181 Q155 186 160 185 C169 181 174 173 174 168 L167 144 Q163 125 162 130 Z M197 165 C192 179 190 194 186 205 Q185 209 188 212 C200 232 207 255 209 278 Q210 287 214 281 C222 256 214 234 202 214 Q198 206 198 198 C200 183 201 173 200 166 Q199 160 197 165 Z"/></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 7.4 KiB |
@@ -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": "/",
|
||||
|
||||
@@ -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<HTMLLinkElement>("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 (
|
||||
|
||||
|
Before Width: | Height: | Size: 25 KiB |
@@ -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 ? (
|
||||
<MemosLogo compact size={size === "header" ? "header" : "md"} />
|
||||
<MemosLogo size={size === "header" ? "header" : "md"} />
|
||||
) : (
|
||||
<span className="flex min-w-0 items-center gap-2 overflow-hidden">
|
||||
{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.
|
||||
<span className="flex shrink-0 items-center gap-1">
|
||||
<IdentityLabel
|
||||
label={creatorUsername && selectedSpaceName ? spaceLabel : contextLabel}
|
||||
mark={
|
||||
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.
|
||||
<span className="flex shrink-0 items-center gap-1">
|
||||
<CreatorAvatar avatarUrl={selectedCreator?.avatarUrl} name={creatorLabel} size={size} />
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
viewBox="0 0 10 20"
|
||||
className="h-5 w-2.5 shrink-0 text-muted-foreground/35"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth={1.25}
|
||||
strokeLinecap="round"
|
||||
>
|
||||
<path d="M8 3 2 17" />
|
||||
</svg>
|
||||
<SpaceMark icon={selectedSpace?.icon} size={size === "header" ? "header" : "md"} />
|
||||
</span>
|
||||
) : creatorUsername ? (
|
||||
<CreatorAvatar avatarUrl={selectedCreator?.avatarUrl} name={creatorLabel} size={size} />
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
viewBox="0 0 10 20"
|
||||
className="h-5 w-2.5 shrink-0 text-muted-foreground/35"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth={1.25}
|
||||
strokeLinecap="round"
|
||||
>
|
||||
<path d="M8 3 2 17" />
|
||||
</svg>
|
||||
) : (
|
||||
<SpaceMark icon={selectedSpace?.icon} size={size === "header" ? "header" : "md"} />
|
||||
</span>
|
||||
) : creatorUsername ? (
|
||||
<CreatorAvatar avatarUrl={selectedCreator?.avatarUrl} name={creatorLabel} size={size} />
|
||||
) : (
|
||||
<SpaceMark icon={selectedSpace?.icon} size={size === "header" ? "header" : "md"} />
|
||||
)}
|
||||
<span
|
||||
data-sidebar-label
|
||||
className={cn(
|
||||
"min-w-0 truncate tracking-[-0.01em]",
|
||||
size === "header" ? "text-[15px] font-semibold leading-5" : "text-[14px] font-medium leading-4",
|
||||
)}
|
||||
>
|
||||
{creatorUsername && selectedSpaceName ? spaceLabel : contextLabel}
|
||||
</span>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
/>
|
||||
)}
|
||||
<ChevronsUpDownIcon
|
||||
aria-hidden="true"
|
||||
|
||||
@@ -16,7 +16,7 @@ export const SIDEBAR_NAV_LEADING_SLOT_CLASSES = "flex size-4 shrink-0 items-cent
|
||||
/**
|
||||
* Brand controls hug their content, ordinary rows fill the inset rail, and the account
|
||||
* action fills the footer shell (or becomes a rail-aligned square when collapsed).
|
||||
* The header brand is the sidebar's title, not a row: a 24px mark on the artwork rail and
|
||||
* The header brand is the sidebar's title, not a row: a 24px-tall mark on the artwork rail and
|
||||
* a larger label, so it reads as a different kind of object from the 16px nav pills below.
|
||||
* Heights stay fixed so data cannot change a surface's padding or vertical position.
|
||||
*/
|
||||
|
||||
@@ -5,6 +5,7 @@ import { ROUTES } from "@/router/routes";
|
||||
import { InstanceAccessMode } from "@/types/proto/api/instance_service_pb";
|
||||
import { useTranslate } from "@/utils/i18n";
|
||||
import AuthFooter from "./AuthFooter";
|
||||
import MemosLogo from "./MemosLogo";
|
||||
|
||||
interface Props {
|
||||
chip?: React.ReactNode;
|
||||
@@ -55,17 +56,14 @@ export const AuthOptionsLoading = () => <div className="h-9 w-full animate-pulse
|
||||
|
||||
const AuthPageLayout = ({ chip, title, subtitle, hideExplore, children }: Props) => {
|
||||
const t = useTranslate();
|
||||
const { generalSetting, profile } = useInstance();
|
||||
const { profile } = useInstance();
|
||||
const showExplore = profile.accessMode === InstanceAccessMode.PUBLIC && !hideExplore;
|
||||
|
||||
return (
|
||||
<div className="min-h-svh w-full flex flex-col items-center px-4 py-4 sm:py-8">
|
||||
<div className="w-full grow flex flex-col justify-center items-center">
|
||||
<div className="w-90 max-w-full rounded-xl border border-border bg-card p-7 shadow-sm">
|
||||
<div className="mb-6 flex items-center gap-2">
|
||||
<img className="h-6 w-auto rounded-full" src={generalSetting.customProfile?.logoUrl || "/logo.webp"} alt="" />
|
||||
<span className="text-sm font-semibold text-foreground">{generalSetting.customProfile?.title || "Memos"}</span>
|
||||
</div>
|
||||
<MemosLogo size="lg" className="mb-8" />
|
||||
{chip && <div className="mb-2">{chip}</div>}
|
||||
<h1 className="text-lg font-semibold tracking-tight text-foreground">{title}</h1>
|
||||
{subtitle && <p className="mt-1 text-sm text-muted-foreground">{subtitle}</p>}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
import type { ReactNode } from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const TEXT_SCALE = { sm: "text-base", md: "text-lg", lg: "text-2xl", hero: "text-[2rem]" } as const;
|
||||
|
||||
interface Props {
|
||||
mark: ReactNode;
|
||||
label: string;
|
||||
size?: keyof typeof TEXT_SCALE;
|
||||
collapsed?: boolean;
|
||||
wrap?: boolean;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
/** Shared mark and name typography for navigation and page branding. */
|
||||
const IdentityLabel = ({ mark, label, size = "md", collapsed, wrap, className }: Props) => (
|
||||
<span
|
||||
className={cn("flex min-w-0 items-center text-foreground", size === "hero" ? "gap-3" : size === "lg" ? "gap-2.5" : "gap-2", className)}
|
||||
>
|
||||
{mark}
|
||||
{!collapsed && (
|
||||
<span
|
||||
className={cn("min-w-0", wrap ? "wrap-anywhere" : "truncate", TEXT_SCALE[size], "font-normal leading-[1.25] tracking-[-0.025em]")}
|
||||
style={{ fontFamily: 'Georgia, "Times New Roman", Times, serif' }}
|
||||
>
|
||||
{label}
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
);
|
||||
|
||||
export default IdentityLabel;
|
||||
@@ -1,53 +1,62 @@
|
||||
import fullLogoUrl from "@/assets/full-logo.webp?no-inline";
|
||||
import { useInstance } from "@/contexts/InstanceContext";
|
||||
import { getCustomLogoUrl } from "@/lib/branding";
|
||||
import { cn } from "@/lib/utils";
|
||||
import UserAvatar from "./UserAvatar";
|
||||
import IdentityLabel from "./IdentityLabel";
|
||||
import { MemosMark } from "./MemosMark";
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
collapsed?: boolean;
|
||||
compact?: boolean;
|
||||
/** Scale of the compact lockup: "header" for primary chrome, "md" for roomy surfaces, and "sm" for dense menu rows. */
|
||||
size?: keyof typeof COMPACT_SCALE;
|
||||
as?: "div" | "h1";
|
||||
/** Navigation uses header/md; auth pages use lg and About uses hero. */
|
||||
size?: keyof typeof LOGO_SCALE;
|
||||
}
|
||||
|
||||
// Kept in step with SpaceMark in SpaceSwitcher, so the brand and a Space read as peers
|
||||
// wherever the two are listed together.
|
||||
const COMPACT_SCALE = {
|
||||
md: { mark: "size-7 rounded-[7px]", gap: "gap-1.5", title: "text-[14px]", weight: "font-medium" },
|
||||
header: { mark: "size-6 rounded-[6px]", gap: "gap-2", title: "text-[15px] leading-5", weight: "font-semibold" },
|
||||
sm: { mark: "size-5 rounded-[5px]", gap: "gap-1.5", title: "text-ui", weight: "font-medium" },
|
||||
const LOGO_SCALE = {
|
||||
sm: { mark: 20, text: "sm" },
|
||||
header: { mark: 24, text: "md" },
|
||||
md: { mark: 28, text: "md" },
|
||||
lg: { mark: 32, text: "lg" },
|
||||
hero: { mark: 48, text: "hero" },
|
||||
} as const;
|
||||
|
||||
function MemosLogo(props: Props) {
|
||||
const { collapsed, compact, size = "md" } = props;
|
||||
const scale = COMPACT_SCALE[size];
|
||||
function MemosLogo({ collapsed, size = "md", as: Component = "div", className }: Props) {
|
||||
const scale = LOGO_SCALE[size];
|
||||
const { generalSetting: instanceGeneralSetting } = useInstance();
|
||||
const title = instanceGeneralSetting.customProfile?.title || "Memos";
|
||||
const avatarUrl = instanceGeneralSetting.customProfile?.logoUrl || fullLogoUrl;
|
||||
const logoUrl = getCustomLogoUrl(instanceGeneralSetting.customProfile?.logoUrl);
|
||||
|
||||
return (
|
||||
<div className={cn("relative min-w-0 h-auto", props.className)}>
|
||||
<div
|
||||
className={cn(
|
||||
"flex min-w-0 flex-row items-center justify-start text-foreground",
|
||||
compact ? cn("px-0", scale.gap) : collapsed ? "px-1" : "gap-2 px-3",
|
||||
)}
|
||||
>
|
||||
{/* The instance logo is a brand, not a person, so it keeps a square mark. */}
|
||||
<UserAvatar className={cn("shrink-0", compact ? scale.mark : "rounded-xl")} avatarUrl={avatarUrl} />
|
||||
{!collapsed && (
|
||||
<span
|
||||
className={cn(
|
||||
"shrink truncate text-foreground",
|
||||
compact ? cn(scale.title, scale.weight, "tracking-[-0.01em]") : "text-lg font-medium",
|
||||
)}
|
||||
>
|
||||
{title}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<Component className={cn("memos-logo w-fit min-w-0 max-w-full", className)}>
|
||||
<IdentityLabel
|
||||
label={title}
|
||||
size={scale.text}
|
||||
collapsed={collapsed}
|
||||
wrap={size === "lg" || size === "hero"}
|
||||
mark={
|
||||
logoUrl ? (
|
||||
<img
|
||||
src={logoUrl}
|
||||
width={scale.mark}
|
||||
height={scale.mark}
|
||||
style={{ width: scale.mark, height: scale.mark }}
|
||||
className="shrink-0 select-none object-contain"
|
||||
alt={collapsed ? title : ""}
|
||||
draggable={false}
|
||||
decoding="async"
|
||||
/>
|
||||
) : (
|
||||
<MemosMark
|
||||
size={scale.mark}
|
||||
className="text-primary"
|
||||
label={collapsed ? title : undefined}
|
||||
// Like dotcom's lockup, trim transparent margins so the gap follows the visible bird.
|
||||
{...(!collapsed ? { viewBox: "112 32 288 448", width: Math.ceil((scale.mark * 288) / 448) } : {})}
|
||||
/>
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Component>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
import type { SVGProps } from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
// Exact paths from usememos/.github@5e3121450f5160c7b6b7c301379c27fedf7985d1.
|
||||
// The parity test keeps these inline, themeable marks aligned with the public SVGs.
|
||||
const shapes = {
|
||||
standard: {
|
||||
transform: "translate(17.067 28.624) scale(1.427919 1.322148)",
|
||||
path: "M126 35 C142 26 162 27 178 35 C195 44 204 63 204 84 C205 102 197 116 197 130 C199 141 212 150 223 165 C239 187 247 221 245 247 Q245 260 239 264 C233 251 232 238 230 225 C227 196 217 173 202 154 C189 141 184 133 189 116 C194 103 196 89 193 78 C184 89 174 100 160 103 Q156 104 152 100 C145 122 133 145 130 167 C144 185 161 195 177 220 C195 248 204 278 198 300 Q196 307 192 309 C187 286 183 266 173 242 C163 219 145 202 129 188 L128 225 Q128 233 120 237 Q115 240 113 245 C114 261 120 279 125 294 Q126 303 119 297 C111 285 108 273 104 261 C96 278 97 299 104 318 Q106 326 99 323 C86 304 82 278 92 256 C97 243 107 231 119 225 C116 207 117 185 121 166 C125 142 136 119 145 95 Q147 87 139 82 L111 67 C104 78 94 85 88 89 Q84 91 87 85 C93 72 102 57 113 49 Q115 43 120 43 Q124 44 118 51 L115 56 L141 69 C145 58 146 46 151 40 Q156 37 156 45 C156 59 151 76 152 87 Q154 95 164 92 C178 87 188 76 188 69 C184 51 172 40 155 37 Q140 34 126 39 Q119 41 126 35 Z M162 130 C157 145 150 158 147 168 Q146 172 151 170 L156 166 L162 151 L166 168 L158 181 Q155 186 160 185 C169 181 174 173 174 168 L167 144 Q163 125 162 130 Z M197 165 C192 179 190 194 186 205 Q185 209 188 212 C200 232 207 255 209 278 Q210 287 214 281 C222 256 214 234 202 214 Q198 206 198 198 C200 183 201 173 200 166 Q199 160 197 165 Z",
|
||||
},
|
||||
small: {
|
||||
transform: "translate(3.189 13.356) scale(1.522148 1.409396)",
|
||||
path: "M126 35 C142 26 162 27 178 35 C195 44 204 63 204 84 C205 102 197 116 197 130 C199 141 212 150 223 165 C242 187 250 221 248 247 Q247 261 240 264 C233 251 232 238 230 225 C227 196 217 173 202 154 C189 141 184 133 189 116 C194 103 196 89 193 78 C184 89 174 100 160 103 Q156 104 152 100 C145 122 133 145 130 167 C144 185 161 195 177 220 C198 248 207 278 201 300 Q198 310 191 311 C187 286 183 266 173 242 C163 219 145 202 129 188 L128 225 Q128 233 120 237 Q115 240 113 245 C114 261 120 279 125 294 Q126 303 119 297 C111 285 108 273 104 261 C96 278 97 299 104 318 Q106 326 99 323 C82 304 79 278 89 255 C97 243 107 231 119 225 C113 207 114 185 118 166 C125 142 136 119 145 95 Q147 87 139 82 L111 67 C104 78 94 85 88 89 Q84 91 87 85 C93 72 102 57 113 49 Q115 43 120 43 Q124 44 118 51 L115 56 L141 69 C145 58 146 46 151 40 Q156 37 156 45 C156 59 151 76 152 87 Q154 95 164 92 C178 87 188 76 188 69 C184 51 172 40 155 37 Q140 34 126 39 Q119 41 126 35 Z M161 139 C158 149 151 159 149 166 Q147 172 153 169 C160 166 168 160 168 155 Q168 148 164 141 Q162 136 161 139 Z M196 164 C190 179 187 194 183 205 Q182 210 186 216 C198 236 204 257 207 280 Q208 287 213 284 C225 258 216 232 205 212 Q201 206 201 198 C203 184 204 173 202 165 Q200 159 196 164 Z",
|
||||
},
|
||||
} as const;
|
||||
|
||||
type MemosMarkProps = SVGProps<SVGSVGElement> & {
|
||||
size?: number;
|
||||
variant?: keyof typeof shapes;
|
||||
label?: string;
|
||||
};
|
||||
|
||||
/** Set color with CSS; size selects the official small mark at 32px or below. */
|
||||
export function MemosMark({ size = 32, variant = size <= 32 ? "small" : "standard", label, className, ...props }: MemosMarkProps) {
|
||||
const shape = shapes[variant];
|
||||
|
||||
return (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512"
|
||||
width={size}
|
||||
height={size}
|
||||
fill="currentColor"
|
||||
role={label ? "img" : undefined}
|
||||
aria-label={label}
|
||||
aria-hidden={label ? undefined : true}
|
||||
focusable="false"
|
||||
className={cn("memos-mark shrink-0", className)}
|
||||
{...props}
|
||||
>
|
||||
{label ? <title>{label}</title> : null}
|
||||
<g transform={shape.transform}>
|
||||
<path fill="currentColor" fillRule="evenodd" d={shape.path} />
|
||||
</g>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -60,7 +60,7 @@ function UpdateCustomizedProfileDialog({ open, onOpenChange, onSuccess }: Props)
|
||||
const handleRestoreButtonClick = () => {
|
||||
setPartialState({
|
||||
title: "Memos",
|
||||
logoUrl: "/logo.webp",
|
||||
logoUrl: "",
|
||||
description: "",
|
||||
});
|
||||
};
|
||||
|
||||
@@ -39,6 +39,17 @@
|
||||
}
|
||||
|
||||
@layer components {
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
.memos-logo .memos-mark {
|
||||
transition: transform 180ms ease-out;
|
||||
}
|
||||
|
||||
.memos-brand-trigger:is(:hover, :focus-visible) .memos-mark,
|
||||
.memos-logo:hover .memos-mark {
|
||||
transform: translateY(-1px) rotate(-6deg);
|
||||
}
|
||||
}
|
||||
|
||||
.map-attribution-minimal .leaflet-control-attribution {
|
||||
margin: 0 0.25rem 0.25rem 0 !important;
|
||||
border-radius: 0.25rem;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
export const DEFAULT_FAVICON = "/favicon.svg?v=bird-blue";
|
||||
|
||||
// Earlier versions persisted /logo.webp when restoring the default profile.
|
||||
// Treat built-in URLs as defaults so those instances also get the themeable SVG.
|
||||
export const getCustomLogoUrl = (logoUrl?: string): string | undefined =>
|
||||
!logoUrl || logoUrl === "/logo.webp" || logoUrl === "/logo.svg" ? undefined : logoUrl;
|
||||
@@ -1,4 +1,5 @@
|
||||
import { BookOpenIcon, CodeXmlIcon, ExternalLinkIcon, GitForkIcon, GlobeIcon, HeartIcon, ScissorsIcon } from "lucide-react";
|
||||
import MemosLogo from "@/components/MemosLogo";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { useInstance } from "@/contexts/InstanceContext";
|
||||
import {
|
||||
@@ -15,7 +16,6 @@ const GITHUB_COMMIT_URL_PREFIX = "https://github.com/usememos/memos/commit/";
|
||||
const GITHUB_RELEASE_URL_PREFIX = "https://github.com/usememos/memos/releases/tag/";
|
||||
|
||||
const DEFAULT_TITLE = "Memos";
|
||||
const DEFAULT_LOGO = "/logo.webp";
|
||||
|
||||
const isCommitSha = (commit: string) => /^[0-9a-f]{7,40}$/i.test(commit);
|
||||
|
||||
@@ -46,7 +46,6 @@ const About = () => {
|
||||
|
||||
const customProfile = generalSetting.customProfile;
|
||||
const instanceTitle = customProfile?.title || DEFAULT_TITLE;
|
||||
const instanceLogo = customProfile?.logoUrl || DEFAULT_LOGO;
|
||||
const isCustomBranded = instanceTitle !== DEFAULT_TITLE;
|
||||
|
||||
const releaseTag = getReleaseTag(profile.version);
|
||||
@@ -86,27 +85,21 @@ const About = () => {
|
||||
<div className="@container mx-auto w-full max-w-5xl py-8 sm:py-16">
|
||||
<div className="grid gap-10 @min-[52rem]:grid-cols-[minmax(0,0.9fr)_minmax(0,1.5fr)] @min-[52rem]:gap-8">
|
||||
<header className="min-w-0 @min-[52rem]:border-e @min-[52rem]:border-border @min-[52rem]:pe-8 @min-[52rem]:pt-7">
|
||||
<div className="flex items-center gap-4">
|
||||
<img
|
||||
className="size-16 shrink-0 select-none rounded-xl object-contain @min-[60rem]:size-20"
|
||||
src={instanceLogo}
|
||||
alt=""
|
||||
draggable={false}
|
||||
/>
|
||||
<div className="flex min-w-0 flex-wrap items-center gap-2.5">
|
||||
<h1 className="text-3xl font-semibold tracking-tight wrap-anywhere text-foreground @min-[60rem]:text-4xl">
|
||||
{instanceTitle}
|
||||
</h1>
|
||||
{profile.version && (
|
||||
<Chip href={releaseUrl || undefined}>
|
||||
<span className="sr-only">{t("common.version")} </span>
|
||||
{versionLabel}
|
||||
</Chip>
|
||||
)}
|
||||
{profile.demo && <Badge variant="warning">{t("about.demo")}</Badge>}
|
||||
</div>
|
||||
<div className="space-y-3">
|
||||
<MemosLogo as="h1" size="hero" />
|
||||
{(profile.version || profile.demo) && (
|
||||
<div className="flex min-w-0 flex-wrap items-center gap-2.5">
|
||||
{profile.version && (
|
||||
<Chip href={releaseUrl || undefined}>
|
||||
<span className="sr-only">{t("common.version")} </span>
|
||||
{versionLabel}
|
||||
</Chip>
|
||||
)}
|
||||
{profile.demo && <Badge variant="warning">{t("about.demo")}</Badge>}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<p className="mt-8 text-4xl leading-[1.15] tracking-tight wrap-anywhere text-foreground @min-[60rem]:text-[3.25rem]">
|
||||
<p className="mt-6 text-4xl leading-[1.15] tracking-tight wrap-anywhere text-foreground @min-[60rem]:text-[3.25rem]">
|
||||
{customProfile?.description || (
|
||||
<>
|
||||
<span className="block">Your thoughts, your data,</span> <span className="block">shared on your terms.</span>
|
||||
|
||||
@@ -50,6 +50,8 @@ describe("<About>", () => {
|
||||
renderAbout();
|
||||
|
||||
expect(screen.getByRole("heading", { name: "Memos" })).toBeInTheDocument();
|
||||
expect(document.querySelector(".memos-mark")).toHaveAttribute("fill", "currentColor");
|
||||
expect(document.querySelector(".memos-mark")).toHaveAttribute("height", "48");
|
||||
expect(screen.getByText(/Your thoughts, your data/i)).toBeInTheDocument();
|
||||
expect(screen.getByText("about.description")).toBeInTheDocument();
|
||||
expect(screen.getByRole("link", { name: /Version\s*v0\.25\.0/ })).toHaveAttribute(
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
import { act, render } from "@testing-library/react";
|
||||
import type { ReactNode } from "react";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import App from "@/App";
|
||||
|
||||
const instance = vi.hoisted(() => ({
|
||||
profile: {},
|
||||
generalSetting: { customProfile: undefined as { title: string; logoUrl: string } | undefined },
|
||||
}));
|
||||
|
||||
vi.mock("@/contexts/InstanceContext", () => ({ useInstance: () => instance }));
|
||||
vi.mock("@/contexts/ViewContext", () => ({ TimelineViewProvider: ({ children }: { children: ReactNode }) => children }));
|
||||
vi.mock("@/hooks/useNavigateTo", () => ({ default: () => vi.fn() }));
|
||||
vi.mock("@/hooks/useUserLocale", () => ({ useUserLocale: () => "ltr" }));
|
||||
vi.mock("@/hooks/useUserTheme", () => ({ useUserTheme: vi.fn() }));
|
||||
vi.mock("@/utils/oauth", () => ({ cleanupExpiredOAuthState: vi.fn() }));
|
||||
vi.mock("react-router-dom", () => ({ Outlet: () => null, ScrollRestoration: () => null }));
|
||||
|
||||
describe("instance favicon", () => {
|
||||
let icon: HTMLLinkElement;
|
||||
let colorScheme: MediaQueryList;
|
||||
|
||||
beforeEach(() => {
|
||||
instance.generalSetting.customProfile = undefined;
|
||||
colorScheme = Object.assign(new EventTarget(), {
|
||||
matches: false,
|
||||
media: "(prefers-color-scheme: dark)",
|
||||
onchange: null,
|
||||
addListener: vi.fn(),
|
||||
removeListener: vi.fn(),
|
||||
});
|
||||
vi.stubGlobal(
|
||||
"matchMedia",
|
||||
vi.fn(() => colorScheme),
|
||||
);
|
||||
icon = document.createElement("link");
|
||||
icon.rel = "icon";
|
||||
icon.type = "image/svg+xml";
|
||||
document.head.appendChild(icon);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
icon.remove();
|
||||
vi.unstubAllGlobals();
|
||||
});
|
||||
|
||||
it.each(["", "/logo.webp", "/logo.svg"])("uses the SVG favicon for built-in logo %s", (logoUrl) => {
|
||||
instance.generalSetting.customProfile = { title: "Memos", logoUrl };
|
||||
render(<App />);
|
||||
|
||||
expect(icon).toHaveAttribute("href", "/favicon.svg?v=bird-blue");
|
||||
expect(icon).toHaveAttribute("type", "image/svg+xml");
|
||||
});
|
||||
|
||||
it("preserves custom image formats and restores the default when branding is cleared", () => {
|
||||
instance.generalSetting.customProfile = { title: "Team Notes", logoUrl: "/custom.png" };
|
||||
const { rerender } = render(<App />);
|
||||
|
||||
expect(document.title).toBe("Team Notes");
|
||||
expect(icon).toHaveAttribute("href", "/custom.png");
|
||||
expect(icon).not.toHaveAttribute("type");
|
||||
|
||||
act(() => {
|
||||
Object.assign(colorScheme, { matches: true });
|
||||
colorScheme.dispatchEvent(new Event("change"));
|
||||
});
|
||||
expect(icon).toHaveAttribute("href", "/custom.png");
|
||||
|
||||
instance.generalSetting.customProfile = undefined;
|
||||
rerender(<App />);
|
||||
|
||||
expect(document.title).toBe("Memos");
|
||||
expect(icon).toHaveAttribute("href", "/favicon.svg?v=bird-blue");
|
||||
expect(icon).toHaveAttribute("type", "image/svg+xml");
|
||||
});
|
||||
|
||||
it("keeps the same favicon across system color schemes", () => {
|
||||
Object.assign(colorScheme, { matches: true });
|
||||
render(<App />);
|
||||
expect(icon).toHaveAttribute("href", "/favicon.svg?v=bird-blue");
|
||||
|
||||
act(() => {
|
||||
Object.assign(colorScheme, { matches: false });
|
||||
colorScheme.dispatchEvent(new Event("change"));
|
||||
});
|
||||
expect(icon).toHaveAttribute("href", "/favicon.svg?v=bird-blue");
|
||||
|
||||
act(() => {
|
||||
Object.assign(colorScheme, { matches: true });
|
||||
colorScheme.dispatchEvent(new Event("change"));
|
||||
});
|
||||
expect(icon).toHaveAttribute("href", "/favicon.svg?v=bird-blue");
|
||||
});
|
||||
});
|
||||
@@ -5,9 +5,10 @@ import AuthPageLayout from "@/components/AuthPageLayout";
|
||||
import { InstanceAccessMode } from "@/types/proto/api/instance_service_pb";
|
||||
|
||||
const instance = vi.hoisted(() => ({ instanceUrl: "https://notes.example.com", accessMode: 1 }));
|
||||
const settings = vi.hoisted(() => ({ customProfile: undefined as { title?: string; logoUrl?: string } | undefined }));
|
||||
|
||||
vi.mock("@/contexts/InstanceContext", () => ({
|
||||
useInstance: () => ({ profile: instance, generalSetting: {} }),
|
||||
useInstance: () => ({ profile: instance, generalSetting: settings }),
|
||||
}));
|
||||
|
||||
vi.mock("@/utils/i18n", () => ({
|
||||
@@ -29,6 +30,7 @@ const renderLayout = (props?: { hideExplore?: boolean }) =>
|
||||
describe("<AuthPageLayout> explore band", () => {
|
||||
beforeEach(() => {
|
||||
instance.accessMode = InstanceAccessMode.PRIVATE;
|
||||
settings.customProfile = undefined;
|
||||
});
|
||||
|
||||
it("links to Explore on public instances", () => {
|
||||
@@ -50,4 +52,22 @@ describe("<AuthPageLayout> explore band", () => {
|
||||
|
||||
expect(screen.queryByRole("link", { name: /auth\.explore-public-memos/ })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it.each([undefined, "/logo.webp"])("uses a themeable small logo for the default %s", (logoUrl) => {
|
||||
settings.customProfile = { logoUrl };
|
||||
const { container } = renderLayout();
|
||||
|
||||
expect(container.querySelector(".memos-mark")).toHaveAttribute("height", "32");
|
||||
expect(screen.getByText("Memos")).toBeInTheDocument();
|
||||
expect(container.querySelector("img")).toBeNull();
|
||||
});
|
||||
|
||||
it("preserves custom logos and titles", () => {
|
||||
settings.customProfile = { title: "Team Notes", logoUrl: "/custom-logo.svg" };
|
||||
const { container } = renderLayout();
|
||||
|
||||
expect(container.querySelector("img")).toHaveAttribute("src", "/custom-logo.svg");
|
||||
expect(container.querySelector(".memos-mark")).toBeNull();
|
||||
expect(screen.getByText("Team Notes")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import fullLogoUrl from "@/assets/full-logo.webp?no-inline";
|
||||
import MemosLogo from "@/components/MemosLogo";
|
||||
import { MemosMark } from "@/components/MemosMark";
|
||||
import standardSource from "../public/logo.svg?raw";
|
||||
import smallSource from "../public/logo-small.svg?raw";
|
||||
|
||||
const mockInstance = {
|
||||
generalSetting: {} as { customProfile?: { title?: string; logoUrl?: string } },
|
||||
@@ -16,18 +18,49 @@ describe("<MemosLogo>", () => {
|
||||
mockInstance.generalSetting = {};
|
||||
});
|
||||
|
||||
it("uses the bundled logo when the instance has no custom logo", () => {
|
||||
it.each([undefined, "", "/logo.webp", "/logo.svg"])("uses the inline logo for the built-in URL %s", (logoUrl) => {
|
||||
mockInstance.generalSetting = { customProfile: { logoUrl } };
|
||||
const { container } = render(<MemosLogo />);
|
||||
|
||||
expect(container.querySelector("img")).toHaveAttribute("src", fullLogoUrl);
|
||||
expect(container.querySelector("img")).toBeNull();
|
||||
expect(container.querySelector("svg")).toHaveAttribute("fill", "currentColor");
|
||||
expect(container.querySelector("svg")).toHaveAttribute("aria-hidden", "true");
|
||||
expect(screen.getByText("Memos")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("uses custom instance branding when configured", () => {
|
||||
mockInstance.generalSetting = { customProfile: { title: "Team Notes", logoUrl: "/custom-logo.png" } };
|
||||
it.each(["/custom-logo.png", "/custom-logo.svg", "https://example.com/logo.webp"])("preserves custom branding at %s", (logoUrl) => {
|
||||
mockInstance.generalSetting = { customProfile: { title: "Team Notes", logoUrl } };
|
||||
const { container } = render(<MemosLogo />);
|
||||
|
||||
expect(container.querySelector("img")).toHaveAttribute("src", "/custom-logo.png");
|
||||
expect(container.querySelector("img")).toHaveAttribute("src", logoUrl);
|
||||
expect(container.querySelector(".memos-mark")).toBeNull();
|
||||
expect(screen.getByText("Team Notes")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("names the standalone mark when the title is collapsed", () => {
|
||||
render(<MemosLogo collapsed />);
|
||||
|
||||
expect(screen.getByRole("img", { name: "Memos" })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("names a custom standalone logo when the title is collapsed", () => {
|
||||
mockInstance.generalSetting = { customProfile: { title: "Team Notes", logoUrl: "/custom-logo.svg" } };
|
||||
render(<MemosLogo collapsed />);
|
||||
|
||||
expect(screen.getByRole("img", { name: "Team Notes" })).toHaveAttribute("src", "/custom-logo.svg");
|
||||
});
|
||||
});
|
||||
|
||||
describe("<MemosMark>", () => {
|
||||
// Keep the inline paths aligned with the vendored upstream SVGs.
|
||||
it.each([20, 24, 28, 32, 33, 48, 64])("uses the official contour at %ipx", (size) => {
|
||||
const source = new DOMParser().parseFromString(size <= 32 ? smallSource : standardSource, "image/svg+xml");
|
||||
const { container } = render(<MemosMark size={size} />);
|
||||
|
||||
expect(container.querySelector("svg")).toHaveAttribute("width", String(size));
|
||||
expect(container.querySelector("svg")).toHaveAttribute("height", String(size));
|
||||
expect(container.querySelector("g")).toHaveAttribute("transform", source.querySelector("g")?.getAttribute("transform"));
|
||||
expect(container.querySelector("path")).toHaveAttribute("d", source.querySelector("path")?.getAttribute("d"));
|
||||
expect(container.querySelector("path")).toHaveAttribute("fill-rule", "evenodd");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -18,7 +18,7 @@ const state = vi.hoisted(() => ({
|
||||
setMobileOpen: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock("@/components/MemosLogo", () => ({ default: () => <span>Memos</span> }));
|
||||
vi.mock("@/contexts/InstanceContext", () => ({ useInstance: () => ({ generalSetting: {} }) }));
|
||||
vi.mock("@/components/UserMenu", () => ({
|
||||
default: () => <button type="button">Steven account</button>,
|
||||
}));
|
||||
|
||||