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
90119c1a
Commit
90119c1a
authored
Mar 07, 2025
by
Johnny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: move memo property
parent
3401def4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
511 additions
and
511 deletions
+511
-511
memo_service.proto
proto/api/v1/memo_service.proto
+7
-7
memo_service.pb.go
proto/gen/api/v1/memo_service.pb.go
+500
-500
memo_service_converter.go
server/router/api/v1/memo_service_converter.go
+2
-2
MemoDetailSidebar.tsx
web/src/components/MemoDetailSidebar/MemoDetailSidebar.tsx
+2
-2
No files found.
proto/api/v1/memo_service.proto
View file @
90119c1a
...
...
@@ -163,7 +163,7 @@ message Memo {
repeated
Reaction
reactions
=
16
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
Memo
Property
property
=
17
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
Property
property
=
17
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// The name of the parent memo.
// Format: memos/{id}
...
...
@@ -174,13 +174,13 @@ message Memo {
// The location of the memo.
optional
Location
location
=
20
;
}
message
MemoProperty
{
bool
has_link
=
1
;
bool
has_task_list
=
2
;
bool
has_code
=
3
;
bool
has_incomplete_tasks
=
4
;
message
Property
{
bool
has_link
=
1
;
bool
has_task_list
=
2
;
bool
has_code
=
3
;
bool
has_incomplete_tasks
=
4
;
}
}
message
Location
{
...
...
proto/gen/api/v1/memo_service.pb.go
View file @
90119c1a
This source diff could not be displayed because it is too large. You can
view the blob
instead.
server/router/api/v1/memo_service_converter.go
View file @
90119c1a
...
...
@@ -88,11 +88,11 @@ func (s *APIV1Service) convertMemoFromStore(ctx context.Context, memo *store.Mem
return
memoMessage
,
nil
}
func
convertMemoPropertyFromStore
(
property
*
storepb
.
MemoPayload_Property
)
*
v1pb
.
MemoProperty
{
func
convertMemoPropertyFromStore
(
property
*
storepb
.
MemoPayload_Property
)
*
v1pb
.
Memo
_
Property
{
if
property
==
nil
{
return
nil
}
return
&
v1pb
.
MemoProperty
{
return
&
v1pb
.
Memo
_
Property
{
HasLink
:
property
.
HasLink
,
HasTaskList
:
property
.
HasTaskList
,
HasCode
:
property
.
HasCode
,
...
...
web/src/components/MemoDetailSidebar/MemoDetailSidebar.tsx
View file @
90119c1a
import
{
isEqual
}
from
"lodash-es"
;
import
{
CheckCircleIcon
,
Code2Icon
,
HashIcon
,
LinkIcon
}
from
"lucide-react"
;
import
{
Memo
,
MemoRelation_Type
,
MemoProperty
}
from
"@/types/proto/api/v1/memo_service"
;
import
{
Memo
,
MemoRelation_Type
,
Memo
_
Property
}
from
"@/types/proto/api/v1/memo_service"
;
import
{
cn
}
from
"@/utils"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
MemoRelationForceGraph
from
"../MemoRelationForceGraph"
;
...
...
@@ -13,7 +13,7 @@ interface Props {
const
MemoDetailSidebar
=
({
memo
,
className
,
parentPage
}:
Props
)
=>
{
const
t
=
useTranslate
();
const
property
=
MemoProperty
.
fromPartial
(
memo
.
property
||
{});
const
property
=
Memo
_
Property
.
fromPartial
(
memo
.
property
||
{});
const
hasSpecialProperty
=
property
.
hasLink
||
property
.
hasTaskList
||
property
.
hasCode
||
property
.
hasIncompleteTasks
;
const
shouldShowRelationGraph
=
memo
.
relations
.
filter
((
r
)
=>
r
.
type
===
MemoRelation_Type
.
REFERENCE
).
length
>
0
;
...
...
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