This commit is contained in:
Andras Bacsai 2023-06-12 12:21:48 +02:00
parent a97d22b81b
commit 19a83bb2c0
7 changed files with 19 additions and 14 deletions

View File

@ -19,6 +19,7 @@ public function mount()
public function viaEmail()
{
$this->generate_invite_link(isEmail: true);
$this->emit('message', 'Invitation sent via email successfully.');
}
private function generate_invite_link(bool $isEmail = false)
{
@ -61,7 +62,6 @@ private function generate_invite_link(bool $isEmail = false)
$user->first()->notify(new InvitationLinkEmail());
}
$this->emit('refreshInvitations');
$this->emit('message', 'Invitation sent successfully.');
} catch (\Throwable $e) {
$error_message = $e->getMessage();
if ($e->getCode() === '23505') {
@ -73,5 +73,6 @@ private function generate_invite_link(bool $isEmail = false)
public function inviteByLink()
{
$this->generate_invite_link();
$this->emit('message', 'Invitation link generated.');
}
}

View File

@ -7,7 +7,7 @@
<button>Configuration</button>
</a>
<a class="{{ request()->routeIs('settings.emails') ? 'text-white' : '' }}" href="{{ route('settings.emails') }}">
<button>Emails</button>
<button>SMTP</button>
</a>
<div class="flex-1"></div>
</nav>

View File

@ -31,8 +31,7 @@
@endif
@endforeach
</x-forms.select>
<x-forms.button class="h-8 hover:bg-coolgray-400 bg-coolgray-200"
wire:click.prevent="loadBranches"> Check
<x-forms.button wire:click.prevent="loadBranches"> Check
repository</x-forms.button>
</div>
@endif

View File

@ -10,7 +10,7 @@
@endif
@endforeach
</x-forms.select>
<x-forms.button type="submit" class="h-8 hover:bg-coolgray-400 bg-coolgray-200">Execute Command
<x-forms.button type="submit">Execute Command
</x-forms.button>
</form>
<div class="container w-full pt-10 mx-auto">

View File

@ -14,10 +14,10 @@
<x-forms.input id="settings.default_redirect_404" label="Default Redirect 404"
helper="All urls that has no service available will be redirected to this domain.<span class='text-helper'>You can set to your main marketing page or your social media link.</span>" />
</div>
<div class="flex gap-2 ">
{{-- <div class="flex gap-2 ">
<x-forms.input type="number" id="settings.public_port_min" label="Public Port Min" />
<x-forms.input type="number" id="settings.public_port_max" label="Public Port Max" />
</div>
</div> --}}
</div>
</form>

View File

@ -6,7 +6,7 @@
Save
</x-forms.button>
</div>
<div class="pt-2 pb-4 text-sm">SMTP settings for password reset, invitation, etc.</div>
<div class="pt-2 pb-4 text-sm">SMTP settings for password resets, invitations, etc.</div>
<div class="flex items-end gap-2">
<x-forms.input id="settings.extra_attributes.smtp_test_recipients" label="Test Recipient(s)"
helper="Email list to send a test email to, separated by comma." />

View File

@ -29,12 +29,17 @@
</div>
@else
<div class="py-4">
<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>
@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>