diff --git a/backend/prisma/seed/config.seed.ts b/backend/prisma/seed/config.seed.ts
index e5a1c42..c1e8634 100644
--- a/backend/prisma/seed/config.seed.ts
+++ b/backend/prisma/seed/config.seed.ts
@@ -380,6 +380,11 @@ export const configVariables = {
defaultValue: "",
secret: false,
},
+ companySharingPolicy: {
+ type: "text",
+ defaultValue: "",
+ secret: false,
+ },
},
} satisfies ConfigVariables;
diff --git a/config.example.yaml b/config.example.yaml
index 51d6a9b..14bb4d1 100644
--- a/config.example.yaml
+++ b/config.example.yaml
@@ -217,6 +217,8 @@ legal:
privacyPolicyText: ""
#If you already have a privacy policy page you can link it here instead of using the text field.
privacyPolicyUrl: ""
+ #The text which should be shown in the company sharing policy. Supports Markdown.
+ companySharingPolicy: ""
#This configuration is used to create the initial user when the application is started for the first time.
#Make sure to change at least the password as soon as you log in!
initUser:
diff --git a/frontend/src/components/upload/Dropzone.tsx b/frontend/src/components/upload/Dropzone.tsx
index 208a4f5..e273a4a 100644
--- a/frontend/src/components/upload/Dropzone.tsx
+++ b/frontend/src/components/upload/Dropzone.tsx
@@ -1,4 +1,5 @@
-import { Button, Center, createStyles, Group, Text } from "@mantine/core";
+import { Anchor, Button, Center, createStyles, Group, Paper, Text, useMantineTheme } from "@mantine/core";
+import Markdown from "markdown-to-jsx";
import { Dropzone as MantineDropzone } from "@mantine/dropzone";
import { ForwardedRef, useRef } from "react";
import { TbCloudUpload, TbUpload } from "react-icons/tb";
@@ -7,6 +8,7 @@ import useTranslate from "../../hooks/useTranslate.hook";
import { FileUpload } from "../../types/File.type";
import { byteToHumanSizeString } from "../../utils/fileSize.util";
import toast from "../../utils/toast.util";
+import useConfig from "../../hooks/config.hook";
const useStyles = createStyles((theme) => ({
wrapper: {
@@ -30,6 +32,22 @@ const useStyles = createStyles((theme) => ({
position: "absolute",
bottom: -20,
},
+
+ companysharingpolicy: {
+ marginTop: 50,
+ border: '1px dashed',
+ borderWidth: 1,
+ borderColor: theme.colorScheme === "dark"
+ ? '#373A40'
+ : '#ced4da',
+ borderRadius: 10,
+ backgroundColor: theme.colorScheme === "dark"
+ ? theme.colors.dark[4]
+ : theme.colors.gray[1],
+ fontSize: 'small',
+ textAlign: 'center',
+ padding: 20,
+ }
}));
const Dropzone = ({
@@ -44,6 +62,12 @@ const Dropzone = ({
onFilesChanged: (files: FileUpload[]) => void;
}) => {
const t = useTranslate();
+ const config = useConfig();
+ const { colorScheme } = useMantineTheme();
+ const hasCompanySharingPolicy = !!(
+ config.get("legal.companySharingPolicy")
+ );
+ const companySharingPolicy = config.get("legal.companySharingPolicy");
const { classes } = useStyles();
const openRef = useRef<() => void>();
@@ -88,6 +112,43 @@ const Dropzone = ({
values={{ maxSize: byteToHumanSizeString(maxShareSize) }}
/>
+ {hasCompanySharingPolicy && (
+