-
-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: set link default value to random (#192)
* fix: set link default value to random * fix: add auto EOL and add conventional-changelog package * feat: Adding reverse shares' shares a clickable link (#178) * Add clickable link to reverse share's shares * Ran format * Apply suggestions from code review * fix: set link default value to random (#181) * fix: set link default value to random * fix: add auto EOL and add conventional-changelog package * Apply suggestions from code review --------- Co-authored-by: Elias Schneider <[email protected]> * feat: Adding reverse share ability to copy the link (#179) --------- Co-authored-by: Elias Schneider <[email protected]>
- Loading branch information
1 parent
adf0f8d
commit a1ea7c0
Showing
12 changed files
with
92 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
export const DATA_DIRECTORY = process.env.DATA_DIRECTORY || "./data"; | ||
export const SHARE_DIRECTORY = `${DATA_DIRECTORY}/uploads/shares` | ||
export const DATABASE_URL = process.env.DATABASE_URL || "file:../data/pingvin-share.db?connection_limit=1"; | ||
export const CLAMAV_HOST = process.env.CLAMAV_HOST || (process.env.NODE_ENV == "docker" ? "clamav" : "127.0.0.1"); | ||
export const CLAMAV_PORT = parseInt(process.env.CLAMAV_PORT) || 3310; | ||
export const SHARE_DIRECTORY = `${DATA_DIRECTORY}/uploads/shares`; | ||
export const DATABASE_URL = | ||
process.env.DATABASE_URL || | ||
"file:../data/pingvin-share.db?connection_limit=1"; | ||
export const CLAMAV_HOST = | ||
process.env.CLAMAV_HOST || | ||
(process.env.NODE_ENV == "docker" ? "clamav" : "127.0.0.1"); | ||
export const CLAMAV_PORT = parseInt(process.env.CLAMAV_PORT) || 3310; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
frontend/src/components/account/showReverseShareLinkModal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Stack, TextInput } from "@mantine/core"; | ||
import { ModalsContextProps } from "@mantine/modals/lib/context"; | ||
|
||
const showReverseShareLinkModal = ( | ||
modals: ModalsContextProps, | ||
reverseShareToken: string, | ||
appUrl: string | ||
) => { | ||
const link = `${appUrl}/upload/${reverseShareToken}`; | ||
return modals.openModal({ | ||
title: "Reverse share link", | ||
children: ( | ||
<Stack align="stretch"> | ||
<TextInput variant="filled" value={link} /> | ||
</Stack> | ||
), | ||
}); | ||
}; | ||
|
||
export default showReverseShareLinkModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters