-
+
A self-hosted file hosting service based on Zipline with many features.
-![Build stable](https://img.shields.io/github/workflow/status/AlphaNecron/Draconic/CI:%20Build/v0?color=%2368D391&label=stable&logo=github&style=for-the-badge)
-![Build stable](https://img.shields.io/github/workflow/status/AlphaNecron/Draconic/CI:%20Build/dev?color=%2368D391&label=dev&logo=github&style=for-the-badge)
-![Stars](https://img.shields.io/github/stars/AlphaNecron/Draconic?color=%23B794F4&logo=github&style=for-the-badge)
-![Version](https://img.shields.io/github/package-json/v/AlphaNecron/Draconic/v0?color=%23B794F4&label=latest&logo=react&logoColor=ffffff&style=for-the-badge)
-![Last commit](https://img.shields.io/github/last-commit/AlphaNecron/Draconic/dev?color=%234FD1C5&logo=github&style=for-the-badge)
+![Build stable](https://img.shields.io/github/workflow/status/AlphaNecron/Void/CI:%20Build/v0?color=%2368D391&label=stable&logo=github&style=for-the-badge)
+![Build stable](https://img.shields.io/github/workflow/status/AlphaNecron/Void/CI:%20Build/dev?color=%2368D391&label=dev&logo=github&style=for-the-badge)
+![Stars](https://img.shields.io/github/stars/AlphaNecron/Void?color=%23B794F4&logo=github&style=for-the-badge)
+![Version](https://img.shields.io/github/package-json/v/AlphaNecron/Void/v0?color=%23B794F4&label=latest&logo=react&logoColor=ffffff&style=for-the-badge)
+![Last commit](https://img.shields.io/github/last-commit/AlphaNecron/Void/dev?color=%234FD1C5&logo=github&style=for-the-badge)
### Requirements
@@ -16,8 +16,8 @@ A self-hosted file hosting service based on Zipline with many features.
### Installation / Deployment
```sh
- git clone https://github.com/AlphaNecron/Draconic.git
- cd Draconic
+ git clone https://github.com/AlphaNecron/Void.git
+ cd Void
yarn install # or npm install
cp config.example.toml config.toml
nano config.toml # edit the config file
@@ -50,8 +50,8 @@ A self-hosted file hosting service based on Zipline with many features.
[core]
secure = false # Whether to use https or not
secret = 'supersecretpassphrase' # The secret used to sign cookie
- host = '0.0.0.0' # The host Draconic should run on
- port = 3000 # The port Draconic should run on
+ host = '0.0.0.0' # The host Void should run on
+ port = 3000 # The port Void should run on
database_url = 'postgres://username:password@localhost:5432/db_name' # PostgreSQL database url
[bot]
diff --git a/server/index.js b/server/index.js
index a9c7959..6625b95 100644
--- a/server/index.js
+++ b/server/index.js
@@ -11,7 +11,7 @@ const mimes = require('../src/lib/mimetype');
const deployDb = require('../scripts/deployDb');
const { join } = require('path');
-info('SERVER', 'Starting Draconic server');
+info('SERVER', 'Starting Void server');
const dev = process.env.NODE_ENV === 'development';
diff --git a/src/components/ShareXDialog.tsx b/src/components/ShareXDialog.tsx
index d448427..d36d862 100644
--- a/src/components/ShareXDialog.tsx
+++ b/src/components/ShareXDialog.tsx
@@ -4,7 +4,7 @@ import { Download, X } from 'react-feather';
export default function ShareXDialog({ open, onClose, token }) {
const ref = React.useRef();
- const [name, setName] = useState('Draconic');
+ const [name, setName] = useState('Void');
const [generator, setGenerator] = useState('random');
const [preserveFileName, setPreserveFileName] = useState(false);
const generateConfig = shortener => {
@@ -64,7 +64,7 @@ export default function ShareXDialog({ open, onClose, token }) {
setName(n.target.value)}
- placeholder='Draconic'
+ placeholder='Void'
size='sm'
/>
URL generator
diff --git a/src/components/pages/Upload.tsx b/src/components/pages/Upload.tsx
index aea9152..66cb2d6 100644
--- a/src/components/pages/Upload.tsx
+++ b/src/components/pages/Upload.tsx
@@ -1,4 +1,4 @@
-import { Box, Button, Checkbox, Flex, Heading, HStack, Select, Text, useColorModeValue, useToast, VStack } from '@chakra-ui/react';
+import { Button, Center, Checkbox, Heading, HStack, Select, Text, useColorModeValue, useToast, VStack } from '@chakra-ui/react';
import copy from 'copy-to-clipboard';
import { useStoreSelector } from 'lib/redux/store';
import React, { useState } from 'react';
@@ -55,48 +55,42 @@ export default function Upload() {
const bg = useColorModeValue('gray.100', 'gray.700');
const shadow = useColorModeValue('outline', 'dark-lg');
return (
-
-
+
-
- Upload a file
-
-
- setPreserve(p.target.checked)}>Preserve filename
-
-
-
-
-
-
+ shadow={shadow}>
+ Upload a file
+
+
+ setPreserve(p.target.checked)}>Preserve filename
+
+
+
+
+
);
}
\ No newline at end of file
diff --git a/src/lib/middleware/withDraconic.ts b/src/lib/middleware/withVoid.ts
similarity index 96%
rename from src/lib/middleware/withDraconic.ts
rename to src/lib/middleware/withVoid.ts
index 3b3714d..d0e0006 100644
--- a/src/lib/middleware/withDraconic.ts
+++ b/src/lib/middleware/withVoid.ts
@@ -40,7 +40,7 @@ export type NextApiRes = NextApiResponse & {
setCookie: (name: string, value: unknown, options: CookieSerializeOptions) => void;
}
-export const withDraconic = (handler: (req: NextApiRequest, res: NextApiResponse) => unknown) => (req: NextApiReq, res: NextApiRes) => {
+export const withVoid = (handler: (req: NextApiRequest, res: NextApiResponse) => unknown) => (req: NextApiReq, res: NextApiRes) => {
res.error = (message: string) => {
res.setHeader('Content-Type', 'application/json');
res.status(400);
diff --git a/src/pages/[...id].tsx b/src/pages/[...id].tsx
index e767aaa..f65df20 100644
--- a/src/pages/[...id].tsx
+++ b/src/pages/[...id].tsx
@@ -17,24 +17,15 @@ export default function Embed({ file, embed, username, content = undefined, misc
a.href = misc.src;
a.click();
};
- const replace = text => {
- const time = new Date(file.uploadedAt);
- return (text ?? '').replace(/{size}/ig, misc.size)
- .replace(/{filename}/ig, file.fileName)
- .replace(/{orig}/ig, file.origFileName)
- .replace(/{date}/ig, time.toLocaleDateString())
- .replace(/{time}/ig, time.toLocaleTimeString())
- .replace(/{author}/ig, username);
- };
return (
<>
<>
{embed.enabled && (
<>
-
-
-
+
+
+
>
)}
@@ -58,11 +49,10 @@ export default function Embed({ file, embed, username, content = undefined, misc
Uploaded by {username}
>
-