Compare commits

...

15 Commits

Author SHA1 Message Date
pierrbt
36fa76563e Add clickable link to reverse share's shares 2023-06-29 20:07:00 +02:00
pierrbt
f96ac5e4ba Merge branch 'stonith404:main' into main 2023-06-29 19:38:58 +02:00
pierrbt
bbbf10d233 Merge branch 'stonith404:main' into main 2023-06-23 21:09:24 +02:00
pierrbt
e9d1a9abb6 Remove useless import 2023-06-23 16:23:32 +02:00
pierrbt
8fdba0ca7c Run format 2023-06-23 16:22:57 +02:00
pierrbt
e5718700bc Set only a single click on the text, to avoid multiple notifications if the user wants to select it 2023-06-23 16:21:53 +02:00
pierrbt
e40a0c844c Creating CopyTextField component and adding it to showCompletedUpload and Shaere Modal 2023-06-23 16:14:52 +02:00
pierrbt
e647746c93 Update frontend/src/components/upload/modals/showCompletedUploadModal.tsx
Co-authored-by: Elias Schneider <login@eliasschneider.com>
2023-06-23 15:53:50 +02:00
pierrbt
9be77826e9 Formatting 2023-06-23 01:39:22 +02:00
pierrbt
a9bb05c4da Last updated 2023-06-23 00:05:53 +02:00
pierrbt
e1a9f2a27c Remove useless import 2023-06-22 23:18:09 +02:00
pierrbt
ba62c13cfa Removing the textClicked, because it was only source of disturbance 2023-06-22 23:17:50 +02:00
pierrbt
3de744d5e9 Adding a check when link is clicked, and now also on the text 2023-06-22 23:16:45 +02:00
pierrbt
61608cfe2d Adding LinkClicked to the copy button 2023-06-22 22:40:43 +02:00
pierrbt
db755ef300 Adding copy to keyboard when clicking the link 2023-06-22 22:36:56 +02:00

View File

@@ -1,6 +1,7 @@
import { import {
Accordion, Accordion,
ActionIcon, ActionIcon,
Anchor,
Box, Box,
Button, Button,
Center, Center,
@@ -34,6 +35,8 @@ const MyShares = () => {
const [reverseShares, setReverseShares] = useState<MyReverseShare[]>(); const [reverseShares, setReverseShares] = useState<MyReverseShare[]>();
const appUrl = config.get("general.appUrl");
const getReverseShares = () => { const getReverseShares = () => {
shareService shareService
.getMyReverseShares() .getMyReverseShares()
@@ -119,9 +122,11 @@ const MyShares = () => {
<Accordion.Panel> <Accordion.Panel>
{reverseShare.shares.map((share) => ( {reverseShare.shares.map((share) => (
<Group key={share.id} mb={4}> <Group key={share.id} mb={4}>
<Text maw={120} truncate> <Anchor href={`${appUrl}/share/${share.id}`}>
{share.id} <Text maw={120} truncate>
</Text> {share.id}
</Text>
</Anchor>
<ActionIcon <ActionIcon
color="victoria" color="victoria"
variant="light" variant="light"
@@ -129,9 +134,7 @@ const MyShares = () => {
onClick={() => { onClick={() => {
if (window.isSecureContext) { if (window.isSecureContext) {
clipboard.copy( clipboard.copy(
`${config.get( `${appUrl}/share/${share.id}`
"general.appUrl"
)}/share/${share.id}`
); );
toast.success( toast.success(
"The share link was copied to the keyboard." "The share link was copied to the keyboard."