Skip to content

Commit

Permalink
Merge pull request rrze-mmz#157 from rrze-mmz/152-update-translations…
Browse files Browse the repository at this point in the history
…-for-backend

Finish series backend translation
  • Loading branch information
stefanosgeo authored Sep 27, 2024
2 parents ad8b4ed + dae070a commit 6b3752c
Show file tree
Hide file tree
Showing 50 changed files with 860 additions and 549 deletions.
7 changes: 4 additions & 3 deletions app/Livewire/SubscribeSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ public function mount(): void
if (session()->has('redirect_back_to_subscribe')) {
$this->subscribe();
}

$this->isUserSubscribed = $this->user->subscriptions()->where('series_id', $this->series->id)->exists();
$this->formAction = ($this->isUserSubscribed) ? 'unsubscribe' : 'subscribe';
$this->btnText = ($this->isUserSubscribed) ? 'Unsubscribe' : 'Subscribe';
$this->btnText = ($this->isUserSubscribed) ? __('common.unsubscribe') : __('common.subscribe');
}

/**
Expand All @@ -46,7 +47,7 @@ public function subscribe()
$this->user->subscriptions()->attach($this->series);
$this->isUserSubscribed = true;
$this->formAction = 'unsubscribe';
$this->btnText = 'unsubscribe';
$this->btnText = __('common.unsubscribe');
session()->remove('redirect_back_to_subscribe');
$this->user->notify((new UserSubscribed($this->series))->delay($delay));
}
Expand All @@ -59,7 +60,7 @@ public function unsubscribe()
$this->user->subscriptions()->detach($this->series);
$this->isUserSubscribed = false;
$this->formAction = 'subscribe';
$this->btnText = 'Subscribe';
$this->btnText = __('common.subscribe');
}

public function render(): Factory|View|Application
Expand Down
19 changes: 0 additions & 19 deletions app/View/Components/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
namespace App\View\Components;

use App\Models\Clip;
use App\Services\WowzaService;
use Debugbar;
use Illuminate\Support\Collection;
use Illuminate\View\Component;
use Illuminate\View\View;
Expand All @@ -19,7 +17,6 @@ class Player extends Component
public function __construct(
public Clip $clip,
public Collection $wowzaStatus,
// public WowzaService $wowzaService,
public $defaultVideoUrl
) {
//
Expand All @@ -30,22 +27,6 @@ public function __construct(
*/
public function render(): View
{
// $urls = $this->wowzaService->vodSecureUrls($this->clip);
//
// if (empty($urls)) {
// $defaultPlayerUrl = [];
// } elseif ($urls->has('composite')) {
// $defaultPlayerUrl = $urls['composite'];
// } elseif ($urls->has('presenter')) {
// $defaultPlayerUrl = $urls['presenter'];
// } elseif ($urls->has('presentation')) {
// $defaultPlayerUrl = $urls['presentation'];
// } else {
// $defaultPlayerUrl = [];
// }
//
// Debugbar::info($urls);

return view('components.player');
}
}
Loading

0 comments on commit 6b3752c

Please sign in to comment.