This commit is contained in:
Andras Bacsai 2023-06-12 20:54:29 +02:00
parent 0496a32e1d
commit 169dc3c2d1
6 changed files with 18 additions and 29 deletions

View File

@ -47,7 +47,7 @@ public function register(): void
{
$this->reportable(function (Throwable $e) {
$this->settings = InstanceSettings::get();
if ($this->settings->do_not_track) {
if ($this->settings->do_not_track || config('app.env') === 'local') {
return;
}
Integration::captureUnhandledException($e);

View File

@ -61,7 +61,6 @@ public function team()
$invitations = TeamInvitation::whereTeamId(auth()->user()->currentTeam()->id)->get();
}
return view('team.show', [
'transactional_emails_active' => is_transactional_emails_active(),
'invitations' => $invitations,
]);
}

View File

@ -72,7 +72,7 @@ private function generate_invite_link(bool $isEmail = false)
return general_error_handler(err: $e, that: $this, customErrorMessage: $error_message);
}
}
public function inviteByLink()
public function viaLink()
{
$this->generate_invite_link();
}

View File

@ -7,7 +7,7 @@
// The release version of your application
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
'release' => config('app.env') === 'local' ? trim(exec('jq -r .coolify.v4.version ../versions.json')) : trim(exec('jq -r .coolify.v4.version versions.json')),
'release' => trim(exec('jq -r .coolify.v4.version versions.json')) ?? 'unknown',
// When left empty or `null` the Laravel environment will be used
'environment' => config('app.env'),

View File

@ -1,5 +1,5 @@
<div>
<form wire:submit.prevent='inviteByLink' class="flex items-center gap-2">
<form wire:submit.prevent='viaLink' class="flex items-center gap-2">
<x-forms.input id="email" type="email" name="email" placeholder="Email" />
<x-forms.select id="role" name="role">
<option value="admin">Admin</option>

View File

@ -19,32 +19,22 @@
</table>
</div>
@if (auth()->user()->isAdmin())
@if (!$transactional_emails_active)
<div class="py-4">
<div class="py-4">
@if (is_transactional_emails_active())
<h3 class="pb-4">Invite a new member</h3>
<form class="flex items-center gap-2">
<x-forms.input type="email" name="email" placeholder="Email" />
<x-forms.button>Invite</x-forms.button>
</form>
</div>
@else
<div class="py-4">
@if (!is_transactional_emails_active())
<h3>Invite a new member</h3>
<div class="pb-4 text-xs text-warning">You need to configure SMTP settings before you can invite a
new
member
via
email.
</div>
@else
<h3 class="pb-4">Invite a new member</h3>
@endif
<livewire:team.invite-link />
</div>
@else
<h3>Invite a new member</h3>
<div class="pb-4 text-xs text-warning">You need to configure SMTP settings before you can invite a
new
member
via
email.
</div>
@endif
<livewire:team.invite-link />
</div>
<livewire:team.invitations :invitations="$invitations" />
@endif
<livewire:team.invitations :invitations="$invitations" />
@endif
</x-layout>