mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 06:56:15 +00:00
Merge (#127)
This commit is contained in:
@ -1,212 +1,77 @@
|
||||
@props(['server'])
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
@php
|
||||
use App\Enums\ServerStatus;
|
||||
@endphp
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
@props([
|
||||
"server",
|
||||
])
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace("_", "-", app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}" hx-swap-oob="true" />
|
||||
|
||||
<title>
|
||||
@if (isset($pageTitle))
|
||||
{{ $pageTitle }} -
|
||||
@endif
|
||||
{{ config('app.name', 'Laravel') }}
|
||||
</title>
|
||||
<title>
|
||||
@if (isset($pageTitle)) {{ $pageTitle }} -
|
||||
@endif {{ config("app.name", "Laravel") }}
|
||||
</title>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.bunny.net" />
|
||||
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
|
||||
|
||||
<!-- Scripts -->
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
<script src="{{ asset("static/libs/ace/ace.js") }}"></script>
|
||||
|
||||
@livewireStyles
|
||||
@include("layouts.partials.favicon")
|
||||
|
||||
<script src="{{ asset('static/libs/ace/ace.js') }}"></script>
|
||||
<script src="{{ asset('static/libs/ace/theme-github.js') }}"></script>
|
||||
<script src="{{ asset('static/libs/ace/theme-one-dark.js') }}"></script>
|
||||
<script src="{{ asset('static/libs/ace/mode-sh.js') }}"></script>
|
||||
<!-- Scripts -->
|
||||
@vite(["resources/css/app.css", "resources/js/app.js"])
|
||||
</head>
|
||||
|
||||
@include('layouts.partials.favicon')
|
||||
</head>
|
||||
<body class="bg-gray-50 font-sans antialiased dark:bg-gray-900 dark:text-gray-300" x-data="" x-cloak>
|
||||
@include("layouts.partials.search")
|
||||
|
||||
<body class="font-sans antialiased bg-gray-100 dark:bg-gray-900 dark:text-gray-300 min-h-screen min-w-max"
|
||||
x-data="" x-cloak>
|
||||
<div class="flex min-h-screen">
|
||||
<div
|
||||
class="left-0 top-0 min-h-screen w-64 flex-none bg-gray-800 dark:bg-gray-800/50 p-3 dark:border-r-2 dark:border-gray-800">
|
||||
<div class="h-16 block">
|
||||
<div class="flex items-center justify-start text-2xl font-extrabold text-white">
|
||||
<x-application-logo class="w-7 h-7 rounded-md" />
|
||||
<span class="ml-1">Deploy</span>
|
||||
</div>
|
||||
</div>
|
||||
@include("layouts.navigation")
|
||||
|
||||
<div class="mb-5">
|
||||
<div class="uppercase text-gray-300 text-sm font-semibold">{{ __("Projects") }}</div>
|
||||
<div class="mt-2">
|
||||
@include('layouts.partials.project-select', ['project' => auth()->user()->currentProject])
|
||||
</div>
|
||||
@include("layouts.sidebar")
|
||||
|
||||
<div class="mt-5 uppercase text-gray-300 text-sm font-semibold">{{ __("Servers") }}</div>
|
||||
<div class="mt-2">
|
||||
@include('layouts.partials.server-select', ['server' => isset($server) ? $server : null])
|
||||
</div>
|
||||
<div class="mt-[64px] w-full"></div>
|
||||
|
||||
@if (isset($server))
|
||||
<div class="mt-3 space-y-1">
|
||||
<x-sidebar-link :href="route('servers.show', ['server' => $server])" :active="request()->routeIs('servers.show')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
|
||||
stroke="currentColor" class="w-6 h-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" />
|
||||
</svg>
|
||||
<span class="ml-2 text-gray-50">{{ __('Overview') }}</span>
|
||||
</x-sidebar-link>
|
||||
@if ($server->isReady())
|
||||
@if ($server->webserver())
|
||||
<x-sidebar-link :href="route('servers.sites', ['server' => $server])" :active="request()->routeIs('servers.sites') || request()->is('servers/*/sites/*')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" />
|
||||
</svg>
|
||||
<span class="ml-2 text-gray-50">{{ __('Sites') }}</span>
|
||||
</x-sidebar-link>
|
||||
@endif
|
||||
@if ($server->database())
|
||||
<x-sidebar-link :href="route('servers.databases', ['server' => $server])" :active="request()->routeIs('servers.databases') ||
|
||||
request()->routeIs('servers.databases.backups')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125" />
|
||||
</svg>
|
||||
<span class="ml-2 text-gray-50">{{ __('Databases') }}</span>
|
||||
</x-sidebar-link>
|
||||
@endif
|
||||
@if ($server->php())
|
||||
<x-sidebar-link :href="route('servers.php', ['server' => $server])" :active="request()->routeIs('servers.php')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M17.25 6.75L22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3l-4.5 16.5" />
|
||||
</svg>
|
||||
<span class="ml-2 text-gray-50">{{ __('PHP') }}</span>
|
||||
</x-sidebar-link>
|
||||
@endif
|
||||
@if ($server->firewall())
|
||||
<x-sidebar-link :href="route('servers.firewall', ['server' => $server])" :active="request()->routeIs('servers.firewall')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M15.362 5.214A8.252 8.252 0 0112 21 8.25 8.25 0 016.038 7.048 8.287 8.287 0 009 9.6a8.983 8.983 0 013.361-6.867 8.21 8.21 0 003 2.48z" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M12 18a3.75 3.75 0 00.495-7.467 5.99 5.99 0 00-1.925 3.546 5.974 5.974 0 01-2.133-1A3.75 3.75 0 0012 18z" />
|
||||
</svg>
|
||||
<span class="ml-2 text-gray-50">{{ __('Firewall') }}</span>
|
||||
</x-sidebar-link>
|
||||
@endif
|
||||
<x-sidebar-link :href="route('servers.cronjobs', ['server' => $server])" :active="request()->routeIs('servers.cronjobs')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg>
|
||||
<span class="ml-2 text-gray-50">{{ __('Cronjobs') }}</span>
|
||||
</x-sidebar-link>
|
||||
<x-sidebar-link :href="route('servers.ssh-keys', ['server' => $server])" :active="request()->routeIs('servers.ssh-keys')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z" />
|
||||
</svg>
|
||||
<span class="ml-2 text-gray-50">{{ __('SSH Keys') }}</span>
|
||||
</x-sidebar-link>
|
||||
<x-sidebar-link :href="route('servers.services', ['server' => $server])" :active="request()->routeIs('servers.services')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /> </svg>
|
||||
<span class="ml-2 text-gray-50">{{ __('Services') }}</span>
|
||||
</x-sidebar-link>
|
||||
@endif
|
||||
<x-sidebar-link :href="route('servers.settings', ['server' => $server])" :active="request()->routeIs('servers.settings')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M11.42 15.17L17.25 21A2.652 2.652 0 0021 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 11-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 004.486-6.336l-3.276 3.277a3.004 3.004 0 01-2.25-2.25l3.276-3.276a4.5 4.5 0 00-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437l1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008z" />
|
||||
</svg>
|
||||
<span class="ml-2 text-gray-50">{{ __('Settings') }}</span>
|
||||
</x-sidebar-link>
|
||||
<x-sidebar-link :href="route('servers.logs', ['server' => $server])" :active="request()->routeIs('servers.logs')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M6.429 9.75L2.25 12l4.179 2.25m0-4.5l5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0l4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0l-5.571 3-5.571-3" />
|
||||
</svg>
|
||||
<span class="ml-2 text-gray-50">{{ __('Logs') }}</span>
|
||||
</x-sidebar-link>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (isset($sidebar))
|
||||
<div
|
||||
class="min-h-screen w-64 flex-none border-r border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-900">
|
||||
{{ $sidebar }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="flex min-h-screen flex-grow flex-col">
|
||||
@include('layouts.navigation')
|
||||
|
||||
<!-- Page Heading -->
|
||||
<div class="sm:ml-64">
|
||||
@if (isset($header))
|
||||
<header class="border-b border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-900">
|
||||
<div class="mx-auto flex h-20 w-full max-w-full items-center justify-between px-8">
|
||||
<header class="border-b border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800">
|
||||
<div class="mx-auto flex h-20 w-full max-w-full items-center justify-between px-5">
|
||||
{{ $header }}
|
||||
</div>
|
||||
</header>
|
||||
@endif
|
||||
|
||||
@if (isset($header2))
|
||||
<header class="border-b border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-900">
|
||||
<div class="mx-auto max-w-full py-6 px-8">
|
||||
<header class="border-b border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800">
|
||||
<div class="mx-auto max-w-full px-5 py-6">
|
||||
{{ $header2 }}
|
||||
</div>
|
||||
</header>
|
||||
@endif
|
||||
|
||||
<!-- Page Content -->
|
||||
<main class="px-8">
|
||||
<div class="px-4 py-10">
|
||||
{{ $slot }}
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<x-toast />
|
||||
<livewire:broadcast />
|
||||
@livewireScriptConfig
|
||||
<script>
|
||||
// document.addEventListener('livewire:init', () => {
|
||||
// Livewire.onPageExpired((response, message) => {
|
||||
// ({
|
||||
// href: window.location.href
|
||||
// } = window.location);
|
||||
// })
|
||||
// })
|
||||
|
||||
// On page load or when changing themes, best to add inline in `head` to avoid FOUC
|
||||
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia(
|
||||
'(prefers-color-scheme: dark)').matches)) {
|
||||
document.documentElement.classList.add('dark')
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark')
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
// On page load or when changing themes, best to add inline in `head` to avoid FOUC
|
||||
if (
|
||||
localStorage.theme === 'dark' ||
|
||||
(!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)
|
||||
) {
|
||||
document.documentElement.classList.add('dark');
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark');
|
||||
}
|
||||
</script>
|
||||
<x-toast />
|
||||
<x-htmx-error-handler />
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,36 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<html lang="{{ str_replace("_", "-", app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}" />
|
||||
|
||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
||||
<title>{{ config("app.name", "Laravel") }}</title>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||
<link rel="preconnect" href="https://fonts.bunny.net" />
|
||||
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
|
||||
|
||||
<!-- Scripts -->
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
@vite(["resources/css/app.css", "resources/js/app.js"])
|
||||
|
||||
@include('layouts.partials.favicon')
|
||||
@include("layouts.partials.favicon")
|
||||
</head>
|
||||
<body class="font-sans text-gray-900 antialiased">
|
||||
<div class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-gray-100 dark:bg-gray-900">
|
||||
<div
|
||||
class="flex min-h-screen flex-col items-center bg-gray-100 pt-6 dark:bg-gray-900 sm:justify-center sm:pt-0"
|
||||
>
|
||||
<div>
|
||||
<a href="/">
|
||||
<div class="flex items-center justify-start text-3xl font-extrabold">
|
||||
<x-application-logo class="w-9 h-9 rounded-md" />
|
||||
<x-application-logo class="h-9 w-9 rounded-md" />
|
||||
<span class="ml-1">Deploy</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="w-full sm:max-w-md mt-10 px-6 py-4 bg-white dark:bg-gray-800 shadow-md overflow-hidden rounded-lg">
|
||||
<div
|
||||
class="mt-10 w-full overflow-hidden rounded-lg bg-white px-6 py-4 shadow-md dark:bg-gray-800 sm:max-w-md"
|
||||
>
|
||||
{{ $slot }}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -1,16 +1,79 @@
|
||||
<nav x-data="{ open: false }" class="h-16 border-b border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900">
|
||||
<div class="mx-auto max-w-full px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex items-center justify-between h-16">
|
||||
<div class="flex">
|
||||
|
||||
<nav
|
||||
class="fixed top-0 z-50 flex h-[64px] w-full items-center border-b border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800"
|
||||
>
|
||||
<div class="w-full px-3 py-3 lg:px-5 lg:pl-3">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center justify-start">
|
||||
<button
|
||||
data-drawer-target="logo-sidebar"
|
||||
data-drawer-toggle="logo-sidebar"
|
||||
aria-controls="logo-sidebar"
|
||||
type="button"
|
||||
class="inline-flex items-center rounded-md p-2 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600 sm:hidden"
|
||||
>
|
||||
<span class="sr-only">Open sidebar</span>
|
||||
<x-heroicon name="o-bars-3-center-left" class="h-6 w-6" />
|
||||
</button>
|
||||
<a href="/" class="ms-2 flex md:me-24">
|
||||
<div class="flex items-center justify-start text-3xl font-extrabold">
|
||||
<x-application-logo class="h-9 w-9 rounded-md" />
|
||||
<span class="ml-1 hidden sm:block">Deploy</span>
|
||||
</div>
|
||||
</a>
|
||||
<div class="h-[64px] w-1 border-r border-gray-200 px-3 dark:border-gray-700 md:px-0"></div>
|
||||
<div class="ml-5 cursor-pointer" x-data="">
|
||||
<div
|
||||
class="flex w-full items-center rounded-md border border-gray-200 bg-gray-100 px-4 py-2 text-sm text-gray-900 focus:ring-4 focus:ring-gray-300 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300 dark:focus:ring-gray-600"
|
||||
@click="$dispatch('open-search')"
|
||||
>
|
||||
<x-heroicon name="o-magnifying-glass" class="h-4 w-4" />
|
||||
<span class="ml-2 hidden lg:block">Press / to Search</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center">
|
||||
<div class="mr-3">
|
||||
@include('layouts.partials.color-scheme')
|
||||
@include("layouts.partials.color-scheme")
|
||||
</div>
|
||||
|
||||
<livewire:user-dropdown />
|
||||
<x-dropdown align="right" width="48">
|
||||
<x-slot name="trigger">
|
||||
<button
|
||||
class="flex rounded-full text-sm focus:ring-4 focus:ring-gray-300 dark:focus:ring-gray-600"
|
||||
>
|
||||
<x-heroicon name="o-cog-6-tooth" class="h-8 w-8 rounded-full" />
|
||||
</button>
|
||||
</x-slot>
|
||||
<x-slot name="content">
|
||||
<div class="px-4 py-3" role="none">
|
||||
<p class="text-sm text-gray-900 dark:text-white" role="none">
|
||||
{{ auth()->user()->name }}
|
||||
</p>
|
||||
<p class="truncate text-sm font-medium text-gray-900 dark:text-gray-300" role="none">
|
||||
{{ auth()->user()->email }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<x-dropdown-link :href="route('profile')">
|
||||
{{ __("Profile") }}
|
||||
</x-dropdown-link>
|
||||
|
||||
<x-dropdown-link :href="route('projects')">
|
||||
{{ __("Projects") }}
|
||||
</x-dropdown-link>
|
||||
|
||||
<!-- Authentication -->
|
||||
<form method="POST" action="{{ route("logout") }}">
|
||||
@csrf
|
||||
<x-dropdown-link
|
||||
:href="route('logout')"
|
||||
onclick="event.preventDefault();this.closest('form').submit();"
|
||||
>
|
||||
{{ __("Log Out") }}
|
||||
</x-dropdown-link>
|
||||
</form>
|
||||
</x-slot>
|
||||
</x-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,42 +1,69 @@
|
||||
<div class="flex items-center text-gray-600 dark:text-gray-300" x-data="{
|
||||
theme: localStorage.theme,
|
||||
isDark() {
|
||||
if (this.theme === 'dark') {
|
||||
return true
|
||||
}
|
||||
return this.theme === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
},
|
||||
changeTheme(theme) {
|
||||
this.theme = theme;
|
||||
localStorage.theme = theme;
|
||||
this.updateDocument();
|
||||
},
|
||||
updateDocument() {
|
||||
if (this.isDark()) {
|
||||
document.documentElement.classList.add('dark')
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark')
|
||||
}
|
||||
}
|
||||
}" x-init="updateDocument()">
|
||||
<div
|
||||
class="flex items-center text-gray-600 dark:text-gray-300"
|
||||
x-data="{
|
||||
theme: localStorage.theme,
|
||||
isDark() {
|
||||
if (this.theme === 'dark') {
|
||||
return true
|
||||
}
|
||||
return (
|
||||
this.theme === 'system' &&
|
||||
window.matchMedia('(prefers-color-scheme: dark)').matches
|
||||
)
|
||||
},
|
||||
changeTheme(theme) {
|
||||
this.theme = theme
|
||||
localStorage.theme = theme
|
||||
this.updateDocument()
|
||||
document.body.dispatchEvent(
|
||||
new CustomEvent('color-scheme-changed', {
|
||||
detail: { theme: this.isDark() ? 'dark' : 'light' },
|
||||
}),
|
||||
)
|
||||
},
|
||||
updateDocument() {
|
||||
if (this.isDark()) {
|
||||
document.documentElement.classList.add('dark')
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark')
|
||||
}
|
||||
},
|
||||
}"
|
||||
x-init="updateDocument()"
|
||||
>
|
||||
<div class="flex items-center">
|
||||
<div class="flex items-center justify-end">
|
||||
<x-dropdown>
|
||||
<x-slot name="trigger">
|
||||
<button type="button" class="flex items-center">
|
||||
<x-heroicon-o-moon x-show="isDark()" class="h-7 w-7" />
|
||||
<x-heroicon-o-sun x-show="!isDark()" class="h-7 w-7" />
|
||||
<x-heroicon name="o-moon" x-show="isDark()" class="h-7 w-7" />
|
||||
<x-heroicon name="o-sun" x-show="!isDark()" class="h-7 w-7" />
|
||||
</button>
|
||||
</x-slot>
|
||||
<x-slot name="content">
|
||||
<x-dropdown-link class="cursor-pointer" x-on:click="changeTheme('dark')">
|
||||
<x-heroicon-o-moon class="h-5 w-5 mr-2" x-bind:class="theme === 'dark' ? 'text-primary-600' : ''" /> {{ __("Dark") }}
|
||||
<x-heroicon
|
||||
name="o-moon"
|
||||
class="mr-2 h-5 w-5"
|
||||
x-bind:class="theme === 'dark' ? 'text-primary-600' : ''"
|
||||
/>
|
||||
{{ __("Dark") }}
|
||||
</x-dropdown-link>
|
||||
<x-dropdown-link class="cursor-pointer" x-on:click="changeTheme('light')">
|
||||
<x-heroicon-o-sun class="h-5 w-5 mr-2" x-bind:class="theme === 'light' ? 'text-primary-600' : ''" /> {{ __("Light") }}
|
||||
<x-heroicon
|
||||
name="o-sun"
|
||||
class="mr-2 h-5 w-5"
|
||||
x-bind:class="theme === 'light' ? 'text-primary-600' : ''"
|
||||
/>
|
||||
{{ __("Light") }}
|
||||
</x-dropdown-link>
|
||||
<x-dropdown-link class="cursor-pointer" x-on:click="changeTheme('system')">
|
||||
<x-heroicon-o-computer-desktop class="h-5 w-5 mr-2" x-bind:class="theme === 'system' ? 'text-primary-600' : ''" /> {{ __("System") }}
|
||||
<x-heroicon
|
||||
name="o-computer-desktop"
|
||||
class="mr-2 h-5 w-5"
|
||||
x-bind:class="theme === 'system' ? 'text-primary-600' : ''"
|
||||
/>
|
||||
{{ __("System") }}
|
||||
</x-dropdown-link>
|
||||
</x-slot>
|
||||
</x-dropdown>
|
||||
|
@ -1,17 +1,17 @@
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/favicon/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="/favicon/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/favicon/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="/favicon/apple-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/favicon/apple-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="/favicon/apple-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/favicon/apple-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="/favicon/apple-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/favicon/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="/favicon/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
|
||||
<link rel="manifest" href="/favicon/manifest.json">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="msapplication-TileImage" content="/favicon/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/favicon/apple-icon-57x57.png" />
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="/favicon/apple-icon-60x60.png" />
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/favicon/apple-icon-72x72.png" />
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="/favicon/apple-icon-76x76.png" />
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/favicon/apple-icon-114x114.png" />
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="/favicon/apple-icon-120x120.png" />
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/favicon/apple-icon-144x144.png" />
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="/favicon/apple-icon-152x152.png" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-icon-180x180.png" />
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/favicon/android-icon-192x192.png" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png" />
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="/favicon/favicon-96x96.png" />
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png" />
|
||||
<link rel="manifest" href="/favicon/manifest.json" />
|
||||
<meta name="msapplication-TileColor" content="#ffffff" />
|
||||
<meta name="msapplication-TileImage" content="/favicon/ms-icon-144x144.png" />
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
|
@ -1,90 +1,35 @@
|
||||
<div x-data="projectCombobox()">
|
||||
<div class="relative">
|
||||
<div @click="open = !open" class="z-0 w-full cursor-pointer px-4 py-3 pr-10 text-md leading-5 text-gray-100 focus:ring-1 focus:ring-gray-700 bg-gray-900 rounded-md h-10 flex items-center" x-text="selected.name ?? 'Select Project'"></div>
|
||||
<button type="button" @click="open = !open" class="z-0 absolute inset-y-0 right-0 flex items-center pr-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="h-5 w-5 text-gray-400"><path fill-rule="evenodd" d="M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z" clip-rule="evenodd"></path></svg>
|
||||
</button>
|
||||
<div
|
||||
x-show="open"
|
||||
@click.away="open = false"
|
||||
class="z-10 absolute mt-1 w-full overflow-auto rounded-md pb-1 bg-white dark:bg-gray-700 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm">
|
||||
<div class="p-2 relative">
|
||||
<input x-model="query"
|
||||
@input="filterProjectsAndOpen"
|
||||
placeholder="Filter"
|
||||
class="w-full py-2 pl-3 pr-10 text-sm leading-5 dark:text-gray-100 focus:ring-1 focus:ring-gray-400 dark:focus:ring-800 bg-gray-200 dark:bg-gray-900 rounded-md"
|
||||
<div data-tooltip="Project" class="cursor-pointer">
|
||||
<x-dropdown align="left">
|
||||
<x-slot:trigger>
|
||||
<div>
|
||||
<div
|
||||
class="block w-full rounded-md border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-primary-500 dark:focus:ring-primary-500"
|
||||
>
|
||||
{{ auth()->user()->currentProject?->name ?? __("Select Project") }}
|
||||
</div>
|
||||
<button type="button" class="absolute inset-y-0 right-0 flex items-center pr-2">
|
||||
<x-heroicon name="o-chevron-down" class="h-4 w-4 text-gray-400" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="relative max-h-[350px] overflow-y-auto">
|
||||
<template x-for="(project, index) in filteredProjects" :key="index">
|
||||
<div
|
||||
@click="selectProject(project); open = false"
|
||||
:class="project.id === selected.id ? 'cursor-default bg-primary-600 text-white' : 'cursor-pointer'"
|
||||
class="relative select-none py-2 px-4 text-gray-700 dark:text-white hover:bg-primary-600 hover:text-white">
|
||||
<span class="block truncate" x-text="project.name"></span>
|
||||
<template x-if="project.id === selected.id">
|
||||
<span class="absolute inset-y-0 right-0 flex items-center pr-3 text-white">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="h-5 w-5"><path fill-rule="evenodd" d="M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z" clip-rule="evenodd"></path></svg>
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div
|
||||
x-show="filteredProjects.length === 0"
|
||||
class="relative cursor-default select-none py-2 px-4 text-gray-700 dark:text-white block truncate">
|
||||
No projects found!
|
||||
</div>
|
||||
<div class="py-1">
|
||||
<hr class="border-gray-300 dark:border-gray-600">
|
||||
</div>
|
||||
<div>
|
||||
<a
|
||||
href="{{ route('projects') }}"
|
||||
class="relative select-none py-2 px-4 text-gray-700 dark:text-white hover:bg-primary-600 hover:text-white block cursor-pointer">
|
||||
<span class="block truncate">Projects List</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a
|
||||
href="{{ route('projects', ['create' => true]) }}"
|
||||
class="relative select-none py-2 px-4 text-gray-700 dark:text-white hover:bg-primary-600 hover:text-white block cursor-pointer">
|
||||
<span class="block truncate">Create a Project</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-slot>
|
||||
<x-slot:content>
|
||||
@foreach (auth()->user()->projects as $project)
|
||||
<x-dropdown-link class="relative" :href="route('projects.switch', ['project' => $project])">
|
||||
<span class="block truncate">{{ ucfirst($project->name) }}</span>
|
||||
@if ($project->id == auth()->user()->current_project_id)
|
||||
<span class="absolute inset-y-0 right-0 flex items-center pr-3 text-primary-600">
|
||||
<x-heroicon name="o-check" class="h-5 w-5" />
|
||||
</span>
|
||||
@endif
|
||||
</x-dropdown-link>
|
||||
@endforeach
|
||||
|
||||
<script>
|
||||
function projectCombobox() {
|
||||
const projects = @json(auth()->user()->projects()->select('id', 'name')->get());
|
||||
return {
|
||||
open: false,
|
||||
query: '',
|
||||
projects: projects,
|
||||
selected: @if(isset($project)) @json($project->only('id', 'name')) @else {} @endif,
|
||||
filteredProjects: projects,
|
||||
selectProject(project) {
|
||||
if (this.selected.id !== project.id) {
|
||||
this.selected = project;
|
||||
window.location.href = '{{ url('/settings/projects/') }}/' + project.id
|
||||
}
|
||||
},
|
||||
filterProjectsAndOpen() {
|
||||
if (this.query === '') {
|
||||
this.filteredProjects = this.projects;
|
||||
this.open = false;
|
||||
} else {
|
||||
this.filteredProjects = this.projects.filter((project) =>
|
||||
project.name
|
||||
.toLowerCase()
|
||||
.replace(/\s+/g, '')
|
||||
.includes(this.query.toLowerCase().replace(/\s+/g, ''))
|
||||
);
|
||||
this.open = true;
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<x-dropdown-link href="{{ route('projects') }}">
|
||||
{{ __("Projects List") }}
|
||||
</x-dropdown-link>
|
||||
<x-dropdown-link href="{{ route('projects', ['create' => 'open']) }}">
|
||||
{{ __("Create a Project") }}
|
||||
</x-dropdown-link>
|
||||
</x-slot>
|
||||
</x-dropdown>
|
||||
</div>
|
||||
|
193
resources/views/layouts/partials/search.blade.php
Normal file
193
resources/views/layouts/partials/search.blade.php
Normal file
@ -0,0 +1,193 @@
|
||||
<div
|
||||
x-data="{
|
||||
open: false,
|
||||
isTyping: false,
|
||||
focused: false,
|
||||
searchQuery: '',
|
||||
isLoading: false,
|
||||
searchResult: [],
|
||||
noResults: false,
|
||||
showResults: false,
|
||||
keyUp: false,
|
||||
focusedItem: null,
|
||||
init() {
|
||||
document.onkeydown = (e) => {
|
||||
if (e.key === '/') {
|
||||
if (
|
||||
! document.activeElement.type ||
|
||||
document.activeElement.type === 'undefined'
|
||||
) {
|
||||
this.openSearch()
|
||||
}
|
||||
}
|
||||
if (e.key === 'Escape') {
|
||||
this.close()
|
||||
} else {
|
||||
this.changeFocus(e.code)
|
||||
}
|
||||
}
|
||||
$watch(
|
||||
'searchQuery',
|
||||
this.debounce(() => {
|
||||
this.isTyping = false
|
||||
}, 700),
|
||||
)
|
||||
$watch('isTyping', (value) => {
|
||||
if (! value && this.keyUp && this.searchQuery.length > 0) {
|
||||
this.search(this.searchQuery)
|
||||
}
|
||||
if (! value && this.searchQuery.length === 0) {
|
||||
this.showResults = false
|
||||
this.searchResult = []
|
||||
}
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.open = false
|
||||
this.isLoading = false
|
||||
this.focused = false
|
||||
this.focusedItem = null
|
||||
document.body.classList.remove('overflow-y-hidden')
|
||||
},
|
||||
openSearch() {
|
||||
this.open = true
|
||||
document.body.classList.add('overflow-y-hidden')
|
||||
setTimeout(() => {
|
||||
this.$refs.input.select()
|
||||
}, 50)
|
||||
},
|
||||
search(searchQuery) {
|
||||
this.showResults = true
|
||||
this.noResults = false
|
||||
this.isLoading = true
|
||||
fetch('/search?q=' + searchQuery)
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
this.searchResult = data.results
|
||||
if (this.searchResult.length === 0) {
|
||||
this.noResults = true
|
||||
}
|
||||
this.keyUp = false
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error)
|
||||
})
|
||||
.then(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
keyEntered(e) {
|
||||
this.keyUp = true
|
||||
if (e.code === 'Escape') {
|
||||
this.close()
|
||||
}
|
||||
this.changeFocus(e.code)
|
||||
},
|
||||
changeFocus(type) {
|
||||
if (type === 'Backspace' && this.open && ! this.focused) {
|
||||
setTimeout(() => {
|
||||
this.$refs.input.select()
|
||||
}, 100)
|
||||
}
|
||||
if (type === 'ArrowDown') {
|
||||
if (this.searchResult.length > 0) {
|
||||
if (this.focusedItem !== null) {
|
||||
if (this.focusedItem < this.searchResult.length - 1) {
|
||||
this.focusedItem++
|
||||
}
|
||||
} else {
|
||||
this.focusedItem = 0
|
||||
}
|
||||
document.getElementById(`result-${this.focusedItem}`).focus()
|
||||
}
|
||||
}
|
||||
if (type === 'ArrowUp') {
|
||||
if (this.searchResult.length > 0) {
|
||||
if (this.focusedItem !== null) {
|
||||
if (this.focusedItem > 0) {
|
||||
this.focusedItem--
|
||||
}
|
||||
document
|
||||
.getElementById(`result-${this.focusedItem}`)
|
||||
.focus()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
debounce(func, wait, immediate) {
|
||||
let timeout
|
||||
return function () {
|
||||
const context = this,
|
||||
args = arguments
|
||||
const later = function () {
|
||||
timeout = null
|
||||
if (! immediate) func.apply(context, args)
|
||||
}
|
||||
const callNow = immediate && ! timeout
|
||||
clearTimeout(timeout)
|
||||
timeout = setTimeout(later, wait)
|
||||
if (callNow) func.apply(context, args)
|
||||
}
|
||||
},
|
||||
}"
|
||||
@open-search.window="openSearch"
|
||||
>
|
||||
<div x-show="open" class="absolute bottom-0 left-0 right-0 top-0 flex max-w-full items-start justify-center">
|
||||
<div
|
||||
x-on:click="close"
|
||||
class="fixed inset-0 bottom-0 left-0 right-0 top-0 z-[1000] items-center bg-gray-500 opacity-75 dark:bg-gray-900"
|
||||
></div>
|
||||
<div class="absolute z-[1000] mt-20 lg:scale-110">
|
||||
<div class="w-[500px]">
|
||||
<x-text-input
|
||||
id="search-input"
|
||||
x-ref="input"
|
||||
@focus="focused = true"
|
||||
@blur="focused = false"
|
||||
type="text"
|
||||
class="w-full"
|
||||
@input="isTyping = true"
|
||||
x-model="searchQuery"
|
||||
placeholder="Search something..."
|
||||
@keyup="keyEntered"
|
||||
autocomplete="off"
|
||||
></x-text-input>
|
||||
<div
|
||||
x-show="showResults"
|
||||
class="list-none divide-y divide-gray-100 rounded-md bg-white py-1 text-base shadow ring-1 ring-black ring-opacity-5 dark:divide-gray-700/50 dark:bg-gray-800"
|
||||
>
|
||||
<div x-show="isLoading" class="w-full px-3 py-2 text-sm text-gray-800 dark:text-gray-300">
|
||||
Please wait
|
||||
</div>
|
||||
<div
|
||||
x-show="!isLoading && noResults"
|
||||
class="w-full px-3 py-2 text-sm text-gray-800 dark:text-gray-300"
|
||||
>
|
||||
No results
|
||||
</div>
|
||||
<template x-for="(item, index) in searchResult">
|
||||
<button
|
||||
x-bind:id="`result-${index}`"
|
||||
class="flex w-full items-center justify-between p-3 text-left text-sm leading-5 text-gray-700 transition duration-150 ease-in-out hover:bg-gray-100 focus:bg-gray-100 focus:outline-none dark:text-gray-300 dark:hover:bg-gray-700/50 dark:focus:bg-gray-700"
|
||||
x-on:click="window.location.href = item.url"
|
||||
>
|
||||
<div class="font-semibold text-primary-500" x-text="item.text"></div>
|
||||
<div class="flex items-center">
|
||||
<span
|
||||
class="mr-1 rounded-xl bg-gray-100 px-2 text-gray-500 dark:bg-gray-700 dark:text-gray-400"
|
||||
x-text="item.project"
|
||||
data-tooltip="Project"
|
||||
></span>
|
||||
<span
|
||||
class="rounded-xl bg-primary-100 px-2 text-primary-500 dark:bg-primary-500 dark:bg-opacity-10"
|
||||
x-text="item.type"
|
||||
data-tooltip="Type"
|
||||
></span>
|
||||
</div>
|
||||
</button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,90 +1,35 @@
|
||||
<div x-data="serverCombobox()">
|
||||
<div class="relative">
|
||||
<div @click="open = !open" class="z-0 w-full cursor-pointer px-4 py-3 pr-10 text-md leading-5 text-gray-100 focus:ring-1 focus:ring-gray-700 bg-gray-900 rounded-md h-10 flex items-center" x-text="selected.name ?? 'Select Server'"></div>
|
||||
<button type="button" @click="open = !open" class="z-0 absolute inset-y-0 right-0 flex items-center pr-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="h-5 w-5 text-gray-400"><path fill-rule="evenodd" d="M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z" clip-rule="evenodd"></path></svg>
|
||||
</button>
|
||||
<div
|
||||
x-show="open"
|
||||
@click.away="open = false"
|
||||
class="z-10 absolute mt-1 w-full overflow-auto rounded-md pb-1 bg-white dark:bg-gray-700 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm">
|
||||
<div class="p-2 relative">
|
||||
<input x-model="query"
|
||||
@input="filterServersAndOpen"
|
||||
placeholder="Filter"
|
||||
class="w-full py-2 pl-3 pr-10 text-sm leading-5 dark:text-gray-100 focus:ring-1 focus:ring-gray-400 dark:focus:ring-800 bg-gray-200 dark:bg-gray-900 rounded-md"
|
||||
<div data-tooltip="Servers" class="cursor-pointer">
|
||||
<x-dropdown width="full">
|
||||
<x-slot:trigger>
|
||||
<div>
|
||||
<div
|
||||
class="block w-full rounded-md border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-primary-500 dark:focus:ring-primary-500"
|
||||
>
|
||||
{{ isset($server) ? $server->name : "Select Server" }}
|
||||
</div>
|
||||
<button type="button" class="absolute inset-y-0 right-0 flex items-center pr-2">
|
||||
<x-heroicon name="o-chevron-down" class="h-4 w-4 text-gray-400" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="relative max-h-[350px] overflow-y-auto">
|
||||
<template x-for="(server, index) in filteredServers" :key="index">
|
||||
<div
|
||||
@click="selectServer(server); open = false"
|
||||
:class="server.id === selected.id ? 'cursor-default bg-primary-600 text-white' : 'cursor-pointer'"
|
||||
class="relative select-none py-2 px-4 text-gray-700 dark:text-white hover:bg-primary-600 hover:text-white">
|
||||
<span class="block truncate" x-text="server.name"></span>
|
||||
<template x-if="server.id === selected.id">
|
||||
<span class="absolute inset-y-0 right-0 flex items-center pr-3 text-white">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="h-5 w-5"><path fill-rule="evenodd" d="M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z" clip-rule="evenodd"></path></svg>
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div
|
||||
x-show="filteredServers.length === 0"
|
||||
class="relative cursor-default select-none py-2 px-4 text-gray-700 dark:text-white block truncate">
|
||||
No servers found!
|
||||
</div>
|
||||
<div class="py-1">
|
||||
<hr class="border-gray-300 dark:border-gray-600">
|
||||
</div>
|
||||
<div>
|
||||
<a
|
||||
href="{{ route('servers') }}"
|
||||
class="relative select-none py-2 px-4 text-gray-700 dark:text-white hover:bg-primary-600 hover:text-white block @if(request()->routeIs('servers')) cursor-default bg-primary-600 text-white @else cursor-pointer @endif">
|
||||
<span class="block truncate">Servers List</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a
|
||||
href="{{ route('servers.create') }}"
|
||||
class="relative select-none py-2 px-4 text-gray-700 dark:text-white hover:bg-primary-600 hover:text-white block @if(request()->routeIs('servers.create')) cursor-default bg-primary-600 text-white @else cursor-pointer @endif">
|
||||
<span class="block truncate">Create a Server</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-slot>
|
||||
<x-slot:content>
|
||||
@foreach (auth()->user()->currentProject->servers as $s)
|
||||
<x-dropdown-link class="relative" :href="route('servers.show', ['server' => $s])">
|
||||
<span class="block truncate">{{ ucfirst($s->name) }}</span>
|
||||
@if (isset($server) && $server->id == $s->id)
|
||||
<span class="absolute inset-y-0 right-0 flex items-center pr-3 text-primary-600">
|
||||
<x-heroicon name="o-check" class="h-5 w-5" />
|
||||
</span>
|
||||
@endif
|
||||
</x-dropdown-link>
|
||||
@endforeach
|
||||
|
||||
<script>
|
||||
function serverCombobox() {
|
||||
const servers = @json(auth()->user()->currentProject->servers()->select('id', 'name')->get());
|
||||
return {
|
||||
open: false,
|
||||
query: '',
|
||||
servers: servers,
|
||||
selected: @if(isset($server)) @json($server->only('id', 'name')) @else {} @endif,
|
||||
filteredServers: servers,
|
||||
selectServer(server) {
|
||||
if (this.selected.id !== server.id) {
|
||||
this.selected = server;
|
||||
window.location.href = '{{ url('/servers/') }}/' + server.id
|
||||
}
|
||||
},
|
||||
filterServersAndOpen() {
|
||||
if (this.query === '') {
|
||||
this.filteredServers = this.servers;
|
||||
this.open = false;
|
||||
} else {
|
||||
this.filteredServers = this.servers.filter((server) =>
|
||||
server.name
|
||||
.toLowerCase()
|
||||
.replace(/\s+/g, '')
|
||||
.includes(this.query.toLowerCase().replace(/\s+/g, ''))
|
||||
);
|
||||
this.open = true;
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<x-dropdown-link href="{{ route('servers') }}">
|
||||
{{ __("Servers List") }}
|
||||
</x-dropdown-link>
|
||||
<x-dropdown-link href="{{ route('servers.create') }}">
|
||||
{{ __("Create a Server") }}
|
||||
</x-dropdown-link>
|
||||
</x-slot>
|
||||
</x-dropdown>
|
||||
</div>
|
||||
|
@ -1,30 +1,61 @@
|
||||
<div x-data="siteCombobox()">
|
||||
<div class="relative">
|
||||
<div @click="open = !open" class="w-full cursor-pointer px-4 py-3 pr-10 text-md leading-5 dark:text-gray-100 focus:ring-1 focus:ring-gray-700 bg-gray-200 dark:bg-gray-800 rounded-md h-10 flex items-center" x-text="selected.domain ?? 'Select Site'"></div>
|
||||
<div
|
||||
@click="open = !open"
|
||||
class="text-md flex h-10 w-full cursor-pointer items-center rounded-md bg-gray-200 px-4 py-3 pr-10 leading-5 focus:ring-1 focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-100"
|
||||
x-text="selected.domain ?? 'Select Site'"
|
||||
></div>
|
||||
<button type="button" @click="open = !open" class="absolute inset-y-0 right-0 flex items-center pr-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="h-5 w-5 text-gray-400"><path fill-rule="evenodd" d="M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z" clip-rule="evenodd"></path></svg>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor"
|
||||
aria-hidden="true"
|
||||
class="h-5 w-5 text-gray-400"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
d="M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z"
|
||||
clip-rule="evenodd"
|
||||
></path>
|
||||
</svg>
|
||||
</button>
|
||||
<div
|
||||
x-show="open"
|
||||
@click.away="open = false"
|
||||
class="absolute mt-1 w-full overflow-auto rounded-md pb-1 bg-white dark:bg-gray-700 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm">
|
||||
<div class="p-2 relative">
|
||||
<input x-model="query"
|
||||
@input="filterSitesAndOpen"
|
||||
placeholder="Filter"
|
||||
class="w-full py-2 pl-3 pr-10 text-sm leading-5 dark:text-gray-100 focus:ring-1 focus:ring-gray-400 dark:focus:ring-800 bg-gray-200 dark:bg-gray-800 rounded-md"
|
||||
>
|
||||
class="absolute mt-1 w-full overflow-auto rounded-md bg-white pb-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-gray-700 sm:text-sm"
|
||||
>
|
||||
<div class="relative p-2">
|
||||
<input
|
||||
x-model="query"
|
||||
@input="filterSitesAndOpen"
|
||||
placeholder="Filter"
|
||||
class="dark:focus:ring-800 w-full rounded-md bg-gray-200 py-2 pl-3 pr-10 text-sm leading-5 focus:ring-1 focus:ring-gray-400 dark:bg-gray-800 dark:text-gray-100"
|
||||
/>
|
||||
</div>
|
||||
<div class="relative max-h-[350px] overflow-y-auto">
|
||||
<template x-for="(site, index) in filteredSites" :key="index">
|
||||
<div
|
||||
@click="selectSite(site); open = false"
|
||||
:class="site.id === selected.id ? 'cursor-default bg-primary-600 text-white' : 'cursor-pointer'"
|
||||
class="relative select-none py-2 px-4 text-gray-700 dark:text-white hover:bg-primary-600 hover:text-white">
|
||||
class="relative select-none px-4 py-2 text-gray-700 hover:bg-primary-600 hover:text-white dark:text-white"
|
||||
>
|
||||
<span class="block truncate" x-text="site.domain"></span>
|
||||
<template x-if="site.id === selected.id">
|
||||
<span class="absolute inset-y-0 right-0 flex items-center pr-3 text-white">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="h-5 w-5"><path fill-rule="evenodd" d="M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z" clip-rule="evenodd"></path></svg>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor"
|
||||
aria-hidden="true"
|
||||
class="h-5 w-5"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
d="M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z"
|
||||
clip-rule="evenodd"
|
||||
></path>
|
||||
</svg>
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
@ -32,23 +63,26 @@ class="relative select-none py-2 px-4 text-gray-700 dark:text-white hover:bg-pri
|
||||
</div>
|
||||
<div
|
||||
x-show="filteredSites.length === 0"
|
||||
class="relative cursor-default select-none py-2 px-4 text-gray-700 dark:text-white block truncate">
|
||||
class="relative block cursor-default select-none truncate px-4 py-2 text-gray-700 dark:text-white"
|
||||
>
|
||||
No sites found!
|
||||
</div>
|
||||
<div class="py-1">
|
||||
<hr class="border-gray-300 dark:border-gray-600">
|
||||
<hr class="border-gray-300 dark:border-gray-600" />
|
||||
</div>
|
||||
<div>
|
||||
<a
|
||||
href="{{ route('servers.sites', ['server' => $server]) }}"
|
||||
class="relative select-none py-2 px-4 text-gray-700 dark:text-white hover:bg-primary-600 hover:text-white block @if(request()->routeIs('sites')) cursor-default bg-primary-600 text-white @else cursor-pointer @endif">
|
||||
href="{{ route("servers.sites", ["server" => $server]) }}"
|
||||
class="@if(request()->routeIs('sites')) cursor-default bg-primary-600 text-white @else cursor-pointer @endif relative block select-none px-4 py-2 text-gray-700 hover:bg-primary-600 hover:text-white dark:text-white"
|
||||
>
|
||||
<span class="block truncate">Sites List</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a
|
||||
href="{{ route('servers.sites.create', ['server' => $server]) }}"
|
||||
class="relative select-none py-2 px-4 text-gray-700 dark:text-white hover:bg-primary-600 hover:text-white block @if(request()->routeIs('sites.create')) cursor-default bg-primary-600 text-white @else cursor-pointer @endif">
|
||||
href="{{ route("servers.sites.create", ["server" => $server]) }}"
|
||||
class="@if(request()->routeIs('sites.create')) cursor-default bg-primary-600 text-white @else cursor-pointer @endif relative block select-none px-4 py-2 text-gray-700 hover:bg-primary-600 hover:text-white dark:text-white"
|
||||
>
|
||||
<span class="block truncate">Create a Site</span>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -1,60 +1,8 @@
|
||||
<x-app-layout>
|
||||
@if(isset($pageTitle))
|
||||
@if (isset($pageTitle))
|
||||
<x-slot name="pageTitle">{{ $pageTitle }}</x-slot>
|
||||
@endif
|
||||
|
||||
<x-slot name="sidebar">
|
||||
<div class="flex items-center justify-center py-2 px-3 h-16 border-b border-gray-200 dark:border-gray-800">
|
||||
<div class="w-full">
|
||||
<span>Account Settings</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-3 space-y-2">
|
||||
<x-secondary-sidebar-link :href="route('profile')" :active="request()->routeIs('profile')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 mr-2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M17.982 18.725A7.488 7.488 0 0012 15.75a7.488 7.488 0 00-5.982 2.975m11.963 0a9 9 0 10-11.963 0m11.963 0A8.966 8.966 0 0112 21a8.966 8.966 0 01-5.982-2.275M15 9.75a3 3 0 11-6 0 3 3 0 016 0z" />
|
||||
</svg>
|
||||
{{ __('Profile') }}
|
||||
</x-secondary-sidebar-link>
|
||||
<x-secondary-sidebar-link :href="route('projects')" :active="request()->routeIs('projects')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 mr-2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m7.875 14.25 1.214 1.942a2.25 2.25 0 0 0 1.908 1.058h2.006c.776 0 1.497-.4 1.908-1.058l1.214-1.942M2.41 9h4.636a2.25 2.25 0 0 1 1.872 1.002l.164.246a2.25 2.25 0 0 0 1.872 1.002h2.092a2.25 2.25 0 0 0 1.872-1.002l.164-.246A2.25 2.25 0 0 1 16.954 9h4.636M2.41 9a2.25 2.25 0 0 0-.16.832V12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 12V9.832c0-.287-.055-.57-.16-.832M2.41 9a2.25 2.25 0 0 1 .382-.632l3.285-3.832a2.25 2.25 0 0 1 1.708-.786h8.43c.657 0 1.281.287 1.709.786l3.284 3.832c.163.19.291.404.382.632M4.5 20.25h15A2.25 2.25 0 0 0 21.75 18v-2.625c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125V18a2.25 2.25 0 0 0 2.25 2.25Z" />
|
||||
</svg>
|
||||
{{ __('Projects') }}
|
||||
</x-secondary-sidebar-link>
|
||||
<x-secondary-sidebar-link :href="route('server-providers')" :active="request()->routeIs('server-providers')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 mr-2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M5.25 14.25h13.5m-13.5 0a3 3 0 01-3-3m3 3a3 3 0 100 6h13.5a3 3 0 100-6m-16.5-3a3 3 0 013-3h13.5a3 3 0 013 3m-19.5 0a4.5 4.5 0 01.9-2.7L5.737 5.1a3.375 3.375 0 012.7-1.35h7.126c1.062 0 2.062.5 2.7 1.35l2.587 3.45a4.5 4.5 0 01.9 2.7m0 0a3 3 0 01-3 3m0 3h.008v.008h-.008v-.008zm0-6h.008v.008h-.008v-.008zm-3 6h.008v.008h-.008v-.008zm0-6h.008v.008h-.008v-.008z" />
|
||||
</svg>
|
||||
{{ __('Server Providers') }}
|
||||
</x-secondary-sidebar-link>
|
||||
<x-secondary-sidebar-link :href="route('source-controls')" :active="request()->routeIs('source-controls')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 mr-2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M14.25 9.75L16.5 12l-2.25 2.25m-4.5 0L7.5 12l2.25-2.25M6 20.25h12A2.25 2.25 0 0020.25 18V6A2.25 2.25 0 0018 3.75H6A2.25 2.25 0 003.75 6v12A2.25 2.25 0 006 20.25z" />
|
||||
</svg>
|
||||
{{ __('Source Controls') }}
|
||||
</x-secondary-sidebar-link>
|
||||
<x-secondary-sidebar-link :href="route('storage-providers')" :active="request()->routeIs('storage-providers')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 mr-2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125" />
|
||||
</svg>
|
||||
{{ __('Storage Providers') }}
|
||||
</x-secondary-sidebar-link>
|
||||
<x-secondary-sidebar-link :href="route('notification-channels')" :active="request()->routeIs('notification-channels')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 mr-2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0" />
|
||||
</svg>
|
||||
{{ __('Notification Channels') }}
|
||||
</x-secondary-sidebar-link>
|
||||
<x-secondary-sidebar-link :href="route('ssh-keys')" :active="request()->routeIs('ssh-keys')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 mr-2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z" />
|
||||
</svg>
|
||||
{{ __('SSH Keys') }}
|
||||
</x-secondary-sidebar-link>
|
||||
</div>
|
||||
</x-slot>
|
||||
|
||||
<x-container class="flex">
|
||||
<div class="w-full">
|
||||
{{ $slot }}
|
||||
|
@ -1,18 +1,28 @@
|
||||
<x-app-layout :server="$server">
|
||||
@if(isset($pageTitle))
|
||||
@if (isset($pageTitle))
|
||||
<x-slot name="pageTitle">{{ $pageTitle }} - {{ $server->name }}</x-slot>
|
||||
@endif
|
||||
|
||||
<x-slot name="header">
|
||||
<h2 class="text-lg font-semibold">{{ $server->name }}</h2>
|
||||
<div class="flex flex-col items-end">
|
||||
<livewire:servers.server-status :server="$server" />
|
||||
<x-input-label class="cursor-pointer mt-1" x-data="{ copied: false }" x-clipboard.raw="{{ $server->ip }}">
|
||||
<div class="text-sm flex items-center" x-on:click="copied = true; setTimeout(() => {copied = false}, 2000)">
|
||||
<div x-show="copied" class="flex items-center mr-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4 text-primary-600 dark:text-white font-bold">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0118 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3l1.5 1.5 3-3.75" />
|
||||
</svg>
|
||||
@include("servers.partials.server-status")
|
||||
<x-input-label class="mt-1 cursor-pointer" x-data="{ copied: false }">
|
||||
<div
|
||||
class="flex items-center text-sm"
|
||||
x-on:click="
|
||||
window.copyToClipboard('{{ $server->ip }}')
|
||||
copied = true
|
||||
setTimeout(() => {
|
||||
copied = false
|
||||
}, 2000)
|
||||
"
|
||||
>
|
||||
<div x-show="copied" class="mr-1 flex items-center">
|
||||
<x-heroicon
|
||||
name="o-clipboard-document-check"
|
||||
class="h-4 w-4 font-bold text-primary-600 dark:text-white"
|
||||
/>
|
||||
</div>
|
||||
{{ $server->ip }}
|
||||
</div>
|
||||
@ -20,7 +30,7 @@
|
||||
</div>
|
||||
</x-slot>
|
||||
|
||||
@if(isset($sidebar))
|
||||
@if (isset($sidebar))
|
||||
<x-slot name="sidebar">
|
||||
{{ $sidebar }}
|
||||
</x-slot>
|
||||
|
192
resources/views/layouts/sidebar.blade.php
Normal file
192
resources/views/layouts/sidebar.blade.php
Normal file
@ -0,0 +1,192 @@
|
||||
<aside
|
||||
id="logo-sidebar"
|
||||
class="fixed left-0 top-0 z-40 h-screen w-64 -translate-x-full border-r border-gray-200 bg-white pt-20 transition-transform dark:border-gray-700 dark:bg-gray-800 sm:translate-x-0"
|
||||
aria-label="Sidebar"
|
||||
>
|
||||
<div class="h-full overflow-y-auto bg-white px-3 pb-4 dark:bg-gray-800">
|
||||
<ul class="space-y-2 font-medium">
|
||||
<li x-data="">
|
||||
@include("layouts.partials.project-select")
|
||||
</li>
|
||||
<x-hr />
|
||||
<li>
|
||||
@include("layouts.partials.server-select")
|
||||
</li>
|
||||
<x-hr />
|
||||
@if (isset($server))
|
||||
<li>
|
||||
<x-sidebar-link
|
||||
:href="route('servers.show', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.show')"
|
||||
>
|
||||
<x-heroicon name="o-home" class="h-6 w-6" />
|
||||
<span class="ml-2">Overview</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
@if ($server->webserver())
|
||||
<li>
|
||||
<x-sidebar-link
|
||||
:href="route('servers.sites', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.sites') || request()->is('servers/*/sites/*')"
|
||||
>
|
||||
<x-heroicon name="o-globe-alt" class="h-6 w-6" />
|
||||
<span class="ml-2">
|
||||
{{ __("Sites") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($server->database())
|
||||
<li>
|
||||
<x-sidebar-link
|
||||
:href="route('servers.databases', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.databases') ||
|
||||
request()->routeIs('servers.databases.backups')"
|
||||
>
|
||||
<x-heroicon name="o-circle-stack" class="h-6 w-6" />
|
||||
<span class="ml-2">
|
||||
{{ __("Databases") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($server->php())
|
||||
<li>
|
||||
<x-sidebar-link
|
||||
:href="route('servers.php', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.php')"
|
||||
>
|
||||
<x-heroicon name="o-code-bracket" class="h-6 w-6" />
|
||||
<span class="ml-2">
|
||||
{{ __("PHP") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($server->firewall())
|
||||
<li>
|
||||
<x-sidebar-link
|
||||
:href="route('servers.firewall', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.firewall')"
|
||||
>
|
||||
<x-heroicon name="o-fire" class="h-6 w-6" />
|
||||
<span class="ml-2">
|
||||
{{ __("Firewall") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
<li>
|
||||
<x-sidebar-link
|
||||
:href="route('servers.cronjobs', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.cronjobs')"
|
||||
>
|
||||
<x-heroicon name="o-clock" class="h-6 w-6" />
|
||||
<span class="ml-2">
|
||||
{{ __("Cronjobs") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<x-sidebar-link
|
||||
:href="route('servers.ssh-keys', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.ssh-keys')"
|
||||
>
|
||||
<x-heroicon name="o-key" class="h-6 w-6" />
|
||||
<span class="ml-2">
|
||||
{{ __("Server SSH Keys") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<x-sidebar-link
|
||||
:href="route('servers.services', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.services')"
|
||||
>
|
||||
<x-heroicon name="o-cog-6-tooth" class="h-6 w-6" />
|
||||
<span class="ml-2">
|
||||
{{ __("Services") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<x-sidebar-link
|
||||
:href="route('servers.settings', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.settings')"
|
||||
>
|
||||
<x-heroicon name="o-wrench-screwdriver" class="h-6 w-6" />
|
||||
<span class="ml-2">
|
||||
{{ __("Settings") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<x-sidebar-link
|
||||
:href="route('servers.logs', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.logs')"
|
||||
>
|
||||
<x-heroicon name="o-square-3-stack-3d" class="h-6 w-6" />
|
||||
<span class="ml-2">
|
||||
{{ __("Logs") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
<x-hr />
|
||||
@endif
|
||||
|
||||
<li>
|
||||
<x-sidebar-link :href="route('profile')" :active="request()->routeIs('profile')">
|
||||
<x-heroicon name="o-user-circle" class="h-6 w-6" />
|
||||
<span class="ml-2">Profile</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
<li>
|
||||
<x-sidebar-link :href="route('projects')" :active="request()->routeIs('projects')">
|
||||
<x-heroicon name="o-inbox-stack" class="h-6 w-6" />
|
||||
<span class="ml-2">Projects</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
<li>
|
||||
<x-sidebar-link :href="route('server-providers')" :active="request()->routeIs('server-providers')">
|
||||
<x-heroicon name="o-server-stack" class="h-6 w-6" />
|
||||
<span class="ml-2">Server Providers</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
<li>
|
||||
<x-sidebar-link :href="route('source-controls')" :active="request()->routeIs('source-controls')">
|
||||
<x-heroicon name="o-code-bracket" class="h-6 w-6" />
|
||||
<span class="ml-2">Source Controls</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
<li>
|
||||
<x-sidebar-link :href="route('storage-providers')" :active="request()->routeIs('storage-providers')">
|
||||
<x-heroicon name="o-circle-stack" class="h-6 w-6" />
|
||||
<span class="ml-2">Storage Providers</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
<li>
|
||||
<x-sidebar-link
|
||||
:href="route('notification-channels')"
|
||||
:active="request()->routeIs('notification-channels')"
|
||||
>
|
||||
<x-heroicon name="o-bell" class="h-6 w-6" />
|
||||
<span class="ml-2">Notification Channels</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
<li>
|
||||
<x-sidebar-link :href="route('ssh-keys')" :active="request()->routeIs('ssh-keys')">
|
||||
<x-heroicon name="o-key" class="h-6 w-6" />
|
||||
<span class="ml-2">SSH Keys</span>
|
||||
</x-sidebar-link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</aside>
|
@ -1,46 +1,167 @@
|
||||
@php use App\Enums\SiteFeature; @endphp
|
||||
@php
|
||||
use App\Enums\SiteFeature;
|
||||
@endphp
|
||||
|
||||
<x-app-layout :server="$site->server">
|
||||
@if(isset($pageTitle))
|
||||
@if (isset($pageTitle))
|
||||
<x-slot name="pageTitle">{{ $site->domain }} - {{ $pageTitle }}</x-slot>
|
||||
@endif
|
||||
|
||||
<x-slot name="header">
|
||||
<h2 class="text-lg font-semibold">
|
||||
<a href="{{ $site->activeSsl ? 'https://' : 'http://' . $site->domain }}" target="_blank">{{ $site->domain }}</a>
|
||||
</h2>
|
||||
<div class="hidden md:flex md:items-center md:justify-start">
|
||||
<x-tab-item
|
||||
class="mr-1"
|
||||
:href="route('servers.sites.show', ['server' => $site->server, 'site' => $site])"
|
||||
:active="request()->routeIs('servers.sites.show')"
|
||||
>
|
||||
<x-heroicon name="o-globe-alt" class="h-5 w-5" />
|
||||
<span class="ml-2 hidden xl:block">Application</span>
|
||||
</x-tab-item>
|
||||
@if ($site->hasFeature(SiteFeature::SSL))
|
||||
<x-tab-item
|
||||
class="mr-1"
|
||||
:href="route('servers.sites.ssl', ['server' => $site->server, 'site' => $site])"
|
||||
:active="request()->routeIs('servers.sites.ssl')"
|
||||
>
|
||||
<x-heroicon name="o-lock-closed" class="h-5 w-5" />
|
||||
<span class="ml-2 hidden xl:block">SSL</span>
|
||||
</x-tab-item>
|
||||
@endif
|
||||
|
||||
@if ($site->hasFeature(SiteFeature::QUEUES))
|
||||
<x-tab-item
|
||||
class="mr-1"
|
||||
:href="route('servers.sites.queues', ['server' => $site->server, 'site' => $site])"
|
||||
:active="request()->routeIs('servers.sites.queues')"
|
||||
>
|
||||
<x-heroicon name="o-queue-list" class="h-5 w-5" />
|
||||
<span class="ml-2 hidden xl:block">Queues</span>
|
||||
</x-tab-item>
|
||||
@endif
|
||||
|
||||
<x-tab-item
|
||||
class="mr-1"
|
||||
:href="route('servers.sites.settings', ['server' => $site->server, 'site' => $site])"
|
||||
:active="request()->routeIs('servers.sites.settings')"
|
||||
>
|
||||
<x-heroicon name="o-cog-6-tooth" class="h-5 w-5" />
|
||||
<span class="ml-2 hidden xl:block">Settings</span>
|
||||
</x-tab-item>
|
||||
<x-tab-item
|
||||
class="mr-1"
|
||||
:href="route('servers.sites.logs', ['server' => $site->server, 'site' => $site])"
|
||||
:active="request()->routeIs('servers.sites.logs')"
|
||||
>
|
||||
<x-heroicon name="o-square-3-stack-3d" class="h-5 w-5" />
|
||||
<span class="ml-2 hidden xl:block">Logs</span>
|
||||
</x-tab-item>
|
||||
</div>
|
||||
<div class="md:hidden">
|
||||
<x-dropdown align="left">
|
||||
<x-slot name="trigger">
|
||||
<div
|
||||
class="flex w-full cursor-pointer items-center rounded-md border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-primary-500 dark:focus:ring-primary-500"
|
||||
>
|
||||
Select
|
||||
<button type="button" class="ml-2">
|
||||
<x-heroicon name="o-chevron-down" class="h-4 w-4 text-gray-400" />
|
||||
</button>
|
||||
</div>
|
||||
</x-slot>
|
||||
<x-slot name="content">
|
||||
<x-dropdown-link
|
||||
:href="route('servers.sites.show', ['server' => $site->server, 'site' => $site])"
|
||||
:active="request()->routeIs('servers.sites.show')"
|
||||
>
|
||||
<x-heroicon name="o-globe-alt" class="h-5 w-5" />
|
||||
<span class="ml-2">Application</span>
|
||||
</x-dropdown-link>
|
||||
@if ($site->hasFeature(SiteFeature::SSL))
|
||||
<x-dropdown-link
|
||||
:href="route('servers.sites.ssl', ['server' => $site->server, 'site' => $site])"
|
||||
:active="request()->routeIs('servers.sites.ssl')"
|
||||
>
|
||||
<x-heroicon name="o-lock-closed" class="h-5 w-5" />
|
||||
<span class="ml-2">SSL</span>
|
||||
</x-dropdown-link>
|
||||
@endif
|
||||
|
||||
@if ($site->hasFeature(SiteFeature::QUEUES))
|
||||
<x-dropdown-link
|
||||
:href="route('servers.sites.queues', ['server' => $site->server, 'site' => $site])"
|
||||
:active="request()->routeIs('servers.sites.queues')"
|
||||
>
|
||||
<x-heroicon name="o-queue-list" class="h-5 w-5" />
|
||||
<span class="ml-2">Queues</span>
|
||||
</x-dropdown-link>
|
||||
@endif
|
||||
|
||||
<x-dropdown-link
|
||||
:href="route('servers.sites.settings', ['server' => $site->server, 'site' => $site])"
|
||||
:active="request()->routeIs('servers.sites.settings')"
|
||||
>
|
||||
<x-heroicon name="o-cog-6-tooth" class="h-5 w-5" />
|
||||
<span class="ml-2">Settings</span>
|
||||
</x-dropdown-link>
|
||||
<x-dropdown-link
|
||||
:href="route('servers.sites.logs', ['server' => $site->server, 'site' => $site])"
|
||||
:active="request()->routeIs('servers.sites.logs')"
|
||||
>
|
||||
<x-heroicon name="o-square-3-stack-3d" class="h-5 w-5" />
|
||||
<span class="ml-2">Logs</span>
|
||||
</x-dropdown-link>
|
||||
</x-slot>
|
||||
</x-dropdown>
|
||||
</div>
|
||||
<div class="flex items-end">
|
||||
<div class="flex flex-col justify-center items-end h-20">
|
||||
<div class="flex h-20 flex-col items-end justify-center">
|
||||
<div class="flex items-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 text-gray-500 mr-1">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" />
|
||||
</svg>
|
||||
<livewire:sites.site-status :site="$site" />
|
||||
<x-heroicon name="o-globe-alt" class="mr-1 h-5 w-5 text-gray-500" />
|
||||
@include("sites.partials.site-status")
|
||||
</div>
|
||||
<x-input-label class="cursor-pointer mt-1" x-data="{ copied: false }" x-clipboard.raw="{{ $site->web_directory_path }}">
|
||||
<div class="text-sm flex items-center" x-on:click="copied = true; setTimeout(() => {copied = false}, 2000)">
|
||||
<div x-show="copied" class="flex items-center mr-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4 text-primary-600 dark:text-white font-bold">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0118 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3l1.5 1.5 3-3.75" />
|
||||
</svg>
|
||||
<x-input-label class="mt-1 cursor-pointer" x-data="{ copied: false }">
|
||||
<div
|
||||
class="flex items-center text-sm"
|
||||
x-on:click="
|
||||
window.copyToClipboard('{{ $site->domain }}')
|
||||
copied = true
|
||||
setTimeout(() => {
|
||||
copied = false
|
||||
}, 2000)
|
||||
"
|
||||
>
|
||||
<div x-show="copied" class="mr-1 flex items-center">
|
||||
<x-heroicon
|
||||
name="o-clipboard-document-check"
|
||||
class="h-4 w-4 font-bold text-primary-600 dark:text-white"
|
||||
/>
|
||||
</div>
|
||||
{{ $site->domain }}
|
||||
</div>
|
||||
</x-input-label>
|
||||
</div>
|
||||
<div class="h-20 mx-5 border-r border-gray-200 dark:border-gray-800"></div>
|
||||
<div class="flex flex-col justify-center items-end h-20">
|
||||
<div class="mx-5 h-20 border-r border-gray-200 dark:border-gray-800"></div>
|
||||
<div class="flex h-20 flex-col items-end justify-center">
|
||||
<div class="flex items-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 text-gray-500 mr-1">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M21.75 17.25v-.228a4.5 4.5 0 00-.12-1.03l-2.268-9.64a3.375 3.375 0 00-3.285-2.602H7.923a3.375 3.375 0 00-3.285 2.602l-2.268 9.64a4.5 4.5 0 00-.12 1.03v.228m19.5 0a3 3 0 01-3 3H5.25a3 3 0 01-3-3m19.5 0a3 3 0 00-3-3H5.25a3 3 0 00-3 3m16.5 0h.008v.008h-.008v-.008zm-3 0h.008v.008h-.008v-.008z" />
|
||||
</svg>
|
||||
<livewire:servers.server-status :server="$site->server" />
|
||||
<x-heroicon name="o-server" class="mr-1 h-5 w-5 text-gray-500" />
|
||||
@include("servers.partials.server-status", ["server" => $site->server])
|
||||
</div>
|
||||
<x-input-label class="cursor-pointer mt-1" x-data="{ copied: false }" x-clipboard.raw="{{ $site->server->ip }}">
|
||||
<div class="text-sm flex items-center" x-on:click="copied = true; setTimeout(() => {copied = false}, 2000)">
|
||||
<div x-show="copied" class="flex items-center mr-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4 text-primary-600 dark:text-white font-bold">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0118 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3l1.5 1.5 3-3.75" />
|
||||
</svg>
|
||||
<x-input-label class="mt-1 cursor-pointer" x-data="{ copied: false }">
|
||||
<div
|
||||
class="flex items-center text-sm"
|
||||
x-on:click="
|
||||
window.copyToClipboard('{{ $site->server->ip }}')
|
||||
copied = true
|
||||
setTimeout(() => {
|
||||
copied = false
|
||||
}, 2000)
|
||||
"
|
||||
>
|
||||
<div x-show="copied" class="mr-1 flex items-center">
|
||||
<x-heroicon
|
||||
name="o-clipboard-document-check"
|
||||
class="h-4 w-4 font-bold text-primary-600 dark:text-white"
|
||||
/>
|
||||
</div>
|
||||
{{ $site->server->ip }}
|
||||
</div>
|
||||
@ -49,35 +170,6 @@
|
||||
</div>
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="sidebar">
|
||||
<div class="flex items-center justify-center py-2 px-3 h-16 border-b border-gray-200 dark:border-gray-800">
|
||||
<div class="w-full">
|
||||
@include('layouts.partials.site-select', ['server' => $site->server, 'site' => $site ])
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-3 space-y-2">
|
||||
<x-secondary-sidebar-link :href="route('servers.sites.show', ['server' => $site->server, 'site' => $site])" :active="request()->routeIs('servers.sites.show')">
|
||||
{{ __('Application') }}
|
||||
</x-secondary-sidebar-link>
|
||||
@if($site->isReady() && $site->hasFeature(SiteFeature::SSL))
|
||||
<x-secondary-sidebar-link :href="route('servers.sites.ssl', ['server' => $site->server, 'site' => $site])" :active="request()->routeIs('servers.sites.ssl')">
|
||||
{{ __('SSL') }}
|
||||
</x-secondary-sidebar-link>
|
||||
@endif
|
||||
@if($site->isReady() && $site->hasFeature(SiteFeature::QUEUES))
|
||||
<x-secondary-sidebar-link :href="route('servers.sites.queues', ['server' => $site->server, 'site' => $site])" :active="request()->routeIs('servers.sites.queues')">
|
||||
{{ __('Queues') }}
|
||||
</x-secondary-sidebar-link>
|
||||
@endif
|
||||
<x-secondary-sidebar-link :href="route('servers.sites.settings', ['server' => $site->server, 'site' => $site])" :active="request()->routeIs('servers.sites.settings')">
|
||||
{{ __('Settings') }}
|
||||
</x-secondary-sidebar-link>
|
||||
<x-secondary-sidebar-link :href="route('servers.sites.logs', ['server' => $site->server, 'site' => $site])" :active="request()->routeIs('servers.sites.logs')">
|
||||
{{ __('Logs') }}
|
||||
</x-secondary-sidebar-link>
|
||||
</div>
|
||||
</x-slot>
|
||||
|
||||
<x-container class="flex">
|
||||
<div class="w-full space-y-10">
|
||||
{{ $slot }}
|
||||
|
Reference in New Issue
Block a user