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
f5c1e791
Commit
f5c1e791
authored
Oct 28, 2023
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update about dialog
parent
d02105ca
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
70 deletions
+9
-70
AboutSiteDialog.tsx
web/src/components/AboutSiteDialog.tsx
+8
-30
CreateMemoRelationDialog.tsx
web/src/components/CreateMemoRelationDialog.tsx
+1
-1
GitHubBadge.tsx
web/src/components/GitHubBadge.tsx
+0
-29
api.ts
web/src/helpers/api.ts
+0
-10
No files found.
web/src/components/AboutSiteDialog.tsx
View file @
f5c1e791
import
{
Divider
}
from
"@mui/joy"
;
import
{
useGlobalStore
}
from
"@/store/module"
;
import
{
useGlobalStore
}
from
"@/store/module"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
generateDialog
}
from
"./Dialog"
;
import
{
generateDialog
}
from
"./Dialog"
;
import
GitHubBadge
from
"./GitHubBadge"
;
import
Icon
from
"./Icon"
;
import
Icon
from
"./Icon"
;
type
Props
=
DialogProps
;
type
Props
=
DialogProps
;
...
@@ -28,37 +28,15 @@ const AboutSiteDialog: React.FC<Props> = ({ destroy }: Props) => {
...
@@ -28,37 +28,15 @@ const AboutSiteDialog: React.FC<Props> = ({ destroy }: Props) => {
</
div
>
</
div
>
<
div
className=
"flex flex-col justify-start items-start max-w-full w-96"
>
<
div
className=
"flex flex-col justify-start items-start max-w-full w-96"
>
<
p
className=
"text-xs"
>
{
t
(
"about.memos-description"
)
}
</
p
>
<
p
className=
"text-xs"
>
{
t
(
"about.memos-description"
)
}
</
p
>
<
p
className=
"text-sm mt-2
"
>
{
customizedProfile
.
description
||
t
(
"about.no-server-description"
)
}
</
p
>
<
p
className=
"text-sm mt-2"
>
{
customizedProfile
.
description
||
t
(
"about.no-server-description"
)
}
</
p
>
<
div
className=
"mt-4 w-full flex flex-row text-sm justify-start items-center"
>
<
Divider
className=
"!my-3"
/
>
<
div
className=
"flex flex-row justify-start items-center mr-2
"
>
<
div
className=
"w-full flex flex-row justify-start items-center text-sm italic
"
>
{
t
(
"about.powered-by"
)
}
{
t
(
"about.powered-by"
)
}
<
a
href=
"https://usememos.com"
target=
"_blank"
className=
"flex flex-row justify-start items-center mx-1 hover:underline"
>
<
a
className=
"shrink-0 flex flex-row justify-start items-center mx-1 hover:underline"
href=
"https://usememos.com"
target=
"_blank"
>
<
img
className=
"w-6 h-auto rounded-full mr-1"
src=
"/logo.png"
alt=
""
/>
<
img
className=
"w-auto h-7"
src=
"https://www.usememos.com/full-logo-landscape.png"
alt=
""
/>
memos
</
a
>
</
a
>
<
span
>
v
{
profile
.
version
}
</
span
>
<
span
>
v
{
profile
.
version
}
</
span
>
</
div
>
</
div
>
<
GitHubBadge
/>
</
div
>
<
div
className=
"border-t w-full mt-3 pt-2 text-sm flex flex-row justify-start items-center space-x-2"
>
<
span
className=
"text-gray-500"
>
{
t
(
"about.other-projects"
)
}
:
</
span
>
<
a
href=
"https://github.com/boojack/slash"
target=
"_blank"
className=
"flex items-center underline text-blue-600 hover:opacity-80"
>
<
img
className=
"w-5 h-auto mr-1 rounded-full"
src=
"https://github.com/boojack/slash/raw/main/resources/logo.png"
alt=
""
/>
<
span
>
Slash
</
span
>
</
a
>
<
a
href=
"https://github.com/boojack/sticky-notes"
target=
"_blank"
className=
"flex items-center underline text-blue-600 hover:opacity-80"
>
<
img
className=
"w-5 h-auto mr-1"
src=
"https://raw.githubusercontent.com/boojack/sticky-notes/main/public/sticky-notes.ico"
alt=
""
/>
<
span
>
Sticky notes
</
span
>
</
a
>
</
div
>
</
div
>
</
div
>
</>
</>
);
);
...
...
web/src/components/CreateMemoRelationDialog.tsx
View file @
f5c1e791
...
@@ -89,7 +89,7 @@ const CreateMemoRelationDialog: React.FC<Props> = (props: Props) => {
...
@@ -89,7 +89,7 @@ const CreateMemoRelationDialog: React.FC<Props> = (props: Props) => {
onChange=
{
handleMemoIdChanged
}
onChange=
{
handleMemoIdChanged
}
onKeyDown=
{
handleMemoIdInputKeyDown
}
onKeyDown=
{
handleMemoIdInputKeyDown
}
fullWidth
fullWidth
endDecorator=
{
<
Icon
.
PlusCircle
onClick=
{
handleSaveBtnClick
}
className=
"w-4 h-auto cursor-pointer hover:opacity-80"
/>
}
endDecorator=
{
<
Icon
.
Check
onClick=
{
handleSaveBtnClick
}
className=
"w-4 h-auto cursor-pointer hover:opacity-80"
/>
}
/>
/>
{
memoList
.
length
>
0
&&
(
{
memoList
.
length
>
0
&&
(
<>
<>
...
...
web/src/components/GitHubBadge.tsx
deleted
100644 → 0
View file @
d02105ca
import
{
useEffect
,
useState
}
from
"react"
;
import
*
as
api
from
"@/helpers/api"
;
import
Icon
from
"./Icon"
;
const
GitHubBadge
=
()
=>
{
const
[
starCount
,
setStarCount
]
=
useState
(
0
);
useEffect
(()
=>
{
api
.
getRepoStarCount
().
then
((
data
)
=>
{
setStarCount
(
data
);
});
},
[]);
return
(
<
a
className=
"h-7 flex flex-row justify-start items-center border dark:border-zinc-600 rounded cursor-pointer hover:opacity-80"
href=
"https://github.com/usememos/memos"
target=
"_blank"
>
<
div
className=
"apply w-auto h-full px-2 flex flex-row justify-center items-center text-xs bg-gray-100 dark:bg-zinc-700"
>
<
Icon
.
Github
className=
"mr-1 w-4 h-4"
/>
Star
</
div
>
<
div
className=
"w-auto h-full flex flex-row justify-center items-center px-3 text-xs font-bold"
>
{
starCount
||
""
}
</
div
>
</
a
>
);
};
export
default
GitHubBadge
;
web/src/helpers/api.ts
View file @
f5c1e791
...
@@ -180,16 +180,6 @@ export function deleteIdentityProvider(id: IdentityProviderId) {
...
@@ -180,16 +180,6 @@ export function deleteIdentityProvider(id: IdentityProviderId) {
return
axios
.
delete
(
`/api/v1/idp/
${
id
}
`
);
return
axios
.
delete
(
`/api/v1/idp/
${
id
}
`
);
}
}
export
async
function
getRepoStarCount
()
{
const
{
data
}
=
await
axios
.
get
(
`https://api.github.com/repos/usememos/memos`
,
{
headers
:
{
Accept
:
"application/vnd.github.v3.star+json"
,
Authorization
:
""
,
},
});
return
data
.
stargazers_count
as
number
;
}
export
async
function
getRepoLatestTag
()
{
export
async
function
getRepoLatestTag
()
{
const
{
data
}
=
await
axios
.
get
(
`https://api.github.com/repos/usememos/memos/tags`
,
{
const
{
data
}
=
await
axios
.
get
(
`https://api.github.com/repos/usememos/memos/tags`
,
{
headers
:
{
headers
:
{
...
...
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