ux ux ux ux ui ui ui ui

This commit is contained in:
Andras Bacsai
2024-03-21 14:30:35 +01:00
parent b5775ff9d2
commit 473bad24b7
47 changed files with 449 additions and 481 deletions

View File

@@ -328,8 +328,16 @@
@endif
</div>
<div class="flex justify-center gap-2 pt-4">
<a wire:click='skipBoarding'>Skip boarding process</a>
<a wire:click='restartBoarding'>Restart boarding process</a>
<a wire:click='skipBoarding' class="cursor-pointer">Skip boarding process</a>
<a wire:click='restartBoarding' class="cursor-pointer">Restart boarding process</a>
<x-modal-input title="How can we help?">
<x-slot:content>
<div class="cursor-pointer dark:hover:text-white" title="Send us feedback or get help!">
Feedback
</div>
</x-slot:content>
<livewire:help />
</x-modal-input>
</div>
</div>
</section>

View File

@@ -6,7 +6,6 @@
@else
<div>
<div>No servers found. Without a server, you won't be able to do much.</div>
<x-use-magic-bar link="/server/new" />
</div>
@endif
</div>

View File

@@ -2,8 +2,8 @@
@if (session('error'))
<span x-data x-init="$wire.emit('error', '{{ session('error') }}')" />
@endif
<h1 class="title">Dashboard</h1>
{{-- <div class="subtitle">Your self-hosted environment</div> --}}
<h1>Dashboard</h1>
<div class="subtitle">Your self-hosted infrastructure.</div>
@if (request()->query->get('success'))
<div class="mb-10 rounded dark:text-white alert-success">
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 stroke-current shrink-0" fill="none"
@@ -16,6 +16,7 @@
</div>
@endif
<h3 class="pb-4">Projects</h3>
<div class="grid grid-cols-1 gap-2 xl:grid-cols-2">
@forelse ($projects as $project)
<div class="gap-2 border border-transparent cursor-pointer box group">
@@ -37,7 +38,9 @@
<div class="flex items-center group">
<a class="mx-4 rounded hover:no-underline"
href="{{ route('project.resource.create', ['project_uuid' => data_get($project, 'uuid'), 'environment_name' => data_get($project, 'environments.0.name', 'production')]) }}">
<span class="p-2 font-bold group-hover:dark:text-white group-hover:text-black dark:hover:bg-coollabs hover:bg-neutral-300">+ Add Resource</span>
<span
class="p-2 font-bold group-hover:dark:text-white group-hover:text-black dark:hover:bg-coollabs hover:bg-neutral-300">+
Add Resource</span>
</a>
<a class="mx-4 rounded group-hover:dark:text-white group-hover:text-black"
href="{{ route('project.edit', ['project_uuid' => data_get($project, 'uuid')]) }}">
@@ -53,11 +56,19 @@
</div>
</div>
@empty
<div>
No projects found. Add your first server <a class="underline dark:text-white"
onclick="newEmptyProject.showModal()">here</a> or
go to the <a class="underline dark:text-white" href="{{ route('onboarding') }}">onboarding page.</a>
<livewire:project.add-empty />
<div class="flex gap-1">
<span class='font-bold text-warning'>No projects found.</span> Add your first project
<div>
<x-slide-over fullScreen closeWithX>
<x-slot:title>New Project</x-slot:title>
<x-slot:content>
<livewire:project.add-empty />
</x-slot:content>
<div class="underline cursor-pointer dark:text-white" @click="slideOverOpen=true">here
</div>
</x-slide-over>
</div> or
go to the <a class="underline dark:text-white" href="{{ route('onboarding') }}">onboarding</a> page.
</div>
@endforelse
</div>
@@ -91,13 +102,40 @@
<div class="flex-1"></div>
</a>
@empty
<div>
No servers found.
Add your first server <a class="underline dark:text-white" href="{{ route('server.create') }}">here</a>
or
go to the <a class="underline dark:text-white" href="{{ route('onboarding') }}">onboarding page.</a>
</div>
@endforelse
@if ($private_keys->count() === 0)
<div class="flex gap-1">
<span class='font-bold text-warning'>No private keys found.</span> Before you can add your server, first add a private key
<div>
<x-slide-over fullScreen closeWithX>
<x-slot:title>New Private Key</x-slot:title>
<x-slot:content>
<livewire:security.private-key.create from="server" />
</x-slot:content>
<div class="underline cursor-pointer dark:text-white" @click="slideOverOpen=true">here
</div>
</x-slide-over>
</div> or
go to the <a class="underline dark:text-white" href="{{ route('onboarding') }}">onboarding</a>
page.
</div>
@else
<div class="flex gap-1">
<span class='font-bold text-warning'>No servers found.</span> Add your first server
<div>
<x-slide-over fullScreen closeWithX>
<x-slot:title>New Server</x-slot:title>
<x-slot:content>
<livewire:server.create />
</x-slot:content>
<div class="underline cursor-pointer dark:text-white" @click="slideOverOpen=true">here
</div>
</x-slide-over>
</div> or
go to the <a class="underline dark:text-white" href="{{ route('onboarding') }}">onboarding</a>
page.
</div>
@endif
@endforelse
</div>
<div class="flex items-center gap-2">
<h3 class="py-4">Deployments</h3>

