This commit is contained in:
Andras Bacsai
2023-06-12 12:00:01 +02:00
parent b097842d01
commit a97d22b81b
36 changed files with 364 additions and 202 deletions

View File

@@ -1,4 +1,4 @@
<nav class="flex items-center gap-4 py-2 border-b-2 border-solid border-coolgray-200">
<nav class="flex items-end gap-4 py-2 border-b-2 border-solid border-coolgray-200">
<a class="{{ request()->routeIs('project.application.configuration') ? 'text-white' : '' }}"
href="{{ route('project.application.configuration', [
'project_uuid' => Route::current()->parameters()['project_uuid'],

View File

@@ -6,33 +6,33 @@
])
<div {{ $attributes->merge(['class' => 'flex flex-col']) }}>
<label class="label" for={{ $id }}>
<span class="label-text">
@if ($label)
@if ($label)
<label class="label" for={{ $id }}>
<span class="label-text">
{{ $label }}
@endif
@if ($required)
<span class="text-warning">*</span>
@endif
@if ($helper)
<div class="group">
<div class="cursor-pointer text-warning">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
class="w-4 h-4 stroke-current">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
</div>
<div class="absolute hidden text-xs group-hover:block border-coolgray-400 bg-coolgray-500">
<div class="p-4 card-body">
{!! $helper !!}
@if ($required)
<span class="text-warning">*</span>
@endif
@if ($helper)
<div class="group">
<div class="cursor-pointer text-warning">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
class="w-4 h-4 stroke-current">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
</div>
<div class="absolute hidden text-xs group-hover:block border-coolgray-400 bg-coolgray-500">
<div class="p-4 card-body">
{!! $helper !!}
</div>
</div>
</div>
</div>
@endif
</span>
</label>
<select {{ $attributes }}
@endif
</span>
</label>
@endif
<select class="select-xs h-7" {{ $attributes }}
@if ($id) name={{ $id }} wire:model.defer={{ $id }} @endif>
{{ $slot }}
</select>

View File

