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
50a3af3b
Commit
50a3af3b
authored
Feb 21, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: fix get general setting
parent
80b64c02
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
workspace_setting_service.go
api/v2/workspace_setting_service.go
+2
-2
Spoiler.tsx
web/src/components/MemoContent/Spoiler.tsx
+2
-2
No files found.
api/v2/workspace_setting_service.go
View file @
50a3af3b
...
@@ -7,7 +7,7 @@ import (
...
@@ -7,7 +7,7 @@ import (
"github.com/pkg/errors"
"github.com/pkg/errors"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/
proto
"
"google.golang.org/protobuf/
encoding/protojson
"
apiv2pb
"github.com/usememos/memos/proto/gen/api/v2"
apiv2pb
"github.com/usememos/memos/proto/gen/api/v2"
storepb
"github.com/usememos/memos/proto/gen/store"
storepb
"github.com/usememos/memos/proto/gen/store"
...
@@ -60,7 +60,7 @@ func (s *APIV2Service) GetWorkspaceGeneralSetting(ctx context.Context) (*storepb
...
@@ -60,7 +60,7 @@ func (s *APIV2Service) GetWorkspaceGeneralSetting(ctx context.Context) (*storepb
}
}
workspaceGeneralSetting
:=
&
storepb
.
WorkspaceGeneralSetting
{}
workspaceGeneralSetting
:=
&
storepb
.
WorkspaceGeneralSetting
{}
if
workspaceSetting
!=
nil
{
if
workspaceSetting
!=
nil
{
if
err
:=
proto
.
Unmarshal
([]
byte
(
workspaceSetting
.
Value
),
workspaceGeneralSetting
);
err
!=
nil
{
if
err
:=
proto
json
.
Unmarshal
([]
byte
(
workspaceSetting
.
Value
),
workspaceGeneralSetting
);
err
!=
nil
{
return
nil
,
errors
.
Wrap
(
err
,
"failed to unmarshal workspace setting"
)
return
nil
,
errors
.
Wrap
(
err
,
"failed to unmarshal workspace setting"
)
}
}
}
}
...
...
web/src/components/MemoContent/Spoiler.tsx
View file @
50a3af3b
...
@@ -9,7 +9,7 @@ const Spoiler: React.FC<Props> = ({ content }: Props) => {
...
@@ -9,7 +9,7 @@ const Spoiler: React.FC<Props> = ({ content }: Props) => {
const
[
isRevealed
,
setIsRevealed
]
=
useState
(
false
);
const
[
isRevealed
,
setIsRevealed
]
=
useState
(
false
);
return
(
return
(
<
div
<
span
className=
{
classNames
(
className=
{
classNames
(
"inline cursor-pointer select-none transition-all"
,
"inline cursor-pointer select-none transition-all"
,
isRevealed
?
"bg-gray-100 dark:bg-zinc-700"
:
"bg-gray-200 dark:bg-zinc-600"
,
isRevealed
?
"bg-gray-100 dark:bg-zinc-700"
:
"bg-gray-200 dark:bg-zinc-600"
,
...
@@ -17,7 +17,7 @@ const Spoiler: React.FC<Props> = ({ content }: Props) => {
...
@@ -17,7 +17,7 @@ const Spoiler: React.FC<Props> = ({ content }: Props) => {
onClick=
{
()
=>
setIsRevealed
(
!
isRevealed
)
}
onClick=
{
()
=>
setIsRevealed
(
!
isRevealed
)
}
>
>
<
span
className=
{
classNames
(
isRevealed
?
"opacity-100"
:
"opacity-0"
)
}
>
{
content
}
</
span
>
<
span
className=
{
classNames
(
isRevealed
?
"opacity-100"
:
"opacity-0"
)
}
>
{
content
}
</
span
>
</
div
>
</
span
>
);
);
};
};
...
...
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