View File

@@ -14,8 +14,7 @@
<x-modal-input buttonTitle="Send Test Email" title="Send Test Email">
<form wire:submit='submit' class="flex flex-col w-full gap-2">
<x-forms.input placeholder="test@example.com" id="emails" label="Recipients" required />
<x-forms.button onclick="sendTestEmail.close()" wire:click="sendTestNotification"
@click="modalOpen=false">
<x-forms.button wire:click="sendTestNotification" @click="modalOpen=false">
Send Email
</x-forms.button>
</form>

View File

@@ -3,6 +3,6 @@
<x-forms.input placeholder="This is my cool project everyone knows about" id="description" label="Description" />
<div class="subtitle">New project will have a default production environment.</div>
<x-forms.button type="submit" @click="slideOverOpen=false">
Save
Continue
</x-forms.button>
</form>

View File

@@ -1,12 +1,14 @@
<div>
<h1>Project: {{ data_get($project, 'name') }}</h1>
<div class="pb-10">Edit project details here.</div>
<form wire:submit='submit' class="flex flex-col gap-2 pb-10">
<div class="flex items-end gap-2">
<h2>General</h2>
<x-forms.button type="submit">Save</x-forms.button>
<livewire:project.delete-project :disabled="$project->resource_count() > 0" :project_id="$project->id" />
<form wire:submit='submit' class="flex flex-col pb-10">
<div class="flex gap-2">
<h1>Project: {{ data_get($project, 'name') }}</h1>
<div class="flex items-end gap-2">
<x-forms.button type="submit">Save</x-forms.button>
<livewire:project.delete-project :disabled="$project->resource_count() > 0" :project_id="$project->id" />
</div>
</div>
<div class="pt-2 pb-10">Edit project details here.</div>
<div class="flex gap-2">
<x-forms.input label="Name" id="project.name" />
<x-forms.input label="Description" id="project.description" />
@@ -19,8 +21,7 @@
<x-slot:content>
<livewire:project.shared.environment-variable.add />
</x-slot:content>
<button @click="slideOverOpen=true"
class="button">+
<button @click="slideOverOpen=true" class="button">+
Add</button>
</x-slide-over>
</div>

View File

@@ -1,23 +1,21 @@
<div>
<div class="flex gap-2">
<h1>Projects</h1>
@if ($servers > 0)
<x-slide-over>
<x-slot:title>New Project</x-slot:title>
<x-slot:content>
<livewire:project.add-empty />
</x-slot:content>
<button @click="slideOverOpen=true" class="button">+
Add</button>
</x-slide-over>
@endif
<x-slide-over>
<x-slot:title>New Project</x-slot:title>
<x-slot:content>
<livewire:project.add-empty />
</x-slot:content>
<button @click="slideOverOpen=true" class="button">+
Add</button>
</x-slide-over>
</div>
<div class="subtitle">All your projects are here.</div>
<div class="grid gap-2 lg:grid-cols-2">
@if ($servers === 0)
<div>
<div>No servers found. Without a server, you won't be able to do much.</div>
<x-use-magic-bar link="/server/new" />
<x-use-magic-bar link="/servers" />
</div>
@else
@forelse ($projects as $project)
@@ -46,7 +44,6 @@
@empty
<div>
<div>No project found.</div>
<x-use-magic-bar />
</div>
@endforelse
@endif

View File

@@ -166,9 +166,7 @@
<div class="flex items-center gap-4" wire:init='loadServices'>
<h2 class="py-4">Services</h2>
<x-forms.button wire:click="loadServices('force')">Reload List</x-forms.button>
<input
class="input"
wire:model.live.debounce.200ms="search" autofocus placeholder="Search...">
<input class="input" wire:model.live.debounce.200ms="search" autofocus placeholder="Search...">
</div>
<div class="grid justify-start grid-cols-1 gap-4 text-left xl:grid-cols-3">
@if ($loadingServices)
@@ -285,7 +283,7 @@
Go to servers page
</a></div>
<x-use-magic-bar link="/server/new" />
<x-use-magic-bar link="/servers" />
</div>
@endforelse
</div>

