From 44b127b364e4a00c5d0d3ea306d6e395ca8b300f Mon Sep 17 00:00:00 2001 From: achille Date: Tue, 15 Oct 2024 22:07:50 +0700 Subject: [PATCH 01/26] fix:#637 - merge develop --- src/components/Advertiser/AdvertiserTable.vue | 150 +++++++++++------- src/stores/wallet.js | 22 ++- 2 files changed, 116 insertions(+), 56 deletions(-) diff --git a/src/components/Advertiser/AdvertiserTable.vue b/src/components/Advertiser/AdvertiserTable.vue index f365b4b1..d5876198 100644 --- a/src/components/Advertiser/AdvertiserTable.vue +++ b/src/components/Advertiser/AdvertiserTable.vue @@ -38,7 +38,12 @@ +
+

or

+ +
@@ -126,6 +130,19 @@ + + + + + + + + + + + + + diff --git a/src/components/Admin/PromptCard.vue b/src/components/Admin/PromptCard.vue index 82a78cf7..18981889 100644 --- a/src/components/Admin/PromptCard.vue +++ b/src/components/Admin/PromptCard.vue @@ -101,7 +101,7 @@ counter data-test="file-image" :hint="!prompt.image ? '*Image is required. Max size is 2MB.' : ''" - label="Image" + label="Chose File" :max-total-size="2097152" :required="!id" use-chips @@ -113,6 +113,11 @@ + +
+

or

+ +
+ + + + + + + + + + + + + diff --git a/src/components/shared/CameraCapture.vue b/src/components/shared/CameraCapture.vue new file mode 100644 index 00000000..e9ad53d6 --- /dev/null +++ b/src/components/shared/CameraCapture.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/src/utils/media.js b/src/utils/media.js new file mode 100644 index 00000000..3d07e5ae --- /dev/null +++ b/src/utils/media.js @@ -0,0 +1,21 @@ +export async function requestAndGetUserMedia( + permissions = { + video: true + } +) { + const result = { + success: false, + stream: null, + error: false + } + + try { + const stream = await navigator.mediaDevices.getUserMedia(permissions) + result.success = true + result.stream = stream + } catch (err) { + result.error = err + } finally { + return result + } +} From ac7b556ab85aa2b5038ee1d1254a4f2a2c0a29eb Mon Sep 17 00:00:00 2001 From: Sana Yasmin Date: Wed, 25 Sep 2024 15:34:59 +0530 Subject: [PATCH 11/26] 557-feat-camera-update --- src/components/Admin/EntryCard.vue | 64 +++++++++++++------------ src/components/Admin/PromptCard.vue | 52 +++++++++----------- src/components/shared/CameraCapture.vue | 39 +++++++++------ 3 files changed, 80 insertions(+), 75 deletions(-) diff --git a/src/components/Admin/EntryCard.vue b/src/components/Admin/EntryCard.vue index 03eb0911..ec47da56 100644 --- a/src/components/Admin/EntryCard.vue +++ b/src/components/Admin/EntryCard.vue @@ -76,27 +76,38 @@ /> - - - -
-

or

- + +
+
+ + + +
+

OR

+
@@ -131,16 +142,7 @@ - - - - - - - - - - + diff --git a/src/components/Admin/PromptCard.vue b/src/components/Admin/PromptCard.vue index 18981889..28dd379e 100644 --- a/src/components/Admin/PromptCard.vue +++ b/src/components/Admin/PromptCard.vue @@ -96,28 +96,31 @@ /> - - - -
-

or

+
+
+ + + +
+

or

+ - - - - - - - - - - + diff --git a/src/components/shared/CameraCapture.vue b/src/components/shared/CameraCapture.vue index e9ad53d6..f51bbb9c 100644 --- a/src/components/shared/CameraCapture.vue +++ b/src/components/shared/CameraCapture.vue @@ -1,19 +1,28 @@