Merge pull request 'Added logic to show captured image' (#199) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled

Reviewed-on: #199
This commit was merged in pull request #199.
This commit is contained in:
2026-05-25 10:26:01 +00:00

View File

@@ -3,6 +3,7 @@
cameraActive: false,
captured: false,
errorMessage: '',
photoData: '',
async startCamera() {
this.errorMessage = '';
@@ -38,6 +39,7 @@
}
this.cameraActive = false;
this.captured = true;
this.photoData = photoData;
// Send photo data to PHP via Livewire
$wire.setPhoto(photoData);
@@ -45,6 +47,7 @@
retake() {
this.captured = false;
this.photoData = '';
$wire.clearPhoto();
this.$nextTick(() => this.startCamera());
}
@@ -84,7 +87,8 @@
{{-- ── Captured photo preview (shown after capture) ── --}}
<div x-show="captured" style="position: relative;">
<img
x-bind:src="$refs.canvas ? $refs.canvas.toDataURL('image/jpeg') : ''"
{{-- x-bind:src="$refs.canvas ? $refs.canvas.toDataURL('image/jpeg') : ''" --}}
x-bind:src="photoData"
style="
width: 100%;
max-width: 480px;