View File

@@ -6,7 +6,6 @@
helper="Tokens are created with the current team as scope. You will only have access to this team's resources." />
</div>
<h4>Create New Token</h4>
<span>Currently active team: <span class="text-warning">{{ session('currentTeam.name') }}</span></span>
<form class="flex items-end gap-2 pt-4" wire:submit='addNewToken'>
<x-forms.input required id="description" label="Description" />
<x-forms.button type="submit">Create New Token</x-forms.button>

View File

@@ -1,6 +1,5 @@
<div>
<h1>Private Key</h1>
<div class="subtitle">Private Keys are used to connect to your servers without passwords.</div>
{{-- <div class="subtitle">Private Keys are used to connect to your servers without passwords.</div> --}}
<x-forms.button class="mb-4" wire:click="generateNewKey">Generate new SSH key for me</x-forms.button>
<form class="flex flex-col gap-2" wire:submit='createPrivateKey'>
<div class="flex gap-2">

View File

@@ -1,9 +1,3 @@
<div>
@if ($private_keys->count() === 0)
<h1>Create Private Key</h1>
<div class="subtitle">You need to create a private key before you can create a server.</div>
<livewire:security.private-key.create from="server" />
@else
<livewire:server.new.by-ip :private_keys="$private_keys" :limit_reached="$limit_reached" />
@endif
<livewire:server.new.by-ip :private_keys="$private_keys" :limit_reached="$limit_reached" />
</div>

View File

@@ -1,9 +1,14 @@
<div>
<div class="flex items-start gap-2">
<h1>Servers</h1>
<a class="text-white hover:no-underline" href="{{ route('server.create') }}">
<x-forms.button >+ Add</x-forms.button>
</a>
<x-slide-over fullScreen closeWithX>
<x-slot:title>New Server</x-slot:title>
<x-slot:content>
<livewire:server.create />
</x-slot:content>
<button @click="slideOverOpen=true" class="button">+
Add</button>
</x-slide-over>
</div>
<div class="subtitle">All your servers are here.</div>
@@ -12,8 +17,12 @@
<a href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}"
@class([
'gap-2 border cursor-pointer box group',
'border-transparent' => $server->settings->is_reachable && $server->settings->is_usable && !$server->settings->force_disabled,
'border-red-500' => !$server->settings->is_reachable || $server->settings->force_disabled,
'border-transparent' =>
$server->settings->is_reachable &&
$server->settings->is_usable &&
!$server->settings->force_disabled,
'border-red-500' =>
!$server->settings->is_reachable || $server->settings->force_disabled,
])>
<div class="flex flex-col mx-6">
<div class="font-bold text-white">
@@ -41,7 +50,6 @@
@empty
<div>
<div>No servers found. Without a server, you won't be able to do much.</div>
<x-use-magic-bar link="/server/new" />
</div>
@endforelse
@isset($error)

View File

@@ -2,7 +2,6 @@
@if ($limit_reached)
<x-limit-reached name="servers" />
@else
<h1 class="title">New Server</h1>
<form class="flex flex-col gap-2" wire:submit='submit'>
<div class="flex gap-2">
<x-forms.input id="name" label="Name" required />

View File

@@ -1,9 +1,14 @@
<div>
<div class="flex items-end gap-2 pb-6 ">
<h2>Private Key</h2>
<a href="{{ route('security.private-key.create') }}">
<x-forms.button>Add a new Private Key</x-forms.button>
</a>
<x-slide-over fullScreen closeWithX>
<x-slot:title>New Team</x-slot:title>
<x-slot:content>
<livewire:security.private-key.create />
</x-slot:content>
<button @click="slideOverOpen=true" class="button">+
Add</button>
</x-slide-over>
<x-forms.button wire:click.prevent='checkConnection'>
Check connection
</x-forms.button>
@@ -31,9 +36,7 @@
<div class="text-xs">{{ $private_key->description }}</div>
</x-forms.button>
@empty
<div>No private keys found.
<x-use-magic-bar link="/security/private-key/new" />
</div>
<div>No private keys found. </div>
@endforelse
</div>
</div>

View File

@@ -11,17 +11,6 @@
<x-forms.button type="submit">
Save
</x-forms.button>
{{-- @if (isEmailEnabled($settings) && auth()->user()->isAdminFromSession() && isTestEmailEnabled($settings))
<x-modal-input buttonTitle="Send Test Email" title="Send Test Email">
<form wire:submit='submit' class="flex flex-col gap-2">
<x-forms.input placeholder="test@example.com" id="emails" label="Recipients" required />
<x-forms.button onclick="sendTestEmail.close()" wire:click="sendTestNotification"
@click="modalOpen=false">
Send Email
</x-forms.button>
</form>
</x-modal-input>
@endif --}}
</div>
</form>
<div class="flex flex-col gap-4">

View File

@@ -22,8 +22,8 @@
<h2 class="pt-4">Manage your subscription</h2>
<div class="pb-4">Cancel, upgrade or downgrade your subscription.</div>
<div class="flex gap-2">
<x-forms.button wire:click='stripeCustomerPortal'>Go to <svg xmlns="http://www.w3.org/2000/svg"
class="w-12" viewBox="0 0 512 214">
<x-forms.button class="gap-2" wire:click='stripeCustomerPortal'>Go to <svg xmlns="http://www.w3.org/2000/svg"
class="w-12 " viewBox="0 0 512 214">
<path fill="#635BFF"
d="M512 110.08c0-36.409-17.636-65.138-51.342-65.138c-33.85 0-54.33 28.73-54.33 64.854c0 42.808 24.179 64.426 58.88 64.426c16.925 0 29.725-3.84 39.396-9.244v-28.445c-9.67 4.836-20.764 7.823-34.844 7.823c-13.796 0-26.027-4.836-27.591-21.618h69.547c0-1.85.284-9.245.284-12.658Zm-70.258-13.511c0-16.071 9.814-22.756 18.774-22.756c8.675 0 17.92 6.685 17.92 22.756h-36.694Zm-90.31-51.627c-13.939 0-22.899 6.542-27.876 11.094l-1.85-8.818h-31.288v165.83l35.555-7.537l.143-40.249c5.12 3.698 12.657 8.96 25.173 8.96c25.458 0 48.64-20.48 48.64-65.564c-.142-41.245-23.609-63.716-48.498-63.716Zm-8.534 97.991c-8.391 0-13.37-2.986-16.782-6.684l-.143-52.765c3.698-4.124 8.818-6.968 16.925-6.968c12.942 0 21.902 14.506 21.902 33.137c0 19.058-8.818 33.28-21.902 33.28ZM241.493 36.551l35.698-7.68V0l-35.698 7.538V36.55Zm0 10.809h35.698v124.444h-35.698V47.36Zm-38.257 10.524L200.96 47.36h-30.72v124.444h35.556V87.467c8.39-10.951 22.613-8.96 27.022-7.396V47.36c-4.551-1.707-21.191-4.836-29.582 10.524Zm-71.112-41.386l-34.702 7.395l-.142 113.92c0 21.05 15.787 36.551 36.836 36.551c11.662 0 20.195-2.133 24.888-4.693V140.8c-4.55 1.849-27.022 8.391-27.022-12.658V77.653h27.022V47.36h-27.022l.142-30.862ZM35.982 83.484c0-5.546 4.551-7.68 12.09-7.68c10.808 0 24.461 3.272 35.27 9.103V51.484c-11.804-4.693-23.466-6.542-35.27-6.542C19.2 44.942 0 60.018 0 85.192c0 39.252 54.044 32.995 54.044 49.92c0 6.541-5.688 8.675-13.653 8.675c-11.804 0-26.88-4.836-38.827-11.378v33.849c13.227 5.689 26.596 8.106 38.827 8.106c29.582 0 49.92-14.648 49.92-40.106c-.142-42.382-54.329-34.845-54.329-50.774Z" />
</svg></x-forms.button>

View File

@@ -1,18 +1,12 @@
@if ($settings->is_resale_license_active)
@if (auth()->user()->isAdminFromSession())
<div class="flex justify-center mx-10">
<div x-data>
<div>
<div class="flex gap-2">
<h1>Subscription</h1>
<livewire:switch-team />
<h1>Choose a Plan</h1>
@if (subscriptionProvider() === 'stripe' && $alreadySubscribed)
<x-forms.button wire:click='stripeCustomerPortal'>Manage My Subscription</x-forms.button>
@endif
</div>
<div class="flex items-center pb-8">
<span>Currently active team: <span
class="text-warning">{{ session('currentTeam.name') }}</span></span>
</div>
@if (request()->query->get('cancelled'))
<div class="mb-6 rounded alert-error">
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 stroke-current shrink-0" fill="none"
@@ -29,15 +23,10 @@
<livewire:subscription.pricing-plans />
@endif
</div>
</div>
@else
<div class="flex flex-col justify-center mx-10">
<div class="flex gap-2">
<h1>Subscription</h1>
<livewire:switch-team />
</div>
<div class="flex items-center pb-8">
<span>Currently active team: <span class="text-warning">{{ session('currentTeam.name') }}</span></span>
</div>
<div>You are not an admin or have been removed from this team. If this does not make sense, please <span
class="text-white underline cursor-pointer" wire:click="help" onclick="help.showModal()">contact

