Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
9f25badd
Unverified
Commit
9f25badd
authored
Dec 22, 2022
by
boojack
Committed by
GitHub
Dec 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update logo format to png (#830)
parent
7efa749c
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
22 additions
and
22 deletions
+22
-22
system_setting.go
api/system_setting.go
+3
-3
system.go
server/system.go
+2
-2
index.html
web/index.html
+1
-1
logo-full.webp
web/public/logo-full.webp
+0
-0
logo.png
web/public/logo.png
+0
-0
logo.webp
web/public/logo.webp
+0
-0
manifest.json
web/public/manifest.json
+2
-2
App.tsx
web/src/App.tsx
+1
-1
AboutSiteDialog.tsx
web/src/components/AboutSiteDialog.tsx
+1
-1
MemoEditor.tsx
web/src/components/MemoEditor.tsx
+1
-1
ShareMemoDialog.tsx
web/src/components/ShareMemoDialog.tsx
+1
-1
UpdateCustomizedProfileDialog.tsx
web/src/components/UpdateCustomizedProfileDialog.tsx
+4
-4
Auth.tsx
web/src/pages/Auth.tsx
+1
-1
Explore.tsx
web/src/pages/Explore.tsx
+1
-1
MemoDetail.tsx
web/src/pages/MemoDetail.tsx
+1
-1
global.ts
web/src/store/module/global.ts
+1
-1
global.ts
web/src/store/reducer/global.ts
+1
-1
system.d.ts
web/src/types/modules/system.d.ts
+1
-1
No files found.
api/system_setting.go
View file @
9f25badd
...
@@ -24,8 +24,8 @@ const (
...
@@ -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:"icon
Url"`
LogoURL
string
`json:"logo
Url"`
// 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 {
...
@@ -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"
,
Icon
URL
:
""
,
Logo
URL
:
""
,
Description
:
""
,
Description
:
""
,
Locale
:
"en"
,
Locale
:
"en"
,
Appearance
:
"system"
,
Appearance
:
"system"
,
...
...
server/system.go
View file @
9f25badd
...
@@ -48,7 +48,7 @@ func (s *Server) registerSystemRoutes(g *echo.Group) {
...
@@ -48,7 +48,7 @@ func (s *Server) registerSystemRoutes(g *echo.Group) {
AdditionalScript
:
""
,
AdditionalScript
:
""
,
CustomizedProfile
:
api
.
CustomizedProfile
{
CustomizedProfile
:
api
.
CustomizedProfile
{
Name
:
"memos"
,
Name
:
"memos"
,
Icon
URL
:
""
,
Logo
URL
:
""
,
Description
:
""
,
Description
:
""
,
Locale
:
"en"
,
Locale
:
"en"
,
Appearance
:
"system"
,
Appearance
:
"system"
,
...
@@ -77,7 +77,7 @@ func (s *Server) registerSystemRoutes(g *echo.Group) {
...
@@ -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
[
"icon
Url"
]
.
(
string
),
LogoURL
:
valueMap
[
"logo
Url"
]
.
(
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
),
...
...
web/index.html
View file @
9f25badd
...
@@ -2,7 +2,7 @@
...
@@ -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"
/>
...
...
web/public/logo-full.webp
deleted
100644 → 0
View file @
7efa749c
File deleted
web/public/logo.png
0 → 100644
View file @
9f25badd
114 KB
web/public/logo.webp
deleted
100644 → 0
View file @
7efa749c
File deleted
web/public/manifest.json
View file @
9f25badd
...
@@ -4,8 +4,8 @@
...
@@ -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"
}
}
],
],
...
...
web/src/App.tsx
View file @
9f25badd
...
@@ -59,7 +59,7 @@ const App = () => {
...
@@ -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
(()
=>
{
...
...
web/src/components/AboutSiteDialog.tsx
View file @
9f25badd
...
@@ -20,7 +20,7 @@ const AboutSiteDialog: React.FC<Props> = ({ destroy }: Props) => {
...
@@ -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
}
>
...
...
web/src/components/MemoEditor.tsx
View file @
9f25badd
...
@@ -551,7 +551,7 @@ const MemoEditor = () => {
...
@@ -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
>
...
...
web/src/components/ShareMemoDialog.tsx
View file @
9f25badd
...
@@ -147,7 +147,7 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => {
...
@@ -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"
>
...
...
web/src/components/UpdateCustomizedProfileDialog.tsx
View file @
9f25badd
...
@@ -32,11 +32,11 @@ const UpdateCustomizedProfileDialog: React.FC<Props> = ({ destroy }: Props) => {
...
@@ -32,11 +32,11 @@ const UpdateCustomizedProfileDialog: React.FC<Props> = ({ destroy }: Props) => {
});
});
};
};
const
handle
Icon
UrlChanged
=
(
e
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
const
handle
Logo
UrlChanged
=
(
e
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
setState
((
state
)
=>
{
setState
((
state
)
=>
{
return
{
return
{
...
state
,
...
state
,
icon
Url
:
e
.
target
.
value
as
string
,
logo
Url
:
e
.
target
.
value
as
string
,
};
};
});
});
};
};
...
@@ -69,7 +69,7 @@ const UpdateCustomizedProfileDialog: React.FC<Props> = ({ destroy }: Props) => {
...
@@ -69,7 +69,7 @@ const UpdateCustomizedProfileDialog: React.FC<Props> = ({ destroy }: Props) => {
};
};
const
handleSaveBtnClick
=
async
()
=>
{
const
handleSaveBtnClick
=
async
()
=>
{
if
(
state
.
name
===
""
||
state
.
icon
Url
===
""
)
{
if
(
state
.
name
===
""
||
state
.
logo
Url
===
""
)
{
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) => {
...
@@ -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=
{
handleIcon
UrlChanged
}
/>
<
input
type=
"text"
className=
"input-text"
value=
{
state
.
logoUrl
}
onChange=
{
handleLogo
UrlChanged
}
/>
<
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
>
...
...
web/src/pages/Auth.tsx
View file @
9f25badd
...
@@ -123,7 +123,7 @@ const Auth = () => {
...
@@ -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
.
icon
Url
}
alt=
""
/>
<
img
className=
"logo-img"
src=
{
systemStatus
.
customizedProfile
.
logo
Url
}
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
>
...
...
web/src/pages/Explore.tsx
View file @
9f25badd
...
@@ -63,7 +63,7 @@ const Explore = () => {
...
@@ -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
.
icon
Url
}
alt=
""
/>
<
img
className=
"logo-img"
src=
{
customizedProfile
.
logo
Url
}
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"
>
...
...
web/src/pages/MemoDetail.tsx
View file @
9f25badd
...
@@ -54,7 +54,7 @@ const MemoDetail = () => {
...
@@ -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
.
icon
Url
}
alt=
""
/>
<
img
className=
"logo-img"
src=
{
customizedProfile
.
logo
Url
}
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"
>
...
...
web/src/store/module/global.ts
View file @
9f25badd
...
@@ -13,7 +13,7 @@ export const initialGlobalState = async () => {
...
@@ -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"
,
...
...
web/src/store/reducer/global.ts
View file @
9f25badd
...
@@ -23,7 +23,7 @@ const globalSlice = createSlice({
...
@@ -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"
,
...
...
web/src/types/modules/system.d.ts
View file @
9f25badd
...
@@ -5,7 +5,7 @@ interface Profile {
...
@@ -5,7 +5,7 @@ interface Profile {
interface
CustomizedProfile
{
interface
CustomizedProfile
{
name
:
string
;
name
:
string
;
icon
Url
:
string
;
logo
Url
:
string
;
description
:
string
;
description
:
string
;
locale
:
Locale
;
locale
:
Locale
;
appearance
:
Appearance
;
appearance
:
Appearance
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment