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
1fcafd80
Commit
1fcafd80
authored
Jul 29, 2025
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: enable memo comments by default
parent
5074268f
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
7 additions
and
60 deletions
+7
-60
workspace_service.proto
proto/api/v1/workspace_service.proto
+0
-2
workspace_service.pb.go
proto/gen/api/v1/workspace_service.pb.go
+3
-13
openapi.yaml
proto/gen/openapi.yaml
+0
-3
workspace_setting.pb.go
proto/gen/store/workspace_setting.pb.go
+2
-12
workspace_setting.proto
proto/store/workspace_setting.proto
+0
-2
workspace_service.go
server/router/api/v1/workspace_service.go
+0
-2
MemoView.tsx
web/src/components/MemoView.tsx
+1
-1
MemoRelatedSettings.tsx
web/src/components/Settings/MemoRelatedSettings.tsx
+0
-7
MemoDetail.tsx
web/src/pages/MemoDetail.tsx
+1
-3
workspace_service.ts
web/src/types/proto/api/v1/workspace_service.ts
+0
-15
No files found.
proto/api/v1/workspace_service.proto
View file @
1fcafd80
...
...
@@ -162,8 +162,6 @@ message WorkspaceSetting {
bool
enable_double_click_edit
=
4
;
// enable_link_preview enables links preview.
bool
enable_link_preview
=
5
;
// enable_comment enables comment.
bool
enable_comment
=
6
;
// reactions is the list of reactions.
repeated
string
reactions
=
7
;
// disable_markdown_shortcuts disallow the registration of markdown shortcuts.
...
...
proto/gen/api/v1/workspace_service.pb.go
View file @
1fcafd80
...
...
@@ -665,8 +665,6 @@ type WorkspaceSetting_MemoRelatedSetting struct {
EnableDoubleClickEdit
bool
`protobuf:"varint,4,opt,name=enable_double_click_edit,json=enableDoubleClickEdit,proto3" json:"enable_double_click_edit,omitempty"`
// enable_link_preview enables links preview.
EnableLinkPreview
bool
`protobuf:"varint,5,opt,name=enable_link_preview,json=enableLinkPreview,proto3" json:"enable_link_preview,omitempty"`
// enable_comment enables comment.
EnableComment
bool
`protobuf:"varint,6,opt,name=enable_comment,json=enableComment,proto3" json:"enable_comment,omitempty"`
// reactions is the list of reactions.
Reactions
[]
string
`protobuf:"bytes,7,rep,name=reactions,proto3" json:"reactions,omitempty"`
// disable_markdown_shortcuts disallow the registration of markdown shortcuts.
...
...
@@ -744,13 +742,6 @@ func (x *WorkspaceSetting_MemoRelatedSetting) GetEnableLinkPreview() bool {
return
false
}
func
(
x
*
WorkspaceSetting_MemoRelatedSetting
)
GetEnableComment
()
bool
{
if
x
!=
nil
{
return
x
.
EnableComment
}
return
false
}
func
(
x
*
WorkspaceSetting_MemoRelatedSetting
)
GetReactions
()
[]
string
{
if
x
!=
nil
{
return
x
.
Reactions
...
...
@@ -952,7 +943,7 @@ const file_api_v1_workspace_service_proto_rawDesc = "" +
"
\a
version
\x18\x02
\x01
(
\t
R
\a
version
\x12\x12\n
"
+
"
\x04
mode
\x18\x03
\x01
(
\t
R
\x04
mode
\x12
!
\n
"
+
"
\f
instance_url
\x18\x06
\x01
(
\t
R
\v
instanceUrl
\"\x1c\n
"
+
"
\x1a
GetWorkspaceProfileRequest
\"\x
df
\x11\n
"
+
"
\x1a
GetWorkspaceProfileRequest
\"\x
b8
\x11\n
"
+
"
\x10
WorkspaceSetting
\x12\x17\n
"
+
"
\x04
name
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\b
R
\x04
name
\x12
X
\n
"
+
"
\x0f
general_setting
\x18\x02
\x01
(
\v
2-.memos.api.v1.WorkspaceSetting.GeneralSettingH
\x00
R
\x0e
generalSetting
\x12
X
\n
"
+
...
...
@@ -992,14 +983,13 @@ const file_api_v1_workspace_service_proto_rawDesc = "" +
"
\x18
STORAGE_TYPE_UNSPECIFIED
\x10\x00\x12\f\n
"
+
"
\b
DATABASE
\x10\x01\x12\t\n
"
+
"
\x05
LOCAL
\x10\x02\x12\x06\n
"
+
"
\x02
S3
\x10\x03\x1a\x
ff
\x03\n
"
+
"
\x02
S3
\x10\x03\x1a\x
d8
\x03\n
"
+
"
\x12
MemoRelatedSetting
\x12
<
\n
"
+
"
\x1a
disallow_public_visibility
\x18\x01
\x01
(
\b
R
\x18
disallowPublicVisibility
\x12
7
\n
"
+
"
\x18
display_with_update_time
\x18\x02
\x01
(
\b
R
\x15
displayWithUpdateTime
\x12
0
\n
"
+
"
\x14
content_length_limit
\x18\x03
\x01
(
\x05
R
\x12
contentLengthLimit
\x12
7
\n
"
+
"
\x18
enable_double_click_edit
\x18\x04
\x01
(
\b
R
\x15
enableDoubleClickEdit
\x12
.
\n
"
+
"
\x13
enable_link_preview
\x18\x05
\x01
(
\b
R
\x11
enableLinkPreview
\x12
%
\n
"
+
"
\x0e
enable_comment
\x18\x06
\x01
(
\b
R
\r
enableComment
\x12\x1c\n
"
+
"
\x13
enable_link_preview
\x18\x05
\x01
(
\b
R
\x11
enableLinkPreview
\x12\x1c\n
"
+
"
\t
reactions
\x18\a
\x03
(
\t
R
\t
reactions
\x12
<
\n
"
+
"
\x1a
disable_markdown_shortcuts
\x18\b
\x01
(
\b
R
\x18
disableMarkdownShortcuts
\x12
7
\n
"
+
"
\x18
enable_blur_nsfw_content
\x18\t
\x01
(
\b
R
\x15
enableBlurNsfwContent
\x12\x1b\n
"
+
...
...
proto/gen/openapi.yaml
View file @
1fcafd80
...
...
@@ -3881,9 +3881,6 @@ components:
enableLinkPreview
:
type
:
boolean
description
:
enable_link_preview enables links preview.
enableComment
:
type
:
boolean
description
:
enable_comment enables comment.
reactions
:
type
:
array
items
:
...
...
proto/gen/store/workspace_setting.pb.go
View file @
1fcafd80
...
...
@@ -677,8 +677,6 @@ type WorkspaceMemoRelatedSetting struct {
EnableDoubleClickEdit
bool
`protobuf:"varint,4,opt,name=enable_double_click_edit,json=enableDoubleClickEdit,proto3" json:"enable_double_click_edit,omitempty"`
// enable_link_preview enables links preview.
EnableLinkPreview
bool
`protobuf:"varint,5,opt,name=enable_link_preview,json=enableLinkPreview,proto3" json:"enable_link_preview,omitempty"`
// enable_comment enables comment.
EnableComment
bool
`protobuf:"varint,6,opt,name=enable_comment,json=enableComment,proto3" json:"enable_comment,omitempty"`
// reactions is the list of reactions.
Reactions
[]
string
`protobuf:"bytes,7,rep,name=reactions,proto3" json:"reactions,omitempty"`
// disable markdown shortcuts
...
...
@@ -756,13 +754,6 @@ func (x *WorkspaceMemoRelatedSetting) GetEnableLinkPreview() bool {
return
false
}
func
(
x
*
WorkspaceMemoRelatedSetting
)
GetEnableComment
()
bool
{
if
x
!=
nil
{
return
x
.
EnableComment
}
return
false
}
func
(
x
*
WorkspaceMemoRelatedSetting
)
GetReactions
()
[]
string
{
if
x
!=
nil
{
return
x
.
Reactions
...
...
@@ -841,14 +832,13 @@ const file_store_workspace_setting_proto_rawDesc = "" +
"
\b
endpoint
\x18\x03
\x01
(
\t
R
\b
endpoint
\x12\x16\n
"
+
"
\x06
region
\x18\x04
\x01
(
\t
R
\x06
region
\x12\x16\n
"
+
"
\x06
bucket
\x18\x05
\x01
(
\t
R
\x06
bucket
\x12
$
\n
"
+
"
\x0e
use_path_style
\x18\x06
\x01
(
\b
R
\f
usePathStyle
\"\x
88\x04
\n
"
+
"
\x0e
use_path_style
\x18\x06
\x01
(
\b
R
\f
usePathStyle
\"\x
e1\x03
\n
"
+
"
\x1b
WorkspaceMemoRelatedSetting
\x12
<
\n
"
+
"
\x1a
disallow_public_visibility
\x18\x01
\x01
(
\b
R
\x18
disallowPublicVisibility
\x12
7
\n
"
+
"
\x18
display_with_update_time
\x18\x02
\x01
(
\b
R
\x15
displayWithUpdateTime
\x12
0
\n
"
+
"
\x14
content_length_limit
\x18\x03
\x01
(
\x05
R
\x12
contentLengthLimit
\x12
7
\n
"
+
"
\x18
enable_double_click_edit
\x18\x04
\x01
(
\b
R
\x15
enableDoubleClickEdit
\x12
.
\n
"
+
"
\x13
enable_link_preview
\x18\x05
\x01
(
\b
R
\x11
enableLinkPreview
\x12
%
\n
"
+
"
\x0e
enable_comment
\x18\x06
\x01
(
\b
R
\r
enableComment
\x12\x1c\n
"
+
"
\x13
enable_link_preview
\x18\x05
\x01
(
\b
R
\x11
enableLinkPreview
\x12\x1c\n
"
+
"
\t
reactions
\x18\a
\x03
(
\t
R
\t
reactions
\x12
<
\n
"
+
"
\x1a
disable_markdown_shortcuts
\x18\b
\x01
(
\b
R
\x18
disableMarkdownShortcuts
\x12
7
\n
"
+
"
\x18
enable_blur_nsfw_content
\x18\t
\x01
(
\b
R
\x15
enableBlurNsfwContent
\x12\x1b\n
"
+
...
...
proto/store/workspace_setting.proto
View file @
1fcafd80
...
...
@@ -107,8 +107,6 @@ message WorkspaceMemoRelatedSetting {
bool
enable_double_click_edit
=
4
;
// enable_link_preview enables links preview.
bool
enable_link_preview
=
5
;
// enable_comment enables comment.
bool
enable_comment
=
6
;
// reactions is the list of reactions.
repeated
string
reactions
=
7
;
// disable markdown shortcuts
...
...
server/router/api/v1/workspace_service.go
View file @
1fcafd80
...
...
@@ -257,7 +257,6 @@ func convertWorkspaceMemoRelatedSettingFromStore(setting *storepb.WorkspaceMemoR
ContentLengthLimit
:
setting
.
ContentLengthLimit
,
EnableDoubleClickEdit
:
setting
.
EnableDoubleClickEdit
,
EnableLinkPreview
:
setting
.
EnableLinkPreview
,
EnableComment
:
setting
.
EnableComment
,
Reactions
:
setting
.
Reactions
,
DisableMarkdownShortcuts
:
setting
.
DisableMarkdownShortcuts
,
EnableBlurNsfwContent
:
setting
.
EnableBlurNsfwContent
,
...
...
@@ -275,7 +274,6 @@ func convertWorkspaceMemoRelatedSettingToStore(setting *v1pb.WorkspaceSetting_Me
ContentLengthLimit
:
setting
.
ContentLengthLimit
,
EnableDoubleClickEdit
:
setting
.
EnableDoubleClickEdit
,
EnableLinkPreview
:
setting
.
EnableLinkPreview
,
EnableComment
:
setting
.
EnableComment
,
Reactions
:
setting
.
Reactions
,
DisableMarkdownShortcuts
:
setting
.
DisableMarkdownShortcuts
,
EnableBlurNsfwContent
:
setting
.
EnableBlurNsfwContent
,
...
...
web/src/components/MemoView.tsx
View file @
1fcafd80
...
...
@@ -190,7 +190,7 @@ const MemoView: React.FC<Props> = observer((props: Props) => {
)
}
{
currentUser
&&
!
isArchived
&&
<
ReactionSelector
className=
"border-none w-auto h-auto"
memo=
{
memo
}
/>
}
</
div
>
{
!
isInMemoDetailPage
&&
(
workspaceMemoRelatedSetting
.
enableComment
||
commentAmount
>
0
)
&&
(
{
!
isInMemoDetailPage
&&
commentAmount
>
0
&&
(
<
Link
className=
{
cn
(
"flex flex-row justify-start items-center rounded-md p-1 hover:opacity-80"
,
...
...
web/src/components/Settings/MemoRelatedSettings.tsx
View file @
1fcafd80
...
...
@@ -88,13 +88,6 @@ const MemoRelatedSettings = observer(() => {
onCheckedChange=
{
(
checked
)
=>
updatePartialSetting
({
enableLinkPreview
:
checked
})
}
/>
</
div
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
span
>
{
t
(
"setting.memo-related-settings.enable-memo-comments"
)
}
</
span
>
<
Switch
checked=
{
memoRelatedSetting
.
enableComment
}
onCheckedChange=
{
(
checked
)
=>
updatePartialSetting
({
enableComment
:
checked
})
}
/>
</
div
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
span
>
{
t
(
"setting.system-section.enable-double-click-to-edit"
)
}
</
span
>
<
Switch
...
...
web/src/pages/MemoDetail.tsx
View file @
1fcafd80
...
...
@@ -14,7 +14,6 @@ import useNavigateTo from "@/hooks/useNavigateTo";
import
useResponsiveWidth
from
"@/hooks/useResponsiveWidth"
;
import
{
cn
}
from
"@/lib/utils"
;
import
{
memoStore
}
from
"@/store"
;
import
{
workspaceStore
}
from
"@/store"
;
import
{
memoNamePrefix
}
from
"@/store/common"
;
import
{
Memo
,
MemoRelation_Type
}
from
"@/types/proto/api/v1/memo_service"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
...
...
@@ -29,13 +28,12 @@ const MemoDetail = observer(() => {
const
uid
=
params
.
uid
;
const
memoName
=
`
${
memoNamePrefix
}${
uid
}
`
;
const
memo
=
memoStore
.
getMemoByName
(
memoName
);
const
workspaceMemoRelatedSetting
=
workspaceStore
.
state
.
memoRelatedSetting
;
const
[
parentMemo
,
setParentMemo
]
=
useState
<
Memo
|
undefined
>
(
undefined
);
const
[
showCommentEditor
,
setShowCommentEditor
]
=
useState
(
false
);
const
commentRelations
=
memo
?.
relations
.
filter
((
relation
)
=>
relation
.
relatedMemo
?.
name
===
memo
.
name
&&
relation
.
type
===
MemoRelation_Type
.
COMMENT
)
||
[];
const
comments
=
commentRelations
.
map
((
relation
)
=>
memoStore
.
getMemoByName
(
relation
.
memo
!
.
name
)).
filter
((
memo
)
=>
memo
)
as
any
as
Memo
[];
const
showCreateCommentButton
=
workspaceMemoRelatedSetting
.
enableComment
&&
currentUser
&&
!
showCommentEditor
;
const
showCreateCommentButton
=
currentUser
&&
!
showCommentEditor
;
// Prepare memo.
useEffect
(()
=>
{
...
...
web/src/types/proto/api/v1/workspace_service.ts
View file @
1fcafd80
...
...
@@ -223,8 +223,6 @@ export interface WorkspaceSetting_MemoRelatedSetting {
enableDoubleClickEdit
:
boolean
;
/** enable_link_preview enables links preview. */
enableLinkPreview
:
boolean
;
/** enable_comment enables comment. */
enableComment
:
boolean
;
/** reactions is the list of reactions. */
reactions
:
string
[];
/** disable_markdown_shortcuts disallow the registration of markdown shortcuts. */
...
...
@@ -916,7 +914,6 @@ function createBaseWorkspaceSetting_MemoRelatedSetting(): WorkspaceSetting_MemoR
contentLengthLimit
:
0
,
enableDoubleClickEdit
:
false
,
enableLinkPreview
:
false
,
enableComment
:
false
,
reactions
:
[],
disableMarkdownShortcuts
:
false
,
enableBlurNsfwContent
:
false
,
...
...
@@ -941,9 +938,6 @@ export const WorkspaceSetting_MemoRelatedSetting: MessageFns<WorkspaceSetting_Me
if
(
message
.
enableLinkPreview
!==
false
)
{
writer
.
uint32
(
40
).
bool
(
message
.
enableLinkPreview
);
}
if
(
message
.
enableComment
!==
false
)
{
writer
.
uint32
(
48
).
bool
(
message
.
enableComment
);
}
for
(
const
v
of
message
.
reactions
)
{
writer
.
uint32
(
58
).
string
(
v
!
);
}
...
...
@@ -1006,14 +1000,6 @@ export const WorkspaceSetting_MemoRelatedSetting: MessageFns<WorkspaceSetting_Me
message
.
enableLinkPreview
=
reader
.
bool
();
continue
;
}
case
6
:
{
if
(
tag
!==
48
)
{
break
;
}
message
.
enableComment
=
reader
.
bool
();
continue
;
}
case
7
:
{
if
(
tag
!==
58
)
{
break
;
...
...
@@ -1065,7 +1051,6 @@ export const WorkspaceSetting_MemoRelatedSetting: MessageFns<WorkspaceSetting_Me
message
.
contentLengthLimit
=
object
.
contentLengthLimit
??
0
;
message
.
enableDoubleClickEdit
=
object
.
enableDoubleClickEdit
??
false
;
message
.
enableLinkPreview
=
object
.
enableLinkPreview
??
false
;
message
.
enableComment
=
object
.
enableComment
??
false
;
message
.
reactions
=
object
.
reactions
?.
map
((
e
)
=>
e
)
||
[];
message
.
disableMarkdownShortcuts
=
object
.
disableMarkdownShortcuts
??
false
;
message
.
enableBlurNsfwContent
=
object
.
enableBlurNsfwContent
??
false
;
...
...
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