ui upgrades

This commit is contained in:
Andras Bacsai 2023-07-05 21:26:21 +02:00
parent d757134ced
commit 1342634907
5 changed files with 227 additions and 242 deletions

View File

@ -40,4 +40,4 @@ public function upgrade()
return general_error_handler(err: $e, that: $this); return general_error_handler(err: $e, that: $this);
} }
} }
} }

View File

@ -3,32 +3,32 @@
@tailwind utilities; @tailwind utilities;
.scrollbar { .scrollbar {
@apply scrollbar-thumb-coollabs-100 scrollbar-track-coolgray-200 scrollbar-w-1; @apply scrollbar-thumb-coollabs-100 scrollbar-track-coolgray-200 scrollbar-w-2;
} }
html { html {
@apply text-neutral-400; @apply text-neutral-400;
} }
body { body {
@apply scrollbar antialiased text-sm; @apply text-sm antialiased scrollbar;
} }
.main { .main {
@apply pl-24 pr-10 mx-auto max-w-screen-xl pt-4; @apply max-w-screen-xl pt-4 pl-24 pr-10 mx-auto;
} }
input { input {
@apply input input-sm h-7 outline-none placeholder:text-neutral-700 text-white rounded bg-coolgray-200 w-full read-only:bg-coolgray-200/50 read-only:text-opacity-25; @apply w-full text-white rounded outline-none input input-sm h-7 placeholder:text-neutral-700 bg-coolgray-200 read-only:bg-coolgray-200/50 read-only:text-opacity-25;
} }
input:not(input[type="checkbox"]) { input:not(input[type="checkbox"]) {
@apply border-none disabled:border-none; @apply border-none disabled:border-none;
} }
input[type="checkbox"] { input[type="checkbox"] {
@apply toggle toggle-warning toggle-xs rounded disabled:toggle-warning; @apply rounded toggle toggle-warning toggle-xs disabled:toggle-warning;
} }
textarea { textarea {
@apply textarea read-only:bg-coolgray-200/50 disabled:border-none read-only:text-opacity-25 placeholder:text-neutral-700 text-white rounded scrollbar bg-coolgray-200 leading-5 text-xs; @apply text-xs leading-5 text-white rounded textarea read-only:bg-coolgray-200/50 disabled:border-none read-only:text-opacity-25 placeholder:text-neutral-700 scrollbar bg-coolgray-200;
} }
select { select {
@apply h-7 select select-xs disabled:bg-coolgray-200 border-none disabled:opacity-50 font-normal placeholder:text-neutral-700 text-white rounded bg-coolgray-200; @apply font-normal text-white border-none rounded h-7 select select-xs disabled:bg-coolgray-200 disabled:opacity-50 placeholder:text-neutral-700 bg-coolgray-200;
} }
.label-text, .label-text,
label { label {
@ -43,7 +43,7 @@ button[isWarning] {
@apply bg-red-600 hover:bg-red-500; @apply bg-red-600 hover:bg-red-500;
} }
button[isHighlighted] { button[isHighlighted] {
@apply btn-primary text-white; @apply text-white btn-primary;
} }
h1 { h1 {
@apply text-3xl font-bold text-white; @apply text-3xl font-bold text-white;
@ -61,7 +61,7 @@ a {
@apply text-neutral-400 hover:text-white link link-hover hover:bg-transparent; @apply text-neutral-400 hover:text-white link link-hover hover:bg-transparent;
} }
.kbd-custom { .kbd-custom {
@apply px-2 text-xs border border-dashed rounded border-neutral-700 text-warning; @apply px-2 text-xs border border-dashed rounded border-neutral-700 text-warning;
} }
.icon { .icon {
@apply w-6 h-6; @apply w-6 h-6;
@ -70,7 +70,7 @@ .icon:hover {
@apply text-white; @apply text-white;
} }
.box { .box {
@apply flex items-center justify-center rounded min-h-12 bg-coolgray-200 hover:bg-coollabs-100 hover:text-white p-2 hover:no-underline transition-colors; @apply flex items-center justify-center p-2 transition-colors rounded min-h-12 bg-coolgray-200 hover:bg-coollabs-100 hover:text-white hover:no-underline;
} }
.lds-heart { .lds-heart {
@ -124,5 +124,5 @@ tr td {
@apply px-3 py-4 whitespace-nowrap; @apply px-3 py-4 whitespace-nowrap;
} }
tr td:first-child { tr td:first-child {
@apply pl-4 pr-3 sm:pl-6 font-bold; @apply pl-4 pr-3 font-bold sm:pl-6;
} }

View File

@ -17,9 +17,9 @@
<meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="csrf-token" content="{{ csrf_token() }}">
@vite(['resources/js/app.js', 'resources/css/app.css']) @vite(['resources/js/app.js', 'resources/css/app.css'])
<style> <style>
[x-cloak] { [x-cloak] {
display: none !important; display: none !important;
} }
</style> </style>
@livewireStyles @livewireStyles
</head> </head>
@ -27,107 +27,107 @@
<body> <body>
@livewireScripts @livewireScripts
@auth @auth
<x-toaster-hub /> <x-toaster-hub />
<x-navbar /> <x-navbar />
<div class="fixed top-3 left-4" id="vue"> <div class="fixed top-3 left-4" id="vue">
<magic-bar></magic-bar> <magic-bar></magic-bar>
</div> </div>
<main class="main"> <main class="main">
{{ $slot }} {{ $slot }}
</main> </main>
<x-version class="fixed left-2 bottom-1" /> <x-version class="fixed left-2 bottom-1" />
<script> <script>
let checkHealthInterval = null; let checkHealthInterval = null;
let checkIfIamDeadInterval = null; let checkIfIamDeadInterval = null;
function changePasswordFieldType(event) { function changePasswordFieldType(event) {
const element = event.target.parentElement.parentElement.children[0]; const element = event.target.parentElement.parentElement.children[0];
if (element.nodeName === 'INPUT') { if (element.nodeName === 'INPUT') {
if (element.type === 'password') { if (element.type === 'password') {
element.type = 'text'; element.type = 'text';
} else {
element.type = 'password';
}
}
if (element.nodeName === 'DIV') {
if (element.children[0].type === 'password') {
element.children[0].type = 'text';
} else {
element.children[0].type = 'password';
}
}
if (element.nodeName === 'svg') {
if (element.parentElement.parentElement.children[0].type === 'password') {
element.parentElement.parentElement.children[0].type = 'text';
} else {
element.parentElement.parentElement.children[0].type = 'password';
}
}
}
function revive() {
if (checkHealthInterval) return true;
console.log('Checking server\'s health...')
checkHealthInterval = setInterval(() => {
fetch('/api/health')
.then(response => {
if (response.ok) {
Toaster.success('Coolify is back online. Reloading...')
if (checkHealthInterval) clearInterval(checkHealthInterval);
setTimeout(() => {
window.location.reload();
}, 5000)
} else { } else {
element.type = 'password'; console.log('Waiting for server to come back from dead...');
} }
} })
if (element.nodeName === 'DIV') { return;
if (element.children[0].type === 'password') { }, 2000);
element.children[0].type = 'text'; }
function upgrade() {
if (checkIfIamDeadInterval) return true;
console.log('Update initiated.')
checkIfIamDeadInterval = setInterval(() => {
fetch('/api/health')
.then(response => {
if (response.ok) {
console.log('It\'s alive. Waiting for server to be dead...');
} else { } else {
element.children[0].type = 'password'; Toaster.success('Update done, restarting Coolify!')
console.log('It\'s dead. Reviving... Standby... Bzz... Bzz...')
if (checkIfIamDeadInterval) clearInterval(checkIfIamDeadInterval);
revive();
} }
} })
if (element.nodeName === 'svg') { return;
if (element.parentElement.parentElement.children[0].type === 'password') { }, 2000);
element.parentElement.parentElement.children[0].type = 'text'; }
} else {
element.parentElement.parentElement.children[0].type = 'password';
}
}
}
function revive() { function copyToClipboard(text) {
if (checkHealthInterval) return true; navigator.clipboard.writeText(text);
console.log('Checking server\'s health...') Livewire.emit('message', 'Copied to clipboard.');
checkHealthInterval = setInterval(() => { }
fetch('/api/health') Livewire.on('reloadWindow', () => {
.then(response => { window.location.reload();
if (response.ok) { })
Toaster.success('Coolify is back online. Reloading...') Livewire.on('info', (message) => {
if (checkHealthInterval) clearInterval(checkHealthInterval); if (message) Toaster.info(message)
setTimeout(() => { })
window.location.reload(); Livewire.on('error', (message) => {
}, 5000) if (message) Toaster.error(message)
} else { })
console.log('Waiting for server to come back from dead...'); Livewire.on('warning', (message) => {
} if (message) Toaster.warning(message)
}) })
return; Livewire.on('success', (message) => {
}, 2000); if (message) Toaster.success(message)
} })
</script>
function upgrade() {
if (checkIfIamDeadInterval) return true;
console.log('Update initiated.')
checkIfIamDeadInterval = setInterval(() => {
fetch('/api/health')
.then(response => {
if (response.ok) {
console.log('It\'s alive. Waiting for server to be dead...');
} else {
Toaster.success('Update done, restarting Coolify!')
console.log('It\'s dead. Reviving... Standby... Bzz... Bzz...')
if (checkIfIamDeadInterval) clearInterval(checkIfIamDeadInterval);
revive();
}
})
return;
}, 2000);
}
function copyToClipboard(text) {
navigator.clipboard.writeText(text);
Livewire.emit('message', 'Copied to clipboard.');
}
Livewire.on('reloadWindow', () => {
window.location.reload();
})
Livewire.on('info', (message) => {
if (message) Toaster.info(message)
})
Livewire.on('error', (message) => {
if (message) Toaster.error(message)
})
Livewire.on('warning', (message) => {
if (message) Toaster.warning(message)
})
Livewire.on('success', (message) => {
if (message) Toaster.success(message)
})
</script>
@endauth @endauth
@guest @guest
{{ $slot }} {{ $slot }}
@endguest @endguest
</body> </body>
</html> </html>

View File

@ -1,137 +1,110 @@
@auth @auth
<nav class="fixed h-full overflow-hidden pt-14"> <nav class="fixed h-full overflow-hidden overflow-y-auto pt-14 scrollbar">
<ul class="gap-4 menu"> <ul class="gap-4 menu flex flex-col flex-nowrap h-full">
<li> <li title="Dashboard">
<a class="hover:bg-transparent" @if (!request()->is('/')) href="/" @endif> <a class="hover:bg-transparent" @if (!request()->is('/')) href="/" @endif>
<svg xmlns="http://www.w3.org/2000/svg" class="{{ request()->is('/') ? 'text-warning icon' : 'icon' }}" <svg xmlns="http://www.w3.org/2000/svg" class="{{ request()->is('/') ? 'text-warning icon' : 'icon' }}"
fill="none" viewBox="0 0 24 24" stroke="currentColor"> fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" /> d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
</svg> </svg>
</a> </a>
</li> </li>
<li title="Projects">
<a class="hover:bg-transparent" @if (!request()->is('projects')) href="/projects" @endif>
<svg xmlns="http://www.w3.org/2000/svg"
class="{{ request()->is('project/*') || request()->is('projects') ? 'text-warning icon' : 'icon' }}"
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M12 4l-8 4l8 4l8 -4l-8 -4" />
<path d="M4 12l8 4l8 -4" />
<path d="M4 16l8 4l8 -4" />
</svg>
</a>
</li>
<li title="Servers">
<a class="hover:bg-transparent" @if (!request()->is('servers')) href="/servers" @endif>
<svg xmlns="http://www.w3.org/2000/svg"
class="{{ request()->is('server/*') || request()->is('servers') ? 'text-warning icon' : 'icon' }}"
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z" />
<path d="M15 20h-9a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h12" />
<path d="M7 8v.01" />
<path d="M7 16v.01" />
<path d="M20 15l-2 3h3l-2 3" />
</svg>
</a>
</li>
@if (auth()->user()->isInstanceAdmin())
<li title="Command Center">
<a class="hover:bg-transparent" @if (!request()->is('command-center')) href="/command-center" @endif>
<svg xmlns="http://www.w3.org/2000/svg"
class="{{ request()->is('command-center') ? 'text-warning icon' : 'icon' }}" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M5 7l5 5l-5 5" />
<path d="M12 19l7 0" />
</svg>
</a>
</li>
<li title="Projects"> <li title="Profile">
<a class="hover:bg-transparent" @if (!request()->is('projects')) href="/projects" @endif> <a class="hover:bg-transparent" @if (!request()->is('profile')) href="/profile" @endif>
<svg xmlns="http://www.w3.org/2000/svg" <svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 24 24" stroke-width="1.5"
class="{{ request()->is('project/*') || request()->is('projects') ? 'text-warning icon' : 'icon' }}"viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" <path stroke="none" d="M0 0h24v24H0z" fill="none" />
stroke-linejoin="round"> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" />
<path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" />
<path d="M12 4l-8 4l8 4l8 -4l-8 -4" /> <path d="M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855" />
<path d="M4 12l8 4l8 -4" /> </svg>
<path d="M4 16l8 4l8 -4" /> </a>
</svg> </li>
</a> <li title="Teams">
</li> <a class="hover:bg-transparent" href="{{ route('team.show') }}">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 24 24" stroke-width="1.5"
<li title="Servers"> stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<a class="hover:bg-transparent" @if (!request()->is('servers')) href="/servers" @endif> <path stroke="none" d="M0 0h24v24H0z" fill="none" />
<svg xmlns="http://www.w3.org/2000/svg" <path d="M10 13a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
class="{{ request()->is('server/*') || request()->is('servers') ? 'text-warning icon' : 'icon' }}" <path d="M8 21v-1a2 2 0 0 1 2 -2h4a2 2 0 0 1 2 2v1" />
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" <path d="M15 5a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
stroke-linejoin="round"> <path d="M17 10h2a2 2 0 0 1 2 2v1" />
<path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M5 5a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
<path d="M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z" /> <path d="M3 13v-1a2 2 0 0 1 2 -2h2" />
<path d="M15 20h-9a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h12" /> </svg>
<path d="M7 8v.01" /> </a>
<path d="M7 16v.01" /> </li>
<path d="M20 15l-2 3h3l-2 3" /> <livewire:upgrade />
</svg> <li title="Settings" class="mt-auto">
</a> <a class="hover:bg-transparent" @if (!request()->is('settings')) href="/settings" @endif>
</li> <svg xmlns="http://www.w3.org/2000/svg"
@if (auth()->user()->isInstanceAdmin()) class="{{ request()->is('settings*') ? 'text-warning icon' : 'icon' }}" viewBox="0 0 24 24"
<li title="Command Center"> stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<a class="hover:bg-transparent" @if (!request()->is('command-center')) href="/command-center" @endif> <path stroke="none" d="M0 0h24v24H0z" fill="none" />
<svg xmlns="http://www.w3.org/2000/svg" <path
class="{{ request()->is('command-center') ? 'text-warning icon' : 'icon' }}" viewBox="0 0 24 24" d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z" />
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" <path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" />
stroke-linejoin="round"> </svg>
<path stroke="none" d="M0 0h24v24H0z" fill="none" /> </a>
<path d="M5 7l5 5l-5 5" /> </li>
<path d="M12 19l7 0" /> <li class="pb-6" title="Logout">
</svg> <form action="/logout" method="POST" class=" hover:bg-transparent">
</a> @csrf
</li> <button class="hover:text-white rounded-none hover:bg-transparent"> <svg
<li title="Settings"> xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 24 24" stroke-width="1.5"
<a class="hover:bg-transparent" @if (!request()->is('settings')) href="/settings" @endif>
<svg xmlns="http://www.w3.org/2000/svg"
class="{{ request()->is('settings*') ? 'text-warning icon' : 'icon' }}" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path
d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z" />
<path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" />
</svg>
</a>
</li>
<livewire:upgrade />
@endif
</ul>
</nav>
<div class="fixed right-0 p-2 top-1">
<div class="group">
<label tabindex="0"
class="absolute top-0 right-0 p-2 m-2 my-1 cursor-pointer hover:bg-transparent hover:text-warning">
<div class="flex items-center justify-center gap-2 placeholder">
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M4 6l16 0" /> <path d="M13 12v.01" />
<path d="M4 12l16 0" /> <path d="M3 21h18" />
<path d="M4 18l16 0" /> <path d="M5 21v-16a2 2 0 0 1 2 -2h7.5m2.5 10.5v7.5" />
</svg> <path d="M14 7h7m-3 -3l3 3l-3 3" />
</div> </svg></button>
</label> </form>
<div class="hidden p-4 px-8 group-hover:block"> </li>
<ul tabindex="0" class="p-2 mt-3 rounded shadow menu menu-compact dropdown-content bg-coolgray-200 w-52"> @endif
<li> </ul>
<a class="text-white rounded-none hover:no-underline hover:bg-coollabs" href="/profile"> </nav>
<svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 24 24" @endauth
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" />
<path d="M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" />
<path d="M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855" />
</svg> Profile
</a>
</li>
<li>
<a class="text-white rounded-none hover:no-underline hover:bg-coollabs"
href="{{ route('team.show') }}">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M10 13a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
<path d="M8 21v-1a2 2 0 0 1 2 -2h4a2 2 0 0 1 2 2v1" />
<path d="M15 5a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
<path d="M17 10h2a2 2 0 0 1 2 2v1" />
<path d="M5 5a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
<path d="M3 13v-1a2 2 0 0 1 2 -2h2" />
</svg> Team
</a>
</li>
<form action="/logout" method="POST">
<li>
@csrf
<button class="text-white rounded-none hover:bg-coollabs"> <svg
xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M13 12v.01" />
<path d="M3 21h18" />
<path d="M5 21v-16a2 2 0 0 1 2 -2h7.5m2.5 10.5v7.5" />
<path d="M14 7h7m-3 -3l3 3l-3 3" />
</svg>Logout</button>
</li>
</form>
</ul>
</div>
</div>
</div>
@endauth

View File

@ -1,4 +1,4 @@
<li title="New version available" x-init="$wire.checkUpdate" x-data> <li @if($isUpgradeAvailable) title="New version available" @else title="No upgrade available" @endif x-init="$wire.checkUpdate" x-data>
@if ($isUpgradeAvailable) @if ($isUpgradeAvailable)
<button wire:click='upgrade' class="hover:bg-transparent focus:bg-transparent" x-on:click="upgrade"> <button wire:click='upgrade' class="hover:bg-transparent focus:bg-transparent" x-on:click="upgrade">
@if ($showProgress) @if ($showProgress)
@ -22,6 +22,18 @@ class="w-6 h-6 text-pink-500 transition-colors hover:text-pink-300" viewBox="0 0
</svg> </svg>
@endif @endif
</button> </button>
</div> @else
<button class="hover:bg-transparent">
<svg xmlns="http://www.w3.org/2000/svg"
class="w-6 h-6 transition-colors text-neutral-700" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path
d="M9 12h-3.586a1 1 0 0 1 -.707 -1.707l6.586 -6.586a1 1 0 0 1 1.414 0l6.586 6.586a1 1 0 0 1 -.707 1.707h-3.586v3h-6v-3z" />
<path d="M9 21h6" />
<path d="M9 18h6" />
</svg>
</button>
@endif @endif
</li> </li>