diff --git a/resources/views/livewire/project/application/deployment/show.blade.php b/resources/views/livewire/project/application/deployment/show.blade.php index 4c1a2f08a..bbafdd24b 100644 --- a/resources/views/livewire/project/application/deployment/show.blade.php +++ b/resources/views/livewire/project/application/deployment/show.blade.php @@ -186,8 +186,15 @@ copyLogs() { const content = this.collectVisibleLogs(); if (!content) return; - navigator.clipboard.writeText(content); - Livewire.dispatch('success', ['Logs copied to clipboard.']); + if (!navigator.clipboard?.writeText) { + Livewire.dispatch('error', ['Clipboard is not available. Please use HTTPS or localhost.']); + return; + } + navigator.clipboard?.writeText(content).then(() => { + Livewire.dispatch('success', ['Logs copied to clipboard.']); + }).catch(() => { + Livewire.dispatch('error', ['Failed to copy logs to clipboard.']); + }); }, downloadLogs() { const content = this.collectVisibleLogs(); diff --git a/resources/views/livewire/project/shared/get-logs.blade.php b/resources/views/livewire/project/shared/get-logs.blade.php index 2140e7d2c..f74ab6dc5 100644 --- a/resources/views/livewire/project/shared/get-logs.blade.php +++ b/resources/views/livewire/project/shared/get-logs.blade.php @@ -346,8 +346,17 @@