mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update logo format to png (#830)
This commit is contained in:
@ -24,8 +24,8 @@ const (
|
|||||||
type CustomizedProfile struct {
|
type CustomizedProfile struct {
|
||||||
// Name is the server name, default is `memos`
|
// Name is the server name, default is `memos`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
// IconURL is the url of icon image.
|
// LogoURL is the url of logo image.
|
||||||
IconURL string `json:"iconUrl"`
|
LogoURL string `json:"logoUrl"`
|
||||||
// Description is the server description.
|
// Description is the server description.
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
// Locale is the server default locale.
|
// Locale is the server default locale.
|
||||||
@ -100,7 +100,7 @@ func (upsert SystemSettingUpsert) Validate() error {
|
|||||||
} else if upsert.Name == SystemSettingCustomizedProfileName {
|
} else if upsert.Name == SystemSettingCustomizedProfileName {
|
||||||
customizedProfile := CustomizedProfile{
|
customizedProfile := CustomizedProfile{
|
||||||
Name: "memos",
|
Name: "memos",
|
||||||
IconURL: "",
|
LogoURL: "",
|
||||||
Description: "",
|
Description: "",
|
||||||
Locale: "en",
|
Locale: "en",
|
||||||
Appearance: "system",
|
Appearance: "system",
|
||||||
|
@ -48,7 +48,7 @@ func (s *Server) registerSystemRoutes(g *echo.Group) {
|
|||||||
AdditionalScript: "",
|
AdditionalScript: "",
|
||||||
CustomizedProfile: api.CustomizedProfile{
|
CustomizedProfile: api.CustomizedProfile{
|
||||||
Name: "memos",
|
Name: "memos",
|
||||||
IconURL: "",
|
LogoURL: "",
|
||||||
Description: "",
|
Description: "",
|
||||||
Locale: "en",
|
Locale: "en",
|
||||||
Appearance: "system",
|
Appearance: "system",
|
||||||
@ -77,7 +77,7 @@ func (s *Server) registerSystemRoutes(g *echo.Group) {
|
|||||||
valueMap := value.(map[string]interface{})
|
valueMap := value.(map[string]interface{})
|
||||||
systemStatus.CustomizedProfile = api.CustomizedProfile{
|
systemStatus.CustomizedProfile = api.CustomizedProfile{
|
||||||
Name: valueMap["name"].(string),
|
Name: valueMap["name"].(string),
|
||||||
IconURL: valueMap["iconUrl"].(string),
|
LogoURL: valueMap["logoUrl"].(string),
|
||||||
Description: valueMap["description"].(string),
|
Description: valueMap["description"].(string),
|
||||||
Locale: valueMap["locale"].(string),
|
Locale: valueMap["locale"].(string),
|
||||||
Appearance: valueMap["appearance"].(string),
|
Appearance: valueMap["appearance"].(string),
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" href="/logo.webp" type="image/*" />
|
<link rel="icon" href="/logo.png" type="image/*" />
|
||||||
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f4f4f5" />
|
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f4f4f5" />
|
||||||
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#27272a" />
|
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#27272a" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 63 KiB |
BIN
web/public/logo.png
Normal file
BIN
web/public/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 114 KiB |
Binary file not shown.
Before Width: | Height: | Size: 16 KiB |
@ -4,8 +4,8 @@
|
|||||||
"description": "usememos/memos",
|
"description": "usememos/memos",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "/logo.webp",
|
"src": "/logo.png",
|
||||||
"type": "image/webp",
|
"type": "image/png",
|
||||||
"sizes": "520x520"
|
"sizes": "520x520"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -59,7 +59,7 @@ const App = () => {
|
|||||||
// dynamic update metadata with customized profile.
|
// dynamic update metadata with customized profile.
|
||||||
document.title = systemStatus.customizedProfile.name;
|
document.title = systemStatus.customizedProfile.name;
|
||||||
const link = document.querySelector("link[rel~='icon']") as HTMLLinkElement;
|
const link = document.querySelector("link[rel~='icon']") as HTMLLinkElement;
|
||||||
link.href = systemStatus.customizedProfile.iconUrl || "/logo.webp";
|
link.href = systemStatus.customizedProfile.logoUrl || "/logo.png";
|
||||||
}, [systemStatus]);
|
}, [systemStatus]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -20,7 +20,7 @@ const AboutSiteDialog: React.FC<Props> = ({ destroy }: Props) => {
|
|||||||
<>
|
<>
|
||||||
<div className="dialog-header-container">
|
<div className="dialog-header-container">
|
||||||
<p className="title-text flex items-center">
|
<p className="title-text flex items-center">
|
||||||
<img className="w-7 h-auto mr-1" src="/logo.webp" alt="" />
|
<img className="w-7 h-auto mr-1" src="/logo.png" alt="" />
|
||||||
{t("common.about")} memos
|
{t("common.about")} memos
|
||||||
</p>
|
</p>
|
||||||
<button className="btn close-btn" onClick={handleCloseBtnClick}>
|
<button className="btn close-btn" onClick={handleCloseBtnClick}>
|
||||||
|
@ -551,7 +551,7 @@ const MemoEditor = () => {
|
|||||||
</button>
|
</button>
|
||||||
<button className="action-btn confirm-btn" disabled={!allowSave || state.isUploadingResource} onClick={handleSaveBtnClick}>
|
<button className="action-btn confirm-btn" disabled={!allowSave || state.isUploadingResource} onClick={handleSaveBtnClick}>
|
||||||
{t("editor.save")}
|
{t("editor.save")}
|
||||||
<img className="icon-img w-4 h-auto" src="/logo.webp" />
|
<img className="icon-img w-4 h-auto" src="/logo.png" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -147,7 +147,7 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => {
|
|||||||
{state.memoAmount} MEMOS / {createdDays} DAYS
|
{state.memoAmount} MEMOS / {createdDays} DAYS
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<img className="logo-img" src="/logo.webp" alt="" />
|
<img className="logo-img" src="/logo.png" alt="" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="px-4 py-3 w-full flex flex-row justify-between items-center">
|
<div className="px-4 py-3 w-full flex flex-row justify-between items-center">
|
||||||
|
@ -32,11 +32,11 @@ const UpdateCustomizedProfileDialog: React.FC<Props> = ({ destroy }: Props) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleIconUrlChanged = (e: React.ChangeEvent<HTMLInputElement>) => {
|
const handleLogoUrlChanged = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setState((state) => {
|
setState((state) => {
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
iconUrl: e.target.value as string,
|
logoUrl: e.target.value as string,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -69,7 +69,7 @@ const UpdateCustomizedProfileDialog: React.FC<Props> = ({ destroy }: Props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleSaveBtnClick = async () => {
|
const handleSaveBtnClick = async () => {
|
||||||
if (state.name === "" || state.iconUrl === "") {
|
if (state.name === "" || state.logoUrl === "") {
|
||||||
toastHelper.error(t("message.fill-all"));
|
toastHelper.error(t("message.fill-all"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ const UpdateCustomizedProfileDialog: React.FC<Props> = ({ destroy }: Props) => {
|
|||||||
</p>
|
</p>
|
||||||
<input type="text" className="input-text" value={state.name} onChange={handleNameChanged} />
|
<input type="text" className="input-text" value={state.name} onChange={handleNameChanged} />
|
||||||
<p className="text-sm mb-1 mt-2">{t("setting.system-section.customize-server.icon-url")}</p>
|
<p className="text-sm mb-1 mt-2">{t("setting.system-section.customize-server.icon-url")}</p>
|
||||||
<input type="text" className="input-text" value={state.iconUrl} onChange={handleIconUrlChanged} />
|
<input type="text" className="input-text" value={state.logoUrl} onChange={handleLogoUrlChanged} />
|
||||||
<p className="text-sm mb-1 mt-2">Description</p>
|
<p className="text-sm mb-1 mt-2">Description</p>
|
||||||
<input type="text" className="input-text" value={state.description} onChange={handleDescriptionChanged} />
|
<input type="text" className="input-text" value={state.description} onChange={handleDescriptionChanged} />
|
||||||
<p className="text-sm mb-1 mt-2">Server locale</p>
|
<p className="text-sm mb-1 mt-2">Server locale</p>
|
||||||
|
@ -123,7 +123,7 @@ const Auth = () => {
|
|||||||
<div className="auth-form-wrapper">
|
<div className="auth-form-wrapper">
|
||||||
<div className="page-header-container">
|
<div className="page-header-container">
|
||||||
<div className="title-container">
|
<div className="title-container">
|
||||||
<img className="logo-img" src={systemStatus.customizedProfile.iconUrl} alt="" />
|
<img className="logo-img" src={systemStatus.customizedProfile.logoUrl} alt="" />
|
||||||
<p className="logo-text">{systemStatus.customizedProfile.name}</p>
|
<p className="logo-text">{systemStatus.customizedProfile.name}</p>
|
||||||
</div>
|
</div>
|
||||||
<p className="slogan-text">{systemStatus.customizedProfile.description || t("slogan")}</p>
|
<p className="slogan-text">{systemStatus.customizedProfile.description || t("slogan")}</p>
|
||||||
|
@ -63,7 +63,7 @@ const Explore = () => {
|
|||||||
<div className="page-container">
|
<div className="page-container">
|
||||||
<div className="page-header">
|
<div className="page-header">
|
||||||
<div className="title-container">
|
<div className="title-container">
|
||||||
<img className="logo-img" src={customizedProfile.iconUrl} alt="" />
|
<img className="logo-img" src={customizedProfile.logoUrl} alt="" />
|
||||||
<span className="title-text">{customizedProfile.name}</span>
|
<span className="title-text">{customizedProfile.name}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="action-button-container">
|
<div className="action-button-container">
|
||||||
|
@ -54,7 +54,7 @@ const MemoDetail = () => {
|
|||||||
<div className="page-container">
|
<div className="page-container">
|
||||||
<div className="page-header">
|
<div className="page-header">
|
||||||
<div className="title-container">
|
<div className="title-container">
|
||||||
<img className="logo-img" src={customizedProfile.iconUrl} alt="" />
|
<img className="logo-img" src={customizedProfile.logoUrl} alt="" />
|
||||||
<p className="logo-text">{customizedProfile.name}</p>
|
<p className="logo-text">{customizedProfile.name}</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="action-button-container">
|
<div className="action-button-container">
|
||||||
|
@ -13,7 +13,7 @@ export const initialGlobalState = async () => {
|
|||||||
additionalScript: "",
|
additionalScript: "",
|
||||||
customizedProfile: {
|
customizedProfile: {
|
||||||
name: "memos",
|
name: "memos",
|
||||||
iconUrl: "https://usememos.com/logo.webp",
|
logoUrl: "/logo.png",
|
||||||
description: "",
|
description: "",
|
||||||
locale: "en",
|
locale: "en",
|
||||||
appearance: "system",
|
appearance: "system",
|
||||||
|
@ -23,7 +23,7 @@ const globalSlice = createSlice({
|
|||||||
additionalScript: "",
|
additionalScript: "",
|
||||||
customizedProfile: {
|
customizedProfile: {
|
||||||
name: "memos",
|
name: "memos",
|
||||||
iconUrl: "https://usememos.com/logo.webp",
|
logoUrl: "/logo.png",
|
||||||
description: "",
|
description: "",
|
||||||
locale: "en",
|
locale: "en",
|
||||||
appearance: "system",
|
appearance: "system",
|
||||||
|
2
web/src/types/modules/system.d.ts
vendored
2
web/src/types/modules/system.d.ts
vendored
@ -5,7 +5,7 @@ interface Profile {
|
|||||||
|
|
||||||
interface CustomizedProfile {
|
interface CustomizedProfile {
|
||||||
name: string;
|
name: string;
|
||||||
iconUrl: string;
|
logoUrl: string;
|
||||||
description: string;
|
description: string;
|
||||||
locale: Locale;
|
locale: Locale;
|
||||||
appearance: Appearance;
|
appearance: Appearance;
|
||||||
|
Reference in New Issue
Block a user