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
ab136e33
Commit
ab136e33
authored
Mar 14, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: tweak styles
parent
21af2a00
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
6 deletions
+16
-6
user_service.proto
proto/api/v2/user_service.proto
+9
-0
index.tsx
web/src/components/MemoContent/index.tsx
+1
-1
SectionMenuItem.tsx
web/src/components/Settings/SectionMenuItem.tsx
+5
-4
UserAvatar.tsx
web/src/components/UserAvatar.tsx
+1
-1
No files found.
proto/api/v2/user_service.proto
View file @
ab136e33
...
@@ -16,11 +16,13 @@ service UserService {
...
@@ -16,11 +16,13 @@ service UserService {
rpc
ListUsers
(
ListUsersRequest
)
returns
(
ListUsersResponse
)
{
rpc
ListUsers
(
ListUsersRequest
)
returns
(
ListUsersResponse
)
{
option
(
google.api.http
)
=
{
get
:
"/api/v2/users"
};
option
(
google.api.http
)
=
{
get
:
"/api/v2/users"
};
}
}
// GetUser gets a user by name.
// GetUser gets a user by name.
rpc
GetUser
(
GetUserRequest
)
returns
(
GetUserResponse
)
{
rpc
GetUser
(
GetUserRequest
)
returns
(
GetUserResponse
)
{
option
(
google.api.http
)
=
{
get
:
"/api/v2/{name=users/*}"
};
option
(
google.api.http
)
=
{
get
:
"/api/v2/{name=users/*}"
};
option
(
google.api.method_signature
)
=
"name"
;
option
(
google.api.method_signature
)
=
"name"
;
}
}
// CreateUser creates a new user.
// CreateUser creates a new user.
rpc
CreateUser
(
CreateUserRequest
)
returns
(
CreateUserResponse
)
{
rpc
CreateUser
(
CreateUserRequest
)
returns
(
CreateUserResponse
)
{
option
(
google.api.http
)
=
{
option
(
google.api.http
)
=
{
...
@@ -29,6 +31,7 @@ service UserService {
...
@@ -29,6 +31,7 @@ service UserService {
};
};
option
(
google.api.method_signature
)
=
"user"
;
option
(
google.api.method_signature
)
=
"user"
;
}
}
// UpdateUser updates a user.
// UpdateUser updates a user.
rpc
UpdateUser
(
UpdateUserRequest
)
returns
(
UpdateUserResponse
)
{
rpc
UpdateUser
(
UpdateUserRequest
)
returns
(
UpdateUserResponse
)
{
option
(
google.api.http
)
=
{
option
(
google.api.http
)
=
{
...
@@ -37,16 +40,19 @@ service UserService {
...
@@ -37,16 +40,19 @@ service UserService {
};
};
option
(
google.api.method_signature
)
=
"user,update_mask"
;
option
(
google.api.method_signature
)
=
"user,update_mask"
;
}
}
// DeleteUser deletes a user.
// DeleteUser deletes a user.
rpc
DeleteUser
(
DeleteUserRequest
)
returns
(
DeleteUserResponse
)
{
rpc
DeleteUser
(
DeleteUserRequest
)
returns
(
DeleteUserResponse
)
{
option
(
google.api.http
)
=
{
delete
:
"/api/v2/{name=users/*}"
};
option
(
google.api.http
)
=
{
delete
:
"/api/v2/{name=users/*}"
};
option
(
google.api.method_signature
)
=
"name"
;
option
(
google.api.method_signature
)
=
"name"
;
}
}
// GetUserSetting gets the setting of a user.
// GetUserSetting gets the setting of a user.
rpc
GetUserSetting
(
GetUserSettingRequest
)
returns
(
GetUserSettingResponse
)
{
rpc
GetUserSetting
(
GetUserSettingRequest
)
returns
(
GetUserSettingResponse
)
{
option
(
google.api.http
)
=
{
get
:
"/api/v2/{name=users/*}/setting"
};
option
(
google.api.http
)
=
{
get
:
"/api/v2/{name=users/*}/setting"
};
option
(
google.api.method_signature
)
=
"name"
;
option
(
google.api.method_signature
)
=
"name"
;
}
}
// UpdateUserSetting updates the setting of a user.
// UpdateUserSetting updates the setting of a user.
rpc
UpdateUserSetting
(
UpdateUserSettingRequest
)
returns
(
UpdateUserSettingResponse
)
{
rpc
UpdateUserSetting
(
UpdateUserSettingRequest
)
returns
(
UpdateUserSettingResponse
)
{
option
(
google.api.http
)
=
{
option
(
google.api.http
)
=
{
...
@@ -55,11 +61,13 @@ service UserService {
...
@@ -55,11 +61,13 @@ service UserService {
};
};
option
(
google.api.method_signature
)
=
"setting,update_mask"
;
option
(
google.api.method_signature
)
=
"setting,update_mask"
;
}
}
// ListUserAccessTokens returns a list of access tokens for a user.
// ListUserAccessTokens returns a list of access tokens for a user.
rpc
ListUserAccessTokens
(
ListUserAccessTokensRequest
)
returns
(
ListUserAccessTokensResponse
)
{
rpc
ListUserAccessTokens
(
ListUserAccessTokensRequest
)
returns
(
ListUserAccessTokensResponse
)
{
option
(
google.api.http
)
=
{
get
:
"/api/v2/{name=users/*}/access_tokens"
};
option
(
google.api.http
)
=
{
get
:
"/api/v2/{name=users/*}/access_tokens"
};
option
(
google.api.method_signature
)
=
"name"
;
option
(
google.api.method_signature
)
=
"name"
;
}
}
// CreateUserAccessToken creates a new access token for a user.
// CreateUserAccessToken creates a new access token for a user.
rpc
CreateUserAccessToken
(
CreateUserAccessTokenRequest
)
returns
(
CreateUserAccessTokenResponse
)
{
rpc
CreateUserAccessToken
(
CreateUserAccessTokenRequest
)
returns
(
CreateUserAccessTokenResponse
)
{
option
(
google.api.http
)
=
{
option
(
google.api.http
)
=
{
...
@@ -68,6 +76,7 @@ service UserService {
...
@@ -68,6 +76,7 @@ service UserService {
};
};
option
(
google.api.method_signature
)
=
"name"
;
option
(
google.api.method_signature
)
=
"name"
;
}
}
// DeleteUserAccessToken deletes an access token for a user.
// DeleteUserAccessToken deletes an access token for a user.
rpc
DeleteUserAccessToken
(
DeleteUserAccessTokenRequest
)
returns
(
DeleteUserAccessTokenResponse
)
{
rpc
DeleteUserAccessToken
(
DeleteUserAccessTokenRequest
)
returns
(
DeleteUserAccessTokenResponse
)
{
option
(
google.api.http
)
=
{
delete
:
"/api/v2/{name=users/*}/access_tokens/{access_token}"
};
option
(
google.api.http
)
=
{
delete
:
"/api/v2/{name=users/*}/access_tokens/{access_token}"
};
...
...
web/src/components/MemoContent/index.tsx
View file @
ab136e33
...
@@ -73,7 +73,7 @@ const MemoContent: React.FC<Props> = (props: Props) => {
...
@@ -73,7 +73,7 @@ const MemoContent: React.FC<Props> = (props: Props) => {
<
div
<
div
ref=
{
memoContentContainerRef
}
ref=
{
memoContentContainerRef
}
className=
{
classNames
(
className=
{
classNames
(
"w-full max-w-full word-break text-base leading-
6
space-y-2 whitespace-pre-wrap"
,
"w-full max-w-full word-break text-base leading-
snug
space-y-2 whitespace-pre-wrap"
,
showCompactMode
&&
"line-clamp-6"
,
showCompactMode
&&
"line-clamp-6"
,
)
}
)
}
onClick=
{
handleMemoContentClick
}
onClick=
{
handleMemoContentClick
}
...
...
web/src/components/Settings/SectionMenuItem.tsx
View file @
ab136e33
...
@@ -10,14 +10,15 @@ interface SettingMenuItemProps {
...
@@ -10,14 +10,15 @@ interface SettingMenuItemProps {
const
SectionMenuItem
:
React
.
FC
<
SettingMenuItemProps
>
=
({
text
,
icon
:
IconComponent
,
isSelected
,
onClick
})
=>
{
const
SectionMenuItem
:
React
.
FC
<
SettingMenuItemProps
>
=
({
text
,
icon
:
IconComponent
,
isSelected
,
onClick
})
=>
{
return
(
return
(
<
span
<
div
onClick=
{
onClick
}
onClick=
{
onClick
}
className=
{
`w-auto px-3 leading-8 flex flex-row justify-start items-center cursor-pointer rounded-lg select-none hover:opacity-80 ${
className=
{
`w-auto
max-w-full
px-3 leading-8 flex flex-row justify-start items-center cursor-pointer rounded-lg select-none hover:opacity-80 ${
isSelected ? "bg-zinc-100 shadow dark:bg-zinc-900" : ""
isSelected ? "bg-zinc-100 shadow dark:bg-zinc-900" : ""
}`
}
}`
}
>
>
<
IconComponent
className=
"w-4 h-auto mr-2 opacity-80"
/>
{
text
}
<
IconComponent
className=
"w-4 h-auto mr-2 opacity-80 shrink-0"
/>
</
span
>
<
span
className=
"truncate"
>
{
text
}
</
span
>
</
div
>
);
);
};
};
...
...
web/src/components/UserAvatar.tsx
View file @
ab136e33
...
@@ -8,7 +8,7 @@ interface Props {
...
@@ -8,7 +8,7 @@ interface Props {
const
UserAvatar
=
(
props
:
Props
)
=>
{
const
UserAvatar
=
(
props
:
Props
)
=>
{
const
{
avatarUrl
,
className
}
=
props
;
const
{
avatarUrl
,
className
}
=
props
;
return
(
return
(
<
div
className=
{
classNames
(
`w-8 h-8 overflow-clip rounded-
lg
`
,
className
)
}
>
<
div
className=
{
classNames
(
`w-8 h-8 overflow-clip rounded-
xl
`
,
className
)
}
>
<
img
<
img
className=
"w-full h-auto shadow min-w-full min-h-full object-cover dark:opacity-80"
className=
"w-full h-auto shadow min-w-full min-h-full object-cover dark:opacity-80"
src=
{
avatarUrl
||
"/full-logo.webp"
}
src=
{
avatarUrl
||
"/full-logo.webp"
}
...
...
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