diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 7742aba5..26ba0871 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -24,7 +24,7 @@ model User {
password String?
avatar String?
token String @unique
- role Role @default(USER)
+ role Role @default(USER)
files File[]
urls Url[]
diff --git a/src/components/pages/upload/UploadOptionsButton.tsx b/src/components/pages/upload/UploadOptionsButton.tsx
index 007c5e7e..9bbf9bb6 100644
--- a/src/components/pages/upload/UploadOptionsButton.tsx
+++ b/src/components/pages/upload/UploadOptionsButton.tsx
@@ -1,7 +1,8 @@
-import { useUploadOptionsStore } from '@/lib/store/uploadOptions';
+import { defaultUploadOptions, useUploadOptionsStore } from '@/lib/store/uploadOptions';
import {
Badge,
Button,
+ Center,
Group,
Modal,
NumberInput,
@@ -16,6 +17,7 @@ import {
import {
IconAlarmFilled,
IconArrowsMinimize,
+ IconDeviceFloppy,
IconEyeFilled,
IconFileInfo,
IconGlobe,
@@ -90,7 +92,16 @@ export default function UploadOptionsButton({ numFiles }: { numFiles: number })
disabled: true,
},
]}
- label='Deletes at'
+ label={
+ <>
+ Deletes at{' '}
+ {options.deletesAt ? (
+
+ saved
+
+ ) : null}
+ >
+ }
description='The file will automatically delete itself after this time.'
icon={}
value={options.deletesAt}
@@ -112,7 +123,16 @@ export default function UploadOptionsButton({ numFiles }: { numFiles: number })
{ value: 'name', label: 'Use file name' },
{ value: 'gfycat', label: 'Gfycat-style name' },
]}
- label='Name Format'
+ label={
+ <>
+ Name Format{' '}
+ {options.format ? (
+
+ saved
+
+ ) : null}
+ >
+ }
description='The file name format to use when upload this file, the "File name" field will override this value.'
icon={}
value={options.format}
@@ -126,7 +146,16 @@ export default function UploadOptionsButton({ numFiles }: { numFiles: number })
/>
+ Compression{' '}
+ {options.imageCompressionPercent ? (
+
+ saved
+
+ ) : null}
+ >
+ }
description='The compression level to use on image (only). Leave blank to disable compression.'
icon={}
max={100}
@@ -136,7 +165,16 @@ export default function UploadOptionsButton({ numFiles }: { numFiles: number })
/>
+ Max Views{' '}
+ {options.maxViews ? (
+
+ saved
+
+ ) : null}
+ >
+ }
description='The maximum number of views the files can have before they are deleted. Leave blank to allow as many views as you want.'
icon={}
min={0}
@@ -145,8 +183,17 @@ export default function UploadOptionsButton({ numFiles }: { numFiles: number })
/>
+ Override Domain{' '}
+ {options.overrides_returnDomain ? (
+
+ saved
+
+ ) : null}
+ >
+ }
+ description='Override the domain with this value. This will change the domain returned in your uploads. Leave blank to use the default domain.'
icon={}
value={options.overrides_returnDomain ?? ''}
onChange={(event) =>
@@ -189,7 +236,16 @@ export default function UploadOptionsButton({ numFiles }: { numFiles: number })
+ Add Original Name{' '}
+ {options.addOriginalName ? (
+
+ saved
+
+ ) : null}
+ >
+ }
description={`Add the original file name, so that the file can be downloaded with the original name. This will still use the "Name Format" option for it's file name.`}
checked={options.addOriginalName ?? false}
onChange={(event) => setOption('addOriginalName', event.currentTarget.checked ?? false)}