@@ -38,6 +38,10 @@
<x-version class="fixed left-2 bottom-1" />
@auth
<script>
function copyToClipboard(text) {
navigator.clipboard.writeText(text);
Livewire.emit('message', 'Copied to clipboard.');
}
Livewire.on('reloadWindow', () => {
window.location.reload();
})
@@ -45,6 +49,10 @@
console.log(message);
alert(message);
})
Livewire.on('message', (message) => {
console.log(message);
alert(message);
})
Livewire.on('saved', (message) => {
if (message) console.log(message);
else console.log('saved');

View File

@@ -1,7 +1,7 @@
<div class="pb-6">
<h1>Server</h1>
<div class="pt-2 pb-10 text-sm">{{ data_get($server, 'name') }}</div>
<nav class="flex items-center gap-4 py-2 border-b-2 border-solid border-coolgray-200">
<nav class="flex items-end gap-4 py-2 border-b-2 border-solid border-coolgray-200">
<a class="{{ request()->routeIs('server.show') ? 'text-white' : '' }}"
href="{{ route('server.show', [
'server_uuid' => Route::current()->parameters()['server_uuid'],

View File

@@ -1,7 +1,7 @@
<div class="pb-6">
<h1>Settings</h1>
<div class="pt-2 pb-10 text-sm">Instance wide settings for Coolify.</div>
<nav class="flex items-center gap-4 py-2 border-b-2 border-solid border-coolgray-200">
<nav class="flex items-end gap-4 py-2 border-b-2 border-solid border-coolgray-200">
<a class="{{ request()->routeIs('settings.configuration') ? 'text-white' : '' }}"
href="{{ route('settings.configuration') }}">
<button>Configuration</button>

View File

@@ -18,7 +18,7 @@
</li>
</ol>
</nav>
<nav class="flex items-center gap-4 py-2 border-b-2 border-solid border-coolgray-200">
<nav class="flex items-end gap-4 py-2 border-b-2 border-solid border-coolgray-200">
<a class="{{ request()->routeIs('team.show') ? 'text-white' : '' }}" href="{{ route('team.show') }}">
<button>Members</button>
</a>

View File

@@ -0,0 +1,12 @@
Hello,<br><br>
You have been invited to "{{ $team }}" on "{{ config('app.name') }}".<br><br>
Please click here to accept the invitation: <a href="{{ $invitation_link }}">Accept Invitation</a><br><br>
If you have any questions, please contact the team owner.<br><br>
If it was not you who requested this invitation, please ignore this ema il, or instantly revoke the invitation by
clicking here: <a href="{{ $invitation_link }}/revoke">Revoke Invitation</a><br><br>
Thank you.

View File

@@ -1 +0,0 @@
Hello from test email.

View File

@@ -0,0 +1 @@
Hello from test email. If you are seeing this, it means that your SMTP settings are working.

View File

@@ -8,8 +8,6 @@
</div>
<div class="pt-2 pb-4 text-sm">SMTP settings for password reset, invitation, etc.</div>
<div class="flex items-end gap-2">
<x-forms.input required id="settings.extra_attributes.smtp_recipients"
helper="Email list to send the all notifications to, separated by comma." label="Recipient(s)" />
<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." />
<x-forms.button wire:click='test_email'>

View File

@@ -1,5 +1,5 @@
<div class="w-64 -mt-9">
<x-forms.select wire:model="selectedTeamId" class="pr-0 select-xs ">
<x-forms.select wire:model="selectedTeamId">
<option value="default" disabled selected>Switch team</option>
@foreach (auth()->user()->teams as $team)
<option value="{{ $team->id }}">{{ $team->name }}</option>

View File

@@ -0,0 +1,36 @@
<div>
@if ($invitations->count() > 0)
<h4 class="pb-2">Pending Invitations</h4>
<div class="overflow-x-auto">
<table class="table">
<thead>
<tr class="font-bold text-white uppercase border-coolgray-200">
<th>Email</th>
<th>Via</th>
<th>Role</th>
<th>Invitation Link</th>
<th>Actions</th>
</tr>
</thead>
<tbody x-data>
@foreach ($invitations as $invite)
<tr class="border-coolgray-200">
<td>{{ $invite->email }}</td>
<td>{{ $invite->via }}</td>
<td>{{ $invite->role }}</td>
<td x-on:click="copyToClipboard('{{ $invite->link }}')">
<x-forms.button>Copy Invitation Link</x-forms.button>
</td>
<td>
<x-forms.button wire:click.prevent='deleteInvitation({{ $invite->id }})'>Revoke
Invitation</x-forms.button>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endif
</div>

View File

@@ -1,6 +1,13 @@
<div>
<form wire:submit.prevent='inviteByLink' class="flex items-center gap-2">
<x-forms.input id="email" type="email" name="email" placeholder="Email" />
<x-forms.button type="submit">Invite with link</x-forms.button>
<x-forms.select id="role" name="role">
<option value="admin">Admin</option>
<option value="member">Member</option>
</x-forms.select>
<x-forms.button type="submit">Generate Invitation Link</x-forms.button>
@if (is_transactional_emails_active())
<x-forms.button wire:click.prevent='viaEmail'>Send Invitation Email</x-forms.button>
@endif
</form>
</div>

View File

@@ -9,9 +9,9 @@
@if ($member->id !== auth()->user()->id)
@if (data_get($member, 'pivot.role') !== 'owner')
@if (data_get($member, 'pivot.role') !== 'admin')
<x-forms.button wire:click="makeAdmin">Make admin</x-forms.button>
<x-forms.button wire:click="makeAdmin">Convert to Admin</x-forms.button>
@else
<x-forms.button wire:click="makeReadonly">Make readonly</x-forms.button>
<x-forms.button wire:click="makeReadonly">Convert to Member</x-forms.button>
@endif
<x-forms.button wire:click="remove">Remove</x-forms.button>
@else

View File

@@ -4,7 +4,7 @@
<div class="overflow-x-auto">
<table class="table">
<thead>
<tr class="text-warning border-coolgray-200">
<tr class="font-bold text-white uppercase border-coolgray-200">
<th>Name</th>
<th>Email</th>
<th>Role</th>
@@ -29,22 +29,17 @@
</div>
@else
<div class="py-4">
<h3 class="pb-4">Invite a new member</h3>
<livewire:team.invite-link />
<div class="text-sm text-warning">You need to configure SMTP settings before you can invite a new member
<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>
<livewire:team.invite-link />
</div>
@if ($invitations->count() > 0)
<h2 class="pb-2">Pending Invitations</h2>
@endif
@foreach ($invitations as $invite)
<div class="flex gap-2 text-sm">
<div>{{ $invite->email }}</div>
<div>Sent: {{ $invite->created_at }}</div>
</div>
@endforeach
<livewire:team.invitations :invitations="$invitations" />
@endif
@endif
</x-layout>