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
9503f731
Unverified
Commit
9503f731
authored
Aug 07, 2023
by
Chris Akring
Committed by
GitHub
Aug 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: use user avatar in ShareMemoDialog (#2102)
fix: ShareMemoDialog use user avata
parent
f9d1080a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
ShareMemoDialog.tsx
web/src/components/ShareMemoDialog.tsx
+2
-4
No files found.
web/src/components/ShareMemoDialog.tsx
View file @
9503f731
...
@@ -9,7 +9,7 @@ import { VISIBILITY_SELECTOR_ITEMS } from "@/helpers/consts";
...
@@ -9,7 +9,7 @@ import { VISIBILITY_SELECTOR_ITEMS } from "@/helpers/consts";
import
{
getDateTimeString
,
getTimeStampByDate
}
from
"@/helpers/datetime"
;
import
{
getDateTimeString
,
getTimeStampByDate
}
from
"@/helpers/datetime"
;
import
useLoading
from
"@/hooks/useLoading"
;
import
useLoading
from
"@/hooks/useLoading"
;
import
toImage
from
"@/labs/html2image"
;
import
toImage
from
"@/labs/html2image"
;
import
{
use
GlobalStore
,
use
MemoStore
,
useUserStore
}
from
"@/store/module"
;
import
{
useMemoStore
,
useUserStore
}
from
"@/store/module"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
generateDialog
}
from
"./Dialog"
;
import
{
generateDialog
}
from
"./Dialog"
;
import
showEmbedMemoDialog
from
"./EmbedMemoDialog"
;
import
showEmbedMemoDialog
from
"./EmbedMemoDialog"
;
...
@@ -33,9 +33,7 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => {
...
@@ -33,9 +33,7 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => {
const
t
=
useTranslate
();
const
t
=
useTranslate
();
const
userStore
=
useUserStore
();
const
userStore
=
useUserStore
();
const
memoStore
=
useMemoStore
();
const
memoStore
=
useMemoStore
();
const
globalStore
=
useGlobalStore
();
const
user
=
userStore
.
state
.
user
as
User
;
const
user
=
userStore
.
state
.
user
as
User
;
const
{
systemStatus
}
=
globalStore
.
state
;
const
[
state
,
setState
]
=
useState
<
State
>
({
const
[
state
,
setState
]
=
useState
<
State
>
({
memoAmount
:
0
,
memoAmount
:
0
,
memoVisibility
:
propsMemo
.
visibility
,
memoVisibility
:
propsMemo
.
visibility
,
...
@@ -181,7 +179,7 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => {
...
@@ -181,7 +179,7 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => {
</
div
>
</
div
>
<
div
className=
"flex flex-row justify-between items-center w-full bg-gray-100 dark:bg-zinc-700 py-4 px-6"
>
<
div
className=
"flex flex-row justify-between items-center w-full bg-gray-100 dark:bg-zinc-700 py-4 px-6"
>
<
div
className=
"mr-2"
>
<
div
className=
"mr-2"
>
<
img
className=
"h-10 w-auto rounded-lg"
src=
{
`${
systemStatus.customizedProfile.logo
Url || "/logo.webp"}`
}
alt=
""
/>
<
img
className=
"h-10 w-auto rounded-lg"
src=
{
`${
user.avatar
Url || "/logo.webp"}`
}
alt=
""
/>
</
div
>
</
div
>
<
div
className=
"w-auto grow truncate flex mr-2 flex-col justify-center items-start"
>
<
div
className=
"w-auto grow truncate flex mr-2 flex-col justify-center items-start"
>
<
span
className=
"w-full text-sm truncate font-bold text-gray-600 dark:text-gray-300"
>
{
user
.
nickname
||
user
.
username
}
</
span
>
<
span
className=
"w-full text-sm truncate font-bold text-gray-600 dark:text-gray-300"
>
{
user
.
nickname
||
user
.
username
}
</
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