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
606e574e
Commit
606e574e
authored
Feb 13, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update enum type
parent
ebe36782
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
11 deletions
+17
-11
buf.gen.yaml
proto/buf.gen.yaml
+1
-0
MemoActionMenu.tsx
web/src/components/MemoActionMenu.tsx
+1
-1
ReactionView.tsx
web/src/components/ReactionView.tsx
+9
-7
MemberSection.tsx
web/src/components/Settings/MemberSection.tsx
+1
-1
Inboxes.tsx
web/src/pages/Inboxes.tsx
+5
-2
No files found.
proto/buf.gen.yaml
View file @
606e574e
...
@@ -32,6 +32,7 @@ plugins:
...
@@ -32,6 +32,7 @@ plugins:
-
outputJsonMethods=false
-
outputJsonMethods=false
-
useExactTypes=false
-
useExactTypes=false
-
esModuleInterop=true
-
esModuleInterop=true
-
stringEnums=true
-
plugin
:
buf.build/community/pseudomuto-doc:v1.5.1
-
plugin
:
buf.build/community/pseudomuto-doc:v1.5.1
out
:
gen
out
:
gen
opt
:
opt
:
...
...
web/src/components/MemoActionMenu.tsx
View file @
606e574e
...
@@ -87,7 +87,7 @@ const MemoActionMenu = (props: Props) => {
...
@@ -87,7 +87,7 @@ const MemoActionMenu = (props: Props) => {
<
Dropdown
>
<
Dropdown
>
<
MenuButton
slots=
{
{
root
:
"div"
}
}
>
<
MenuButton
slots=
{
{
root
:
"div"
}
}
>
<
span
className=
"h-7 w-7 flex justify-center items-center rounded-full hover:opacity-70"
>
<
span
className=
"h-7 w-7 flex justify-center items-center rounded-full hover:opacity-70"
>
<
Icon
.
More
Horizont
al
className=
"w-4 h-4 mx-auto text-gray-500 dark:text-gray-400"
/>
<
Icon
.
More
Vertic
al
className=
"w-4 h-4 mx-auto text-gray-500 dark:text-gray-400"
/>
</
span
>
</
span
>
</
MenuButton
>
</
MenuButton
>
<
Menu
className=
"text-sm"
size=
"sm"
placement=
"bottom-end"
>
<
Menu
className=
"text-sm"
size=
"sm"
placement=
"bottom-end"
>
...
...
web/src/components/ReactionView.tsx
View file @
606e574e
...
@@ -44,17 +44,19 @@ export const stringifyReactionType = (reactionType: Reaction_Type): string => {
...
@@ -44,17 +44,19 @@ export const stringifyReactionType = (reactionType: Reaction_Type): string => {
}
}
};
};
const
stringifyUsers
=
(
users
:
User
[]):
string
=>
{
const
stringifyUsers
=
(
users
:
User
[]
,
reactionType
:
Reaction_Type
):
string
=>
{
if
(
users
.
length
===
0
)
{
if
(
users
.
length
===
0
)
{
return
""
;
return
""
;
}
}
if
(
users
.
length
<
5
)
{
if
(
users
.
length
<
5
)
{
return
users
.
map
((
user
)
=>
user
.
nickname
||
user
.
username
).
join
(
", "
);
return
users
.
map
((
user
)
=>
user
.
nickname
||
user
.
username
).
join
(
", "
)
+
" reacted with "
+
reactionType
.
toLowerCase
()
;
}
}
return
`
${
users
return
(
`
${
users
.
slice
(
0
,
4
)
.
slice
(
0
,
4
)
.
map
((
user
)
=>
user
.
nickname
||
user
.
username
)
.
map
((
user
)
=>
user
.
nickname
||
user
.
username
)
.
join
(
", "
)}
and
${
users
.
length
-
4
}
others`
;
.
join
(
", "
)}
and
${
users
.
length
-
4
}
more reacted with `
+
reactionType
.
toLowerCase
()
);
};
};
const
ReactionView
=
(
props
:
Props
)
=>
{
const
ReactionView
=
(
props
:
Props
)
=>
{
...
@@ -93,7 +95,7 @@ const ReactionView = (props: Props) => {
...
@@ -93,7 +95,7 @@ const ReactionView = (props: Props) => {
};
};
return
(
return
(
<
Tooltip
title=
{
stringifyUsers
(
users
)
}
placement=
"top"
>
<
Tooltip
title=
{
stringifyUsers
(
users
,
reactionType
)
}
placement=
"top"
>
<
div
<
div
className=
{
classNames
(
className=
{
classNames
(
"h-7 border px-2 py-0.5 rounded-full font-memo flex flex-row justify-center items-center gap-1 dark:border-zinc-700"
,
"h-7 border px-2 py-0.5 rounded-full font-memo flex flex-row justify-center items-center gap-1 dark:border-zinc-700"
,
...
...
web/src/components/Settings/MemberSection.tsx
View file @
606e574e
...
@@ -64,7 +64,7 @@ const MemberSection = () => {
...
@@ -64,7 +64,7 @@ const MemberSection = () => {
...
state
,
...
state
,
creatingUser
:
{
creatingUser
:
{
...
state
.
creatingUser
,
...
state
.
creatingUser
,
role
:
Number
(
event
.
target
.
value
)
as
User_Role
,
role
:
event
.
target
.
value
as
User_Role
,
},
},
});
});
};
};
...
...
web/src/pages/Inboxes.tsx
View file @
606e574e
...
@@ -5,14 +5,17 @@ import MemoCommentMessage from "@/components/Inbox/MemoCommentMessage";
...
@@ -5,14 +5,17 @@ import MemoCommentMessage from "@/components/Inbox/MemoCommentMessage";
import
VersionUpdateMessage
from
"@/components/Inbox/VersionUpdateMessage"
;
import
VersionUpdateMessage
from
"@/components/Inbox/VersionUpdateMessage"
;
import
MobileHeader
from
"@/components/MobileHeader"
;
import
MobileHeader
from
"@/components/MobileHeader"
;
import
{
useInboxStore
}
from
"@/store/v1"
;
import
{
useInboxStore
}
from
"@/store/v1"
;
import
{
Inbox_Type
}
from
"@/types/proto/api/v2/inbox_service"
;
import
{
Inbox_
Status
,
Inbox_
Type
}
from
"@/types/proto/api/v2/inbox_service"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
const
Inboxes
=
()
=>
{
const
Inboxes
=
()
=>
{
const
t
=
useTranslate
();
const
t
=
useTranslate
();
const
inboxStore
=
useInboxStore
();
const
inboxStore
=
useInboxStore
();
const
inboxes
=
inboxStore
.
inboxes
.
sort
((
a
,
b
)
=>
{
const
inboxes
=
inboxStore
.
inboxes
.
sort
((
a
,
b
)
=>
{
return
a
.
status
-
b
.
status
;
if
(
a
.
status
===
b
.
status
)
{
return
0
;
}
return
a
.
status
===
Inbox_Status
.
UNREAD
?
-
1
:
1
;
});
});
useEffect
(()
=>
{
useEffect
(()
=>
{
...
...
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