feat(video): enhance video management UI and functionality
- Refactor VideoBulkActions.vue to remove unused imports. - Update VideoFilters.vue to improve search and status filtering with new UI components from PrimeVue. - Modify VideoTable.vue to enhance action buttons for editing, copying, and deleting videos, using PrimeVue Button components. - Implement saveImageFromStream function in merge.ts to handle thumbnail image uploads. - Add new animation rule for card spring effect in uno.config.ts. - Create FileUploadType.vue icon component for local and remote file uploads. - Introduce CopyVideoModal.vue for sharing video links with enhanced user experience. - Add DetailVideoModal.vue for editing video details with form validation using Zod. - Establish new display routes in display.ts for handling thumbnail and metadata updates.
This commit is contained in:
23
src/server/routes/display.ts
Normal file
23
src/server/routes/display.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { Hono } from 'hono';
|
||||
import { saveImageFromStream } from '../modules/merge';
|
||||
|
||||
export function registerDisplayRoutes(app: Hono) {
|
||||
// app.get('/manifest/:id', async (c) => {
|
||||
// const manifest = await getListFiles();
|
||||
// if (!manifest) {
|
||||
// return c.json({ error: "Manifest not found" }, 404);
|
||||
// }
|
||||
// return c.json(manifest);
|
||||
// });
|
||||
app.put('/display/:id/thumbnail', async (c) => {
|
||||
const arrayBuffer = await c.req.arrayBuffer();
|
||||
await saveImageFromStream(arrayBuffer, crypto.randomUUID());
|
||||
return c.body('ok');
|
||||
// nhận rawData, lưu vào storage, cập nhật url thumbnail vào database
|
||||
|
||||
});
|
||||
app.put('/display/:id/metadata', async (c) => {
|
||||
|
||||
});
|
||||
app.post('/display/:id/subs', async (c) => {});
|
||||
}
|
||||
Reference in New Issue
Block a user