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
a76f7621
Commit
a76f7621
authored
Oct 21, 2023
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update memo share dialog
parent
2c2955a2
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
331 additions
and
330 deletions
+331
-330
package.json
web/package.json
+15
-16
pnpm-lock.yaml
web/pnpm-lock.yaml
+307
-302
ShareMemoDialog.tsx
web/src/components/ShareMemoDialog.tsx
+9
-12
No files found.
web/package.json
View file @
a76f7621
...
...
@@ -26,15 +26,14 @@
"lodash-es"
:
"^4.17.21"
,
"long"
:
"^5.2.3"
,
"lucide-react"
:
"^0.263.1"
,
"nice-grpc-web"
:
"^3.3.
1
"
,
"nice-grpc-web"
:
"^3.3.
2
"
,
"protobufjs"
:
"^7.2.5"
,
"qrcode.react"
:
"^3.1.0"
,
"react"
:
"^18.2.0"
,
"react-dom"
:
"^18.2.0"
,
"react-hot-toast"
:
"^2.4.1"
,
"react-i18next"
:
"^11.18.6"
,
"react-redux"
:
"^8.1.3"
,
"react-router-dom"
:
"^6.1
6
.0"
,
"react-router-dom"
:
"^6.1
7
.0"
,
"react-use"
:
"^17.4.0"
,
"semver"
:
"^7.5.4"
,
"tailwindcss"
:
"^3.3.3"
,
...
...
@@ -43,30 +42,30 @@
"zustand"
:
"4.4.1"
},
"devDependencies"
:
{
"@bufbuild/buf"
:
"^1.27.
0
"
,
"@bufbuild/buf"
:
"^1.27.
1
"
,
"@trivago/prettier-plugin-sort-imports"
:
"^3.4.0"
,
"@types/katex"
:
"^0.16.
3
"
,
"@types/lodash-es"
:
"^4.17.
9
"
,
"@types/node"
:
"^18.18.
5
"
,
"@types/qs"
:
"^6.9.
8
"
,
"@types/react"
:
"^18.2.
28
"
,
"@types/react-dom"
:
"^18.2.1
3
"
,
"@types/semver"
:
"^7.5.
3
"
,
"@types/textarea-caret"
:
"^3.0.
1
"
,
"@types/uuid"
:
"^9.0.
5
"
,
"@types/katex"
:
"^0.16.
5
"
,
"@types/lodash-es"
:
"^4.17.
10
"
,
"@types/node"
:
"^18.18.
6
"
,
"@types/qs"
:
"^6.9.
9
"
,
"@types/react"
:
"^18.2.
31
"
,
"@types/react-dom"
:
"^18.2.1
4
"
,
"@types/semver"
:
"^7.5.
4
"
,
"@types/textarea-caret"
:
"^3.0.
2
"
,
"@types/uuid"
:
"^9.0.
6
"
,
"@typescript-eslint/eslint-plugin"
:
"^5.62.0"
,
"@typescript-eslint/parser"
:
"^5.62.0"
,
"@vitejs/plugin-react-swc"
:
"^3.4.0"
,
"autoprefixer"
:
"^10.4.16"
,
"eslint"
:
"^8.5
1
.0"
,
"eslint"
:
"^8.5
2
.0"
,
"eslint-config-prettier"
:
"^8.10.0"
,
"eslint-plugin-prettier"
:
"^4.2.1"
,
"eslint-plugin-react"
:
"^7.33.2"
,
"less"
:
"^4.2.0"
,
"postcss"
:
"^8.4.31"
,
"prettier"
:
"2.6.2"
,
"terser"
:
"^5.2
1
.0"
,
"terser"
:
"^5.2
2
.0"
,
"typescript"
:
"^5.2.2"
,
"vite"
:
"^4.
4.11
"
"vite"
:
"^4.
5.0
"
}
}
web/pnpm-lock.yaml
View file @
a76f7621
This diff is collapsed.
Click to expand it.
web/src/components/ShareMemoDialog.tsx
View file @
a76f7621
import
{
Button
}
from
"@mui/joy"
;
import
copy
from
"copy-to-clipboard"
;
import
{
QRCodeSVG
}
from
"qrcode.react"
;
import
React
,
{
useEffect
,
useRef
}
from
"react"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
getDateTimeString
}
from
"@/helpers/datetime"
;
...
...
@@ -106,7 +105,7 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => {
{
t
(
"common.link"
)
}
</
Button
>
</
div
>
<
div
className=
"w-full
rounded-lg border-t
overflow-clip"
>
<
div
className=
"w-full
border-t dark:border-zinc-700
overflow-clip"
>
<
div
className=
"w-full h-auto select-none relative flex flex-col justify-start items-start bg-white dark:bg-zinc-800"
ref=
{
memoElRef
}
...
...
@@ -117,17 +116,15 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => {
<
MemoResourceListView
className=
"!grid-cols-2"
resourceList=
{
memo
.
resourceList
}
/>
</
div
>
<
div
className=
"flex flex-row justify-between items-center w-full bg-gray-100 dark:bg-zinc-700 py-4 px-6"
>
<
UserAvatar
className=
"mr-2"
avatarUrl=
{
user
.
avatarUrl
}
/>
<
div
className=
"w-auto grow truncate flex mr-2 flex-col justify-center items-start"
>
<
span
className=
"w-full text truncate font-medium text-gray-600 dark:text-gray-300"
>
{
user
.
nickname
||
user
.
username
}
</
span
>
<
div
className=
"flex flex-row justify-start items-center"
>
<
UserAvatar
className=
"mr-2"
avatarUrl=
{
user
.
avatarUrl
}
/>
<
div
className=
"w-auto grow truncate flex mr-2 flex-col justify-center items-start"
>
<
span
className=
"w-full text truncate font-medium text-gray-600 dark:text-gray-300"
>
{
user
.
nickname
||
user
.
username
}
</
span
>
</
div
>
</
div
>
<
QRCodeSVG
value=
{
`${window.location.origin}/m/${memo.id}`
}
size=
{
28
}
bgColor=
{
"#F3F4F6"
}
fgColor=
{
"#4B5563"
}
includeMargin=
{
false
}
/>
<
span
className=
"text-gray-500 dark:text-gray-400"
>
via memos
</
span
>
</
div
>
</
div
>
</
div
>
...
...
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