fixed for push
This commit is contained in:
parent
623b796cae
commit
07d5e81a27
|
|
@ -29,6 +29,7 @@ public function __construct($projectDownload)
|
|||
*/
|
||||
public function broadcastOn(): Channel
|
||||
{
|
||||
logger('broadcastOn', ['download.'.$this->projectDownload->id]);
|
||||
return new PrivateChannel('download.'.$this->projectDownload->id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,17 +24,16 @@
|
|||
"guzzlehttp/guzzle": "^7.2",
|
||||
"laravel/framework": "^v11.0.7",
|
||||
"laravel/jetstream": "^5.0",
|
||||
"laravel/reverb": "@beta",
|
||||
"laravel/sanctum": "^4.0",
|
||||
"laravel/telescope": "^5.0",
|
||||
"laravel/tinker": "^2.9",
|
||||
"leaflet/leaflet": "^1.9.0",
|
||||
"livewire/livewire": "^3.0",
|
||||
"maatwebsite/excel": "^3.1",
|
||||
"plesk/ext-laravel-integration": "^7.0"
|
||||
"plesk/ext-laravel-integration": "^7.0",
|
||||
"pusher/pusher-php-server": "^7.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"barryvdh/laravel-debugbar": "*",
|
||||
"fakerphp/faker": "^1.23",
|
||||
"laravel/pint": "^1.13",
|
||||
"laravel/sail": "^1.26",
|
||||
|
|
|
|||
990
laravel_app/composer.lock
generated
990
laravel_app/composer.lock
generated
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
|
@ -57,7 +57,7 @@
|
|||
"dynamicImports": [
|
||||
"resources/js/alpine.js"
|
||||
],
|
||||
"file": "assets/app-433c17dc.js",
|
||||
"file": "assets/app-bd281b58.js",
|
||||
"isEntry": true,
|
||||
"src": "resources/js/app.js"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@ import Pusher from 'pusher-js';
|
|||
window.Pusher = Pusher;
|
||||
|
||||
window.Echo = new Echo({
|
||||
broadcaster: 'reverb',
|
||||
key: import.meta.env.VITE_REVERB_APP_KEY,
|
||||
wsHost: import.meta.env.VITE_REVERB_HOST,
|
||||
wsPort: import.meta.env.VITE_REVERB_PORT ?? 80,
|
||||
wssPort: import.meta.env.VITE_REVERB_PORT ?? 443,
|
||||
forceTLS: (import.meta.env.VITE_REVERB_SCHEME ?? 'https') === 'https',
|
||||
enabledTransports: ['ws'],//, 'wss'],
|
||||
broadcaster: 'pusher',
|
||||
key: import.meta.env.VITE_PUSHER_APP_KEY,
|
||||
// wsHost: import.meta.env.VITE_PUSHER_HOST,
|
||||
// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80,
|
||||
// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443,
|
||||
forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
|
||||
enabledTransports: ['ws', 'wss'],
|
||||
cluster:import.meta.env.VITE_PUSHER_APP_CLUSTER,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<span class="inline-flex items-center rounded-md {{ $colorClasses['bg'] }} px-1.5 py-0.5 text-xs font-medium {{ $colorClasses['text'] }}"
|
||||
@if($attributes['type'])
|
||||
x-init="Echo.private(`{{$attributes['type']}}.@js($id)`).listen('Project{{ucfirst($attributes['type'])}}Status', (e) => {
|
||||
x-init="Echo.channel(`{{$attributes['type']}}-@js($id)`).listen('Project{{ucfirst($attributes['type'])}}Status', (e) => {
|
||||
console.log(e.project{{ucfirst($attributes['type'])}}.status);
|
||||
$wire.dispatch('Badge:refresh');
|
||||
});"
|
||||
x-destroy="Echo.leaveChannel(`{{$attributes['type']}}.@js($id)`);"
|
||||
x-destroy="Echo.leaveChannel(`{{$attributes['type']}}-@js($id)`);"
|
||||
@endif
|
||||
>
|
||||
{{ $status }}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<span class="inline-flex items-center rounded-md {{ $this->getColorClasses() }} px-1.5 py-0.5 text-xs font-medium"
|
||||
@if($this->type)
|
||||
x-init="Echo.private(`{{$this->type}}.{{$this->id}}`).listen('Project{{ucfirst($this->type)}}Status', (e) => {
|
||||
console.log(e);
|
||||
if(e.project{{ucfirst($this->type)}}.status){
|
||||
$wire.setStatus(e.project{{ucfirst($this->type)}}.status);
|
||||
$wire.refreshPendingMessage();
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class="px-3 py-3.5 text-right pr-4 sm:pr-8 lg:pr-8 text-sm font-semibold text-gr
|
|||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
@foreach($downloads as $download)
|
||||
<tr>
|
||||
<tr wire:key="download-row-{{ $download->id }}">
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8">{{ $download->name }}</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||
{{ $download->path }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue