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
1bad0543
Unverified
Commit
1bad0543
authored
Jan 30, 2024
by
Brilliant Hanabi
Committed by
GitHub
Jan 30, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add notice when sharing private links (#2809)
Co-authored-by:
boojack
<
stevenlgtm@gmail.com
>
parent
73337331
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
2 deletions
+9
-2
ShareMemoDialog.tsx
web/src/components/ShareMemoDialog.tsx
+6
-2
en.json
web/src/locales/en.json
+1
-0
zh-Hans.json
web/src/locales/zh-Hans.json
+1
-0
zh-Hant.json
web/src/locales/zh-Hant.json
+1
-0
No files found.
web/src/components/ShareMemoDialog.tsx
View file @
1bad0543
...
...
@@ -7,7 +7,7 @@ import { downloadFileFromUrl } from "@/helpers/utils";
import
useLoading
from
"@/hooks/useLoading"
;
import
toImage
from
"@/labs/html2image"
;
import
{
useUserStore
,
extractUsernameFromName
}
from
"@/store/v1"
;
import
{
Memo
}
from
"@/types/proto/api/v2/memo_service"
;
import
{
Memo
,
Visibility
}
from
"@/types/proto/api/v2/memo_service"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
generateDialog
}
from
"./Dialog"
;
import
Icon
from
"./Icon"
;
...
...
@@ -68,7 +68,11 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => {
const
handleCopyLinkBtnClick
=
()
=>
{
copy
(
`
${
window
.
location
.
origin
}
/m/
${
memo
.
name
}
`
);
toast
.
success
(
t
(
"message.succeed-copy-link"
));
if
(
memo
.
visibility
!==
Visibility
.
PUBLIC
)
{
toast
.
success
(
t
(
"message.succeed-copy-link-not-public"
));
}
else
{
toast
.
success
(
t
(
"message.succeed-copy-link"
));
}
};
if
(
loadingState
.
isLoading
)
{
...
...
web/src/locales/en.json
View file @
1bad0543
...
...
@@ -352,6 +352,7 @@
"private-only"
:
"This memo is set to private."
,
"copied"
:
"Copied"
,
"succeed-copy-content"
:
"Content copied successfully."
,
"succeed-copy-link-not-public"
:
"Content copied successfully. This memo is not accessible without logging in."
,
"succeed-copy-code"
:
"Code copied successfully."
,
"succeed-copy-link"
:
"Link copied successfully."
,
"change-resource-filename"
:
"Change resource filename"
,
...
...
web/src/locales/zh-Hans.json
View file @
1bad0543
...
...
@@ -175,6 +175,7 @@
"succeed-copy-code"
:
"复制代码到剪贴板成功。"
,
"succeed-copy-content"
:
"复制内容到剪贴板成功。"
,
"succeed-copy-link"
:
"复制链接到剪贴板成功。"
,
"succeed-copy-link-not-public"
:
"复制链接到剪贴板成功,请注意本条备忘录在未登录情况下不可访问。"
,
"succeed-copy-resource-link"
:
"复制资源链接到剪贴板成功。"
,
"succeed-update-additional-script"
:
"更新附加脚本成功。"
,
"succeed-update-additional-style"
:
"更新附加样式成功。"
,
...
...
web/src/locales/zh-Hant.json
View file @
1bad0543
...
...
@@ -177,6 +177,7 @@
"succeed-copy-code"
:
"複製程式碼到剪貼簿成功。"
,
"succeed-copy-content"
:
"複製內容到剪貼簿成功。"
,
"succeed-copy-link"
:
"複製連結到剪貼簿成功。"
,
"succeed-copy-link-not-public"
:
"複製連結到剪貼簿成功,請注意本條備忘錄在未登入情況下無法瀏覽。"
,
"succeed-copy-resource-link"
:
"複製資源連結到剪貼簿成功。"
,
"succeed-update-additional-script"
:
"更新附加腳本成功。"
,
"succeed-update-additional-style"
:
"更新附加樣式成功。"
,
...
...
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