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
d1156aa7
Commit
d1156aa7
authored
Sep 15, 2023
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update account setting styles
parent
4e49d3cb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
14 deletions
+19
-14
AccessTokenSection.tsx
web/src/components/Settings/AccessTokenSection.tsx
+9
-5
MyAccountSection.tsx
web/src/components/Settings/MyAccountSection.tsx
+7
-6
UserAvatar.tsx
web/src/components/UserAvatar.tsx
+1
-1
Root.tsx
web/src/layouts/Root.tsx
+1
-1
Setting.tsx
web/src/pages/Setting.tsx
+1
-1
No files found.
web/src/components/Settings/AccessTokenSection.tsx
View file @
d1156aa7
...
@@ -9,6 +9,7 @@ import { useTranslate } from "@/utils/i18n";
...
@@ -9,6 +9,7 @@ import { useTranslate } from "@/utils/i18n";
import
showCreateAccessTokenDialog
from
"../CreateAccessTokenDialog"
;
import
showCreateAccessTokenDialog
from
"../CreateAccessTokenDialog"
;
import
{
showCommonDialog
}
from
"../Dialog/CommonDialog"
;
import
{
showCommonDialog
}
from
"../Dialog/CommonDialog"
;
import
Icon
from
"../Icon"
;
import
Icon
from
"../Icon"
;
import
LearnMore
from
"../LearnMore"
;
const
listAccessTokens
=
async
(
username
:
string
)
=>
{
const
listAccessTokens
=
async
(
username
:
string
)
=>
{
const
{
data
}
=
await
axios
.
get
<
ListUserAccessTokensResponse
>
(`/api/v2/users/$
{
username
}
/access_tokens`);
const
{
data
}
=
await
axios
.
get
<
ListUserAccessTokensResponse
>
(`/api/v2/users/$
{
username
}
/access_tokens`);
...
@@ -57,12 +58,15 @@ const AccessTokenSection = () => {
...
@@ -57,12 +58,15 @@ const AccessTokenSection = () => {
<>
<>
<
div
className=
"mt-8 w-full flex flex-col justify-start items-start space-y-4"
>
<
div
className=
"mt-8 w-full flex flex-col justify-start items-start space-y-4"
>
<
div
className=
"w-full"
>
<
div
className=
"w-full"
>
<
div
className=
"sm:flex sm:items-center"
>
<
div
className=
"sm:flex sm:items-center sm:justify-between"
>
<
div
className=
"sm:flex-auto"
>
<
div
className=
"sm:flex-auto space-y-1"
>
<
p
className=
"text-sm mt-4 first:mt-2 mb-3 font-mono text-gray-500 dark:text-gray-400"
>
Access Tokens
</
p
>
<
p
className=
"flex flex-row justify-start items-center font-medium text-gray-700 dark:text-gray-400"
>
<
p
className=
"mt-2 text-sm text-gray-700"
>
A list of all access tokens for your account.
</
p
>
Access Tokens
<
LearnMore
className=
"ml-2"
url=
"https://usememos.com/docs/local-storage"
/>
</
p
>
<
p
className=
"text-sm text-gray-700"
>
A list of all access tokens for your account.
</
p
>
</
div
>
</
div
>
<
div
className=
"mt-4 sm:m
l-16 sm:mt-0 sm:flex-none
"
>
<
div
className=
"mt-4 sm:m
t-0
"
>
<
Button
<
Button
variant=
"outlined"
variant=
"outlined"
color=
"neutral"
color=
"neutral"
...
...
web/src/components/Settings/MyAccountSection.tsx
View file @
d1156aa7
...
@@ -13,14 +13,15 @@ const MyAccountSection = () => {
...
@@ -13,14 +13,15 @@ const MyAccountSection = () => {
return
(
return
(
<>
<>
<
div
className=
"section-container account-section-container"
>
<
div
className=
"section-container account-section-container"
>
<
p
className=
"
text-sm mt-4 first:mt-2 mb-3 font-mono text-gray-5
00 dark:text-gray-400"
>
{
t
(
"setting.account-section.title"
)
}
</
p
>
<
p
className=
"
font-medium my-2 text-gray-7
00 dark:text-gray-400"
>
{
t
(
"setting.account-section.title"
)
}
</
p
>
<
div
className=
"flex flex-row justify-start items-center"
>
<
div
className=
"flex flex-row justify-start items-center"
>
<
UserAvatar
className=
"mr-2"
avatarUrl=
{
user
.
avatarUrl
}
/>
<
UserAvatar
className=
"mr-2 w-14 h-14"
avatarUrl=
{
user
.
avatarUrl
}
/>
<
span
className=
"text-2xl leading-10 font-medium"
>
{
user
.
nickname
}
</
span
>
<
div
className=
"flex flex-col justify-center items-start"
>
<
span
className=
"text-base ml-1 text-gray-500 leading-10 dark:text-gray-400"
>
(
{
user
.
username
}
)
</
span
>
<
span
className=
"text-2xl font-medium"
>
{
user
.
nickname
}
</
span
>
<
span
className=
"-mt-2 text-base text-gray-500 dark:text-gray-400"
>
(
{
user
.
username
}
)
</
span
>
</
div
>
</
div
>
</
div
>
<
div
className=
"flex flex-row justify-start items-center text-base text-gray-600 dark:text-gray-400"
>
{
user
.
email
}
</
div
>
<
div
className=
"w-full flex flex-row justify-start items-center mt-4 space-x-2"
>
<
div
className=
"w-full flex flex-row justify-start items-center mt-2 space-x-2"
>
<
Button
variant=
"outlined"
onClick=
{
showUpdateAccountDialog
}
>
<
Button
variant=
"outlined"
onClick=
{
showUpdateAccountDialog
}
>
{
t
(
"common.edit"
)
}
{
t
(
"common.edit"
)
}
</
Button
>
</
Button
>
...
...
web/src/components/UserAvatar.tsx
View file @
d1156aa7
...
@@ -10,7 +10,7 @@ const UserAvatar = (props: Props) => {
...
@@ -10,7 +10,7 @@ const UserAvatar = (props: Props) => {
return
(
return
(
<
div
className=
{
classNames
(
`w-8 h-8 overflow-clip rounded-full`
,
className
)
}
>
<
div
className=
{
classNames
(
`w-8 h-8 overflow-clip rounded-full`
,
className
)
}
>
<
img
<
img
className=
"w-full h-auto rounded-full min-w-full min-h-full object-cover dark:opacity-80"
className=
"w-full h-auto rounded-full
shadow
min-w-full min-h-full object-cover dark:opacity-80"
src=
{
avatarUrl
||
"/logo.webp"
}
src=
{
avatarUrl
||
"/logo.webp"
}
alt=
""
alt=
""
/>
/>
...
...
web/src/layouts/Root.tsx
View file @
d1156aa7
...
@@ -10,7 +10,7 @@ function Root() {
...
@@ -10,7 +10,7 @@ function Root() {
</
div
>
</
div
>
<
div
className=
"w-full max-w-6xl mx-auto flex flex-row justify-center items-start sm:px-4"
>
<
div
className=
"w-full max-w-6xl mx-auto flex flex-row justify-center items-start sm:px-4"
>
<
Header
/>
<
Header
/>
<
main
className=
"w-auto max-w-full flex-grow shrink flex flex-col justify-start items-start"
>
<
main
className=
"w-auto max-w-full
sm:max-w-[calc(100%-14rem)]
flex-grow shrink flex flex-col justify-start items-start"
>
<
Outlet
/>
<
Outlet
/>
</
main
>
</
main
>
</
div
>
</
div
>
...
...
web/src/pages/Setting.tsx
View file @
d1156aa7
...
@@ -94,7 +94,7 @@ const Setting = () => {
...
@@ -94,7 +94,7 @@ const Setting = () => {
</>
</>
)
:
null
}
)
:
null
}
</
div
>
</
div
>
<
div
className=
"section-content-container sm:max-w-[calc(100%-1
4
rem)]"
>
<
div
className=
"section-content-container sm:max-w-[calc(100%-1
2
rem)]"
>
<
Select
<
Select
className=
"block mb-2 sm:!hidden"
className=
"block mb-2 sm:!hidden"
value=
{
state
.
selectedSection
}
value=
{
state
.
selectedSection
}
...
...
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