View File

@@ -1,7 +1,5 @@
<div>
<div>
<h1>Subscription</h1>
<div>Here you can see and manage your subscription.</div>
</div>
<h1>Subscription</h1>
<div class="subtitle">Here you can see and manage your subscription.</div>
<livewire:subscription.actions />
</div>

View File

@@ -1,8 +1,6 @@
<div class="w-64">
<x-forms.select wire:model.live="selectedTeamId">
<option value="default" disabled selected>Switch team</option>
@foreach (auth()->user()->teams as $team)
<option value="{{ $team->id }}">{{ $team->name }}</option>
@endforeach
</x-forms.select>
</div>
<x-forms.select wire:model.live="selectedTeamId" label="Current Team">
<option value="default" disabled selected>Switch team</option>
@foreach (auth()->user()->teams as $team)
<option value="{{ $team->id }}">{{ $team->name }}</option>
@endforeach
</x-forms.select>

View File

@@ -1,12 +1,12 @@
<div>
<h1>Tags</h1>
<div class="flex flex-col gap-2 pb-6 ">
<div class="flex flex-col pb-6 ">
<div class="subtitle">Tags help you to perform actions on multiple resources.</div>
<div class="flex flex-wrap gap-2">
@if ($tags->count() === 0)
<div>No tags yet defined yet. Go to a resource and add a tag there.</div>
@else
<x-forms.select wire:model.live="tag">
<x-forms.select wire:model.live="tag" label="Tags">
<option value="null" disabled selected>Select a tag</option>
@foreach ($tags as $oneTag)
<option value="{{ $oneTag->name }}">{{ $oneTag->name }}</option>

View File

@@ -1,11 +1,7 @@
<div>
<h1>New Team</h1>
<div class="subtitle">Add a new team.</div>
<form class="flex flex-col gap-2" wire:submit='submit'>
<x-forms.input autofocus id="name" label="Name" required />
<x-forms.input id="description" label="Description" />
<x-forms.button type="submit">
Save Team
</x-forms.button>
</form>
</div>
<form class="flex flex-col gap-2" wire:submit='submit'>
<x-forms.input autofocus id="name" label="Name" required />
<x-forms.input id="description" label="Description" />
<x-forms.button type="submit">
Continue
</x-forms.button>
</form>

View File

@@ -1,6 +1,5 @@
<div>
<x-notifications.navbar />
<h2 class="pb-4">Notifications</h2>
<div x-data="{ activeTab: window.location.hash ? window.location.hash.substring(1) : 'email' }" class="flex h-full">
<div class="flex flex-col gap-4 min-w-fit">
<a :class="activeTab === 'email' && 'text-white'"

View File

@@ -1,5 +1,4 @@
<div>
<h1>New S3 Storage</h1>
<div class="subtitle">S3 Storage used to save backups / files.</div>
<form class="flex flex-col gap-2" wire:submit='submit'>
<div class="flex gap-2">

View File

@@ -1,11 +1,17 @@
<div>
<x-team.navbar :team="auth()
->user()
->currentTeam()" />
<x-team.navbar :team="auth()->user()->currentTeam()" />
<div class="flex items-start gap-2">
<h2 class="pb-4">S3 Storages</h2>
<a class="text-white hover:no-underline" href="/team/storages/new"> <x-forms.button >+ Add
</x-forms.button></a>
<x-slide-over fullScreen closeWithX>
<x-slot:title>New S3 Storage</x-slot:title>
<x-slot:content>
<livewire:team.storage.create />
</x-slot:content>
<button @click="slideOverOpen=true" class="button">+
Add</button>
</x-slide-over>
{{-- <a class="text-white hover:no-underline" href="/team/storages/new"> <x-forms.button>+ Add
</x-forms.button></a> --}}
</div>
<div class="grid gap-2 lg:grid-cols-2">
@forelse ($s3 as $storage)
@@ -21,7 +27,6 @@
@empty
<div>
<div>No storage found.</div>
<x-use-magic-bar link="/team/storages/new" />
</div>
@endforelse
</div>