diff --git a/src/components/pages/Dashboard/index.tsx b/src/components/pages/Dashboard/index.tsx
index b182086..37f732d 100644
--- a/src/components/pages/Dashboard/index.tsx
+++ b/src/components/pages/Dashboard/index.tsx
@@ -35,14 +35,14 @@ export default function Dashboard({ disableMediaPreview, exifEnabled }) {
if (!res.error) {
updateImages();
showNotification({
- title: 'Image Deleted',
- message: '',
+ title: 'File Deleted',
+ message: `${original.name}`,
color: 'green',
icon: ,
});
} else {
showNotification({
- title: 'Failed to delete image',
+ title: 'Failed to Delete File',
message: res.error,
color: 'red',
icon: ,
@@ -54,7 +54,11 @@ export default function Dashboard({ disableMediaPreview, exifEnabled }) {
clipboard.copy(`${window.location.protocol}//${window.location.host}${original.url}`);
showNotification({
title: 'Copied to clipboard',
- message: '',
+ message: (
+ {`${window.location.protocol}//${window.location.host}${original.url}`}
+ ),
icon: ,
});
};
diff --git a/src/server/index.ts b/src/server/index.ts
index 5c267e1..f4f384d 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -1,5 +1,6 @@
import { Image, PrismaClient } from '@prisma/client';
import Router from 'find-my-way';
+import { createReadStream, existsSync } from 'fs';
import { mkdir } from 'fs/promises';
import { createServer, IncomingMessage, OutgoingMessage, ServerResponse } from 'http';
import next from 'next';
@@ -84,6 +85,15 @@ async function start() {
},
});
+ router.on('GET', '/favicon.ico', async (req, res) => {
+ if (!existsSync('./public/favicon.ico')) return nextServer.render404(req, res);
+
+ const favicon = createReadStream('./public/favicon.ico');
+ res.setHeader('Content-Type', 'image/x-icon');
+
+ favicon.pipe(res);
+ });
+
router.on('GET', `${config.urls.route}/:id`, async (req, res, params) => {
if (params.id === '') return nextServer.render404(req, res as ServerResponse);