diff --git a/api/system_setting.go b/api/system_setting.go index ff67d11c..645f2989 100644 --- a/api/system_setting.go +++ b/api/system_setting.go @@ -24,8 +24,8 @@ const ( type CustomizedProfile struct { // Name is the server name, default is `memos` Name string `json:"name"` - // IconURL is the url of icon image. - IconURL string `json:"iconUrl"` + // LogoURL is the url of logo image. + LogoURL string `json:"logoUrl"` // Description is the server description. Description string `json:"description"` // Locale is the server default locale. @@ -100,7 +100,7 @@ func (upsert SystemSettingUpsert) Validate() error { } else if upsert.Name == SystemSettingCustomizedProfileName { customizedProfile := CustomizedProfile{ Name: "memos", - IconURL: "", + LogoURL: "", Description: "", Locale: "en", Appearance: "system", diff --git a/server/system.go b/server/system.go index e3a28116..e4e510d5 100644 --- a/server/system.go +++ b/server/system.go @@ -48,7 +48,7 @@ func (s *Server) registerSystemRoutes(g *echo.Group) { AdditionalScript: "", CustomizedProfile: api.CustomizedProfile{ Name: "memos", - IconURL: "", + LogoURL: "", Description: "", Locale: "en", Appearance: "system", @@ -77,7 +77,7 @@ func (s *Server) registerSystemRoutes(g *echo.Group) { valueMap := value.(map[string]interface{}) systemStatus.CustomizedProfile = api.CustomizedProfile{ Name: valueMap["name"].(string), - IconURL: valueMap["iconUrl"].(string), + LogoURL: valueMap["logoUrl"].(string), Description: valueMap["description"].(string), Locale: valueMap["locale"].(string), Appearance: valueMap["appearance"].(string), diff --git a/web/index.html b/web/index.html index eb4c54c9..6a5e4e56 100644 --- a/web/index.html +++ b/web/index.html @@ -2,7 +2,7 @@ - + diff --git a/web/public/logo-full.webp b/web/public/logo-full.webp deleted file mode 100644 index 36ea2eee..00000000 Binary files a/web/public/logo-full.webp and /dev/null differ diff --git a/web/public/logo.png b/web/public/logo.png new file mode 100644 index 00000000..3c22d5f8 Binary files /dev/null and b/web/public/logo.png differ diff --git a/web/public/logo.webp b/web/public/logo.webp deleted file mode 100644 index ecf7c441..00000000 Binary files a/web/public/logo.webp and /dev/null differ diff --git a/web/public/manifest.json b/web/public/manifest.json index 74794c0b..aff5fe88 100644 --- a/web/public/manifest.json +++ b/web/public/manifest.json @@ -4,8 +4,8 @@ "description": "usememos/memos", "icons": [ { - "src": "/logo.webp", - "type": "image/webp", + "src": "/logo.png", + "type": "image/png", "sizes": "520x520" } ], diff --git a/web/src/App.tsx b/web/src/App.tsx index e00b47ab..62748f59 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -59,7 +59,7 @@ const App = () => { // dynamic update metadata with customized profile. document.title = systemStatus.customizedProfile.name; const link = document.querySelector("link[rel~='icon']") as HTMLLinkElement; - link.href = systemStatus.customizedProfile.iconUrl || "/logo.webp"; + link.href = systemStatus.customizedProfile.logoUrl || "/logo.png"; }, [systemStatus]); useEffect(() => { diff --git a/web/src/components/AboutSiteDialog.tsx b/web/src/components/AboutSiteDialog.tsx index 04759890..1636351f 100644 --- a/web/src/components/AboutSiteDialog.tsx +++ b/web/src/components/AboutSiteDialog.tsx @@ -20,7 +20,7 @@ const AboutSiteDialog: React.FC = ({ destroy }: Props) => { <>

- + {t("common.about")} memos

diff --git a/web/src/components/ShareMemoDialog.tsx b/web/src/components/ShareMemoDialog.tsx index bbb8e4c4..c0985ee3 100644 --- a/web/src/components/ShareMemoDialog.tsx +++ b/web/src/components/ShareMemoDialog.tsx @@ -147,7 +147,7 @@ const ShareMemoDialog: React.FC = (props: Props) => { {state.memoAmount} MEMOS / {createdDays} DAYS - +
diff --git a/web/src/components/UpdateCustomizedProfileDialog.tsx b/web/src/components/UpdateCustomizedProfileDialog.tsx index 8b30bf3b..836af271 100644 --- a/web/src/components/UpdateCustomizedProfileDialog.tsx +++ b/web/src/components/UpdateCustomizedProfileDialog.tsx @@ -32,11 +32,11 @@ const UpdateCustomizedProfileDialog: React.FC = ({ destroy }: Props) => { }); }; - const handleIconUrlChanged = (e: React.ChangeEvent) => { + const handleLogoUrlChanged = (e: React.ChangeEvent) => { setState((state) => { return { ...state, - iconUrl: e.target.value as string, + logoUrl: e.target.value as string, }; }); }; @@ -69,7 +69,7 @@ const UpdateCustomizedProfileDialog: React.FC = ({ destroy }: Props) => { }; const handleSaveBtnClick = async () => { - if (state.name === "" || state.iconUrl === "") { + if (state.name === "" || state.logoUrl === "") { toastHelper.error(t("message.fill-all")); return; } @@ -103,7 +103,7 @@ const UpdateCustomizedProfileDialog: React.FC = ({ destroy }: Props) => {

{t("setting.system-section.customize-server.icon-url")}

- +

Description

Server locale

diff --git a/web/src/pages/Auth.tsx b/web/src/pages/Auth.tsx index 10842f11..100d326e 100644 --- a/web/src/pages/Auth.tsx +++ b/web/src/pages/Auth.tsx @@ -123,7 +123,7 @@ const Auth = () => {
- +

{systemStatus.customizedProfile.name}

{systemStatus.customizedProfile.description || t("slogan")}

diff --git a/web/src/pages/Explore.tsx b/web/src/pages/Explore.tsx index f3261289..167949d9 100644 --- a/web/src/pages/Explore.tsx +++ b/web/src/pages/Explore.tsx @@ -63,7 +63,7 @@ const Explore = () => {
- + {customizedProfile.name}
diff --git a/web/src/pages/MemoDetail.tsx b/web/src/pages/MemoDetail.tsx index d7b69116..5c02fe64 100644 --- a/web/src/pages/MemoDetail.tsx +++ b/web/src/pages/MemoDetail.tsx @@ -54,7 +54,7 @@ const MemoDetail = () => {
- +

{customizedProfile.name}

diff --git a/web/src/store/module/global.ts b/web/src/store/module/global.ts index 687cc9e6..decbf3c8 100644 --- a/web/src/store/module/global.ts +++ b/web/src/store/module/global.ts @@ -13,7 +13,7 @@ export const initialGlobalState = async () => { additionalScript: "", customizedProfile: { name: "memos", - iconUrl: "https://usememos.com/logo.webp", + logoUrl: "/logo.png", description: "", locale: "en", appearance: "system", diff --git a/web/src/store/reducer/global.ts b/web/src/store/reducer/global.ts index 089dca26..6965e130 100644 --- a/web/src/store/reducer/global.ts +++ b/web/src/store/reducer/global.ts @@ -23,7 +23,7 @@ const globalSlice = createSlice({ additionalScript: "", customizedProfile: { name: "memos", - iconUrl: "https://usememos.com/logo.webp", + logoUrl: "/logo.png", description: "", locale: "en", appearance: "system", diff --git a/web/src/types/modules/system.d.ts b/web/src/types/modules/system.d.ts index aad5bb78..55c1d343 100644 --- a/web/src/types/modules/system.d.ts +++ b/web/src/types/modules/system.d.ts @@ -5,7 +5,7 @@ interface Profile { interface CustomizedProfile { name: string; - iconUrl: string; + logoUrl: string; description: string; locale: Locale; appearance: Appearance;