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
16cfef32
Commit
16cfef32
authored
Mar 26, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: tweak statistics translation
parent
f637deac
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
8 deletions
+16
-8
index.tsx
web/src/components/MemoContent/index.tsx
+1
-1
MemoView.tsx
web/src/components/MemoView.tsx
+4
-1
PersonalStatistics.tsx
web/src/components/PersonalStatistics.tsx
+6
-4
en.json
web/src/locales/en.json
+4
-1
zh-Hans.json
web/src/locales/zh-Hans.json
+1
-1
No files found.
web/src/components/MemoContent/index.tsx
View file @
16cfef32
...
@@ -68,7 +68,7 @@ const MemoContent: React.FC<Props> = (props: Props) => {
...
@@ -68,7 +68,7 @@ const MemoContent: React.FC<Props> = (props: Props) => {
embeddedMemos
:
embeddedMemos
||
new
Set
(),
embeddedMemos
:
embeddedMemos
||
new
Set
(),
}
}
}
}
>
>
<
div
className=
{
`w-full flex flex-col justify-start items-start text-gray-800 dark:text-gray-
3
00 ${className || ""}`
}
>
<
div
className=
{
`w-full flex flex-col justify-start items-start text-gray-800 dark:text-gray-
4
00 ${className || ""}`
}
>
<
div
<
div
ref=
{
memoContentContainerRef
}
ref=
{
memoContentContainerRef
}
className=
{
classNames
(
className=
{
classNames
(
...
...
web/src/components/MemoView.tsx
View file @
16cfef32
...
@@ -100,7 +100,10 @@ const MemoView: React.FC<Props> = (props: Props) => {
...
@@ -100,7 +100,10 @@ const MemoView: React.FC<Props> = (props: Props) => {
{
creator
.
nickname
||
creator
.
username
}
{
creator
.
nickname
||
creator
.
username
}
</
span
>
</
span
>
</
Link
>
</
Link
>
<
div
className=
"w-auto -mt-0.5 text-xs leading-tight text-gray-400 select-none"
onClick=
{
handleGotoMemoDetailPage
}
>
<
div
className=
"w-auto -mt-0.5 text-xs leading-tight text-gray-400 dark:text-gray-500 select-none"
onClick=
{
handleGotoMemoDetailPage
}
>
<
relative
-
time
datetime=
{
memo
.
displayTime
?.
toISOString
()
}
format=
{
relativeTimeFormat
}
tense=
"past"
></
relative
-
time
>
<
relative
-
time
datetime=
{
memo
.
displayTime
?.
toISOString
()
}
format=
{
relativeTimeFormat
}
tense=
"past"
></
relative
-
time
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
web/src/components/PersonalStatistics.tsx
View file @
16cfef32
...
@@ -3,6 +3,7 @@ import { memoServiceClient } from "@/grpcweb";
...
@@ -3,6 +3,7 @@ import { memoServiceClient } from "@/grpcweb";
import
{
useTagStore
}
from
"@/store/module"
;
import
{
useTagStore
}
from
"@/store/module"
;
import
{
useMemoStore
}
from
"@/store/v1"
;
import
{
useMemoStore
}
from
"@/store/v1"
;
import
{
User
}
from
"@/types/proto/api/v2/user_service"
;
import
{
User
}
from
"@/types/proto/api/v2/user_service"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
Icon
from
"./Icon"
;
import
Icon
from
"./Icon"
;
interface
Props
{
interface
Props
{
...
@@ -11,6 +12,7 @@ interface Props {
...
@@ -11,6 +12,7 @@ interface Props {
const
PersonalStatistics
=
(
props
:
Props
)
=>
{
const
PersonalStatistics
=
(
props
:
Props
)
=>
{
const
{
user
}
=
props
;
const
{
user
}
=
props
;
const
t
=
useTranslate
();
const
tagStore
=
useTagStore
();
const
tagStore
=
useTagStore
();
const
memoStore
=
useMemoStore
();
const
memoStore
=
useMemoStore
();
const
[
memoAmount
,
setMemoAmount
]
=
useState
(
0
);
const
[
memoAmount
,
setMemoAmount
]
=
useState
(
0
);
...
@@ -37,25 +39,25 @@ const PersonalStatistics = (props: Props) => {
...
@@ -37,25 +39,25 @@ const PersonalStatistics = (props: Props) => {
return
(
return
(
<
div
className=
"w-full border mt-2 py-2 px-3 rounded-md space-y-0.5 text-gray-500 dark:text-gray-400 bg-zinc-50 dark:bg-zinc-900 dark:border-zinc-800"
>
<
div
className=
"w-full border mt-2 py-2 px-3 rounded-md space-y-0.5 text-gray-500 dark:text-gray-400 bg-zinc-50 dark:bg-zinc-900 dark:border-zinc-800"
>
<
p
className=
"text-sm font-medium
"
>
Statistics
</
p
>
<
p
className=
"text-sm font-medium
dark:text-gray-500"
>
{
t
(
"common.statistics"
)
}
</
p
>
<
div
className=
"w-full flex justify-between items-center"
>
<
div
className=
"w-full flex justify-between items-center"
>
<
div
className=
"w-full flex justify-start items-center"
>
<
div
className=
"w-full flex justify-start items-center"
>
<
Icon
.
CalendarDays
className=
"w-4 h-auto mr-1"
/>
<
Icon
.
CalendarDays
className=
"w-4 h-auto mr-1"
/>
<
span
className=
"block text-base sm:text-sm"
>
Days
</
span
>
<
span
className=
"block text-base sm:text-sm"
>
{
t
(
"common.days"
)
}
</
span
>
</
div
>
</
div
>
<
span
className=
"font-mono"
>
{
days
}
</
span
>
<
span
className=
"font-mono"
>
{
days
}
</
span
>
</
div
>
</
div
>
<
div
className=
"w-full flex justify-between items-center"
>
<
div
className=
"w-full flex justify-between items-center"
>
<
div
className=
"w-full flex justify-start items-center"
>
<
div
className=
"w-full flex justify-start items-center"
>
<
Icon
.
Library
className=
"w-4 h-auto mr-1"
/>
<
Icon
.
Library
className=
"w-4 h-auto mr-1"
/>
<
span
className=
"block text-base sm:text-sm"
>
Memos
</
span
>
<
span
className=
"block text-base sm:text-sm"
>
{
t
(
"common.memos"
)
}
</
span
>
</
div
>
</
div
>
{
isRequesting
?
<
Icon
.
Loader
className=
"animate-spin w-4 h-auto text-gray-400"
/>
:
<
span
className=
"font-mono"
>
{
memoAmount
}
</
span
>
}
{
isRequesting
?
<
Icon
.
Loader
className=
"animate-spin w-4 h-auto text-gray-400"
/>
:
<
span
className=
"font-mono"
>
{
memoAmount
}
</
span
>
}
</
div
>
</
div
>
<
div
className=
"w-full flex justify-between items-center"
>
<
div
className=
"w-full flex justify-between items-center"
>
<
div
className=
"w-full flex justify-start items-center"
>
<
div
className=
"w-full flex justify-start items-center"
>
<
Icon
.
Hash
className=
"w-4 h-auto mr-1"
/>
<
Icon
.
Hash
className=
"w-4 h-auto mr-1"
/>
<
span
className=
"block text-base sm:text-sm"
>
Tags
</
span
>
<
span
className=
"block text-base sm:text-sm"
>
{
t
(
"common.tags"
)
}
</
span
>
</
div
>
</
div
>
<
span
className=
"font-mono"
>
{
tags
}
</
span
>
<
span
className=
"font-mono"
>
{
tags
}
</
span
>
</
div
>
</
div
>
...
...
web/src/locales/en.json
View file @
16cfef32
...
@@ -61,7 +61,10 @@
...
@@ -61,7 +61,10 @@
"inbox"
:
"Inbox"
,
"inbox"
:
"Inbox"
,
"search"
:
"Search"
,
"search"
:
"Search"
,
"role"
:
"Role"
,
"role"
:
"Role"
,
"description"
:
"Description"
"description"
:
"Description"
,
"statistics"
:
"Statistics"
,
"days"
:
"Days"
,
"memos"
:
"Memos"
},
},
"router"
:
{
"router"
:
{
"go-to-home"
:
"Go to Home"
,
"go-to-home"
:
"Go to Home"
,
...
...
web/src/locales/zh-Hans.json
View file @
16cfef32
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
"sign-in-with"
:
"使用 {{provider}} 登录"
,
"sign-in-with"
:
"使用 {{provider}} 登录"
,
"sign-out"
:
"退出登录"
,
"sign-out"
:
"退出登录"
,
"sign-up"
:
"注册"
,
"sign-up"
:
"注册"
,
"tags"
:
"
全部
标签"
,
"tags"
:
"标签"
,
"title"
:
"标题"
,
"title"
:
"标题"
,
"type"
:
"类型"
,
"type"
:
"类型"
,
"unpin"
:
"取消置顶"
,
"unpin"
:
"取消置顶"
,
...
...
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