From 214beb1734df388252f0e39a280a3c83589bbb79 Mon Sep 17 00:00:00 2001 From: Timothy Koech Date: Fri, 13 Feb 2026 17:58:18 +0300 Subject: [PATCH 1/2] feat: enhance video field with metadata display and video title fetching --- .../fields/attachments/bunny-service.ts | 17 ++++++++ .../fields/attachments/video-meta.vue | 41 ++++++++++++++++++ .../fields/attachments/video-player.vue | 10 ++++- src/frontend/fields/video-field.vue | 42 ++++++++++++++++++- src/frontend/shared/icon.vue | 14 +++++++ 5 files changed, 120 insertions(+), 4 deletions(-) create mode 100644 src/frontend/fields/attachments/video-meta.vue diff --git a/src/frontend/fields/attachments/bunny-service.ts b/src/frontend/fields/attachments/bunny-service.ts index 9397f2d1..84edcb48 100644 --- a/src/frontend/fields/attachments/bunny-service.ts +++ b/src/frontend/fields/attachments/bunny-service.ts @@ -103,6 +103,23 @@ export default class BunnyService implements HostService { return { url: '' }; }; + public async fetchVideoTitle(videoId: string): Promise<{ title?: string }> { + const { default: axios } = await import('axios'); + + const response = await axios.get( + `${authority}/library/${this.libraryId}/videos/${videoId}`, + { + headers: { + AccessKey: this.accessKey, + }, + }, + ); + + return { + title: response.data.title, + }; + } + public get url(): string | null { return this.guid ? `https://${this.host}/${this.guid}/playlist.m3u8` : null; } diff --git a/src/frontend/fields/attachments/video-meta.vue b/src/frontend/fields/attachments/video-meta.vue new file mode 100644 index 00000000..8679b018 --- /dev/null +++ b/src/frontend/fields/attachments/video-meta.vue @@ -0,0 +1,41 @@ + + diff --git a/src/frontend/fields/attachments/video-player.vue b/src/frontend/fields/attachments/video-player.vue index 54ea7c4e..2d5ad9d7 100644 --- a/src/frontend/fields/attachments/video-player.vue +++ b/src/frontend/fields/attachments/video-player.vue @@ -1,6 +1,12 @@ diff --git a/src/frontend/fields/video-field.vue b/src/frontend/fields/video-field.vue index 6ec14eb2..03ea92c6 100644 --- a/src/frontend/fields/video-field.vue +++ b/src/frontend/fields/video-field.vue @@ -17,7 +17,14 @@ @attached="onAttached" @dropped="onDropped" > - +
+
+ +
+
+ +
+
@@ -27,7 +34,7 @@ diff --git a/src/frontend/shared/icon.vue b/src/frontend/shared/icon.vue index 33cb5a26..91997306 100644 --- a/src/frontend/shared/icon.vue +++ b/src/frontend/shared/icon.vue @@ -738,6 +738,20 @@ fill="#1D4ED8" /> + + + + Date: Mon, 16 Feb 2026 08:18:09 +0300 Subject: [PATCH 2/2] feat: update video field layout and enhance metadata display --- .../fields/attachments/video-meta.story.vue | 17 +++++++++++++++++ src/frontend/fields/attachments/video-meta.vue | 10 ++++++---- src/frontend/fields/video-field.vue | 12 ++++++------ 3 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 src/frontend/fields/attachments/video-meta.story.vue diff --git a/src/frontend/fields/attachments/video-meta.story.vue b/src/frontend/fields/attachments/video-meta.story.vue new file mode 100644 index 00000000..a2aea036 --- /dev/null +++ b/src/frontend/fields/attachments/video-meta.story.vue @@ -0,0 +1,17 @@ + + + diff --git a/src/frontend/fields/attachments/video-meta.vue b/src/frontend/fields/attachments/video-meta.vue index 8679b018..b02e762b 100644 --- a/src/frontend/fields/attachments/video-meta.vue +++ b/src/frontend/fields/attachments/video-meta.vue @@ -1,9 +1,11 @@
-
- +
+
+
{{ row.value }} diff --git a/src/frontend/fields/video-field.vue b/src/frontend/fields/video-field.vue index 03ea92c6..98c41fb4 100644 --- a/src/frontend/fields/video-field.vue +++ b/src/frontend/fields/video-field.vue @@ -17,13 +17,11 @@ @attached="onAttached" @dropped="onDropped" > -
-
+
+
-
- -
+
@@ -83,6 +81,8 @@ const onSuccess = (url: string) => { }); }; +const isStacked = computed(() => props.isNested === true); + const onError = (error: Error) => { console.log('error', error); feedback.value = error.message ?? 'Something went wrong'; @@ -149,7 +149,7 @@ const displayUrl = computed(() => { const videoTitle = ref(null); const metadataRows = computed(() => [ - { label: 'Filename', value: videoTitle.value ?? '—' }, + { label: 'Title', value: videoTitle.value ?? '—' }, { label: 'Video ID', value: videoId.value ?? '—' }, { label: 'URL', value: displayUrl.value }, ]);