mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
Migrate to HTMX (#114)
Dropped Livewire Added HTMX Added Blade code lint Drop Mysql and Redis Migrate to SQLite
This commit is contained in:
@ -1 +1,3 @@
|
||||
cat /etc/php/__version__/cli/php.ini
|
||||
if ! cat /etc/php/__version__/cli/php.ini; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Livewire, Alpine } from '../../vendor/livewire/livewire/dist/livewire.esm';
|
||||
import Alpine from 'alpinejs';
|
||||
|
||||
Alpine.directive('clipboard', (el) => {
|
||||
let text = el.textContent
|
||||
@ -8,4 +8,49 @@ Alpine.directive('clipboard', (el) => {
|
||||
})
|
||||
})
|
||||
|
||||
Livewire.start()
|
||||
window.Alpine = Alpine;
|
||||
|
||||
Alpine.start();
|
||||
|
||||
import htmx from "htmx.org";
|
||||
window.htmx = htmx;
|
||||
window.htmx.defineExtension('disable-element', {
|
||||
onEvent: function (name, evt) {
|
||||
let elt = evt.detail.elt;
|
||||
let target = elt.getAttribute("hx-disable-element");
|
||||
let targetElements = (target === "self") ? [elt] : document.querySelectorAll(target);
|
||||
|
||||
for (let i = 0; i < targetElements.length; i++) {
|
||||
if (name === "htmx:beforeRequest" && targetElements[i]) {
|
||||
targetElements[i].disabled = true;
|
||||
} else if (name === "htmx:afterRequest" && targetElements[i]) {
|
||||
targetElements[i].disabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
document.body.addEventListener('htmx:configRequest', (event) => {
|
||||
event.detail.headers['X-CSRF-TOKEN'] = document.head.querySelector('meta[name="csrf-token"]').content;
|
||||
if (window.getSelection) { window.getSelection().removeAllRanges(); }
|
||||
else if (document.selection) { document.selection.empty(); }
|
||||
});
|
||||
document.body.addEventListener('htmx:beforeRequest', (event) => {
|
||||
let targetElements = event.target.querySelectorAll('[hx-disable]');
|
||||
for (let i = 0; i < targetElements.length; i++) {
|
||||
targetElements[i].disabled = true;
|
||||
}
|
||||
});
|
||||
document.body.addEventListener('htmx:afterRequest', (event) => {
|
||||
let targetElements = event.target.querySelectorAll('[hx-disable]');
|
||||
for (let i = 0; i < targetElements.length; i++) {
|
||||
targetElements[i].disabled = false;
|
||||
}
|
||||
});
|
||||
|
||||
import toastr from 'toastr';
|
||||
window.toastr = toastr;
|
||||
window.toastr.options = {
|
||||
"debug": false,
|
||||
"positionClass": "toast-bottom-right",
|
||||
"preventDuplicates": true,
|
||||
}
|
||||
|
37
resources/views/application/auto-deployment.blade.php
Normal file
37
resources/views/application/auto-deployment.blade.php
Normal file
@ -0,0 +1,37 @@
|
||||
<div>
|
||||
@if ($site->deploymentScript?->content)
|
||||
<x-dropdown>
|
||||
<x-slot name="trigger">
|
||||
<x-secondary-button>
|
||||
{{ __("Auto Deployment") }}
|
||||
</x-secondary-button>
|
||||
</x-slot>
|
||||
<x-slot name="content">
|
||||
<div id="auto-deployment">
|
||||
<x-dropdown-link
|
||||
class="cursor-pointer"
|
||||
hx-post="{{ route('servers.sites.application.auto-deployment', ['server' => $server, 'site' => $site]) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-target="#auto-deployment"
|
||||
>
|
||||
{{ __("Enable") }}
|
||||
@if ($site->auto_deployment)
|
||||
<x-heroicon-o-check class="ml-1 h-5 w-5 text-green-600" />
|
||||
@endif
|
||||
</x-dropdown-link>
|
||||
<x-dropdown-link
|
||||
class="cursor-pointer"
|
||||
hx-delete="{{ route('servers.sites.application.auto-deployment', ['server' => $server, 'site' => $site]) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-target="#auto-deployment"
|
||||
>
|
||||
{{ __("Disable") }}
|
||||
@if (! $site->auto_deployment)
|
||||
<x-heroicon-o-check class="ml-1 h-5 w-5 text-green-600" />
|
||||
@endif
|
||||
</x-dropdown-link>
|
||||
</div>
|
||||
</x-slot>
|
||||
</x-dropdown>
|
||||
@endif
|
||||
</div>
|
39
resources/views/application/change-branch.blade.php
Normal file
39
resources/views/application/change-branch.blade.php
Normal file
@ -0,0 +1,39 @@
|
||||
<div x-data="">
|
||||
<x-modal name="change-branch">
|
||||
<form
|
||||
id="change-branch-form"
|
||||
hx-post="{{ route("servers.sites.application.branch", ["server" => $server, "site" => $site]) }}"
|
||||
hx-select="#change-branch-form"
|
||||
hx-swap="outerHTML"
|
||||
class="p-6"
|
||||
>
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("Change Branch") }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="branch" :value="__('Branch')" />
|
||||
<x-text-input
|
||||
value="{{ old('branch', $site->branch) }}"
|
||||
id="branch"
|
||||
name="branch"
|
||||
type="text"
|
||||
class="mt-1 w-full"
|
||||
/>
|
||||
@error("branch")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex items-center justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Cancel") }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button class="ml-3" hx-disable>
|
||||
{{ __("Save") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
||||
</div>
|
14
resources/views/application/deploy.blade.php
Normal file
14
resources/views/application/deploy.blade.php
Normal file
@ -0,0 +1,14 @@
|
||||
<div>
|
||||
@if ($site->deploymentScript?->content)
|
||||
<form
|
||||
id="deploy"
|
||||
hx-post="{{ route("servers.sites.application.deploy", ["server" => $server, "site" => $site]) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-select="#deploy"
|
||||
>
|
||||
<x-primary-button hx-disable>
|
||||
{{ __("Deploy") }}
|
||||
</x-primary-button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
35
resources/views/application/deployment-script.blade.php
Normal file
35
resources/views/application/deployment-script.blade.php
Normal file
@ -0,0 +1,35 @@
|
||||
<div x-data="">
|
||||
<x-modal name="deployment-script">
|
||||
<form
|
||||
id="deployment-script-form"
|
||||
hx-post="{{ route("servers.sites.application.deployment-script", ["server" => $server, "site" => $site]) }}"
|
||||
hx-select="#deployment-script-form"
|
||||
hx-swap="outerHTML"
|
||||
class="p-6"
|
||||
>
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("Deployment Script") }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="script" :value="__('Script')" />
|
||||
<x-textarea rows="10" id="script" name="script" class="mt-1 w-full">
|
||||
{{ old("script", $site->deployment_script_text) }}
|
||||
</x-textarea>
|
||||
@error("script")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex items-center justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Cancel") }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button class="ml-3" hx-disable>
|
||||
{{ __("Save") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
||||
</div>
|
69
resources/views/application/deployments-list.blade.php
Normal file
69
resources/views/application/deployments-list.blade.php
Normal file
@ -0,0 +1,69 @@
|
||||
@php
|
||||
$deployments = $site
|
||||
->deployments()
|
||||
->latest()
|
||||
->paginate(10);
|
||||
@endphp
|
||||
|
||||
<div x-data="">
|
||||
<x-card-header>
|
||||
<x-slot name="title">{{ __("Deployments") }}</x-slot>
|
||||
</x-card-header>
|
||||
<x-live id="live-deployments">
|
||||
<x-table>
|
||||
<tr>
|
||||
<x-th>{{ __("Commit") }}</x-th>
|
||||
<x-th>{{ __("Date") }}</x-th>
|
||||
<x-th>{{ __("Status") }}</x-th>
|
||||
<x-th></x-th>
|
||||
</tr>
|
||||
@foreach ($deployments as $deployment)
|
||||
<tr>
|
||||
<x-td>
|
||||
<a
|
||||
href="{{ $deployment->commit_data["url"] }}"
|
||||
target="_blank"
|
||||
class="font-semibold text-primary-600"
|
||||
>
|
||||
{{ $deployment->commit_data["message"] }}
|
||||
</a>
|
||||
</x-td>
|
||||
<x-td>
|
||||
<x-datetime :value="$deployment->created_at" />
|
||||
</x-td>
|
||||
<x-td>
|
||||
<div class="inline-flex">
|
||||
@include("application.partials.deployment-status", ["status" => $deployment->status])
|
||||
</div>
|
||||
</x-td>
|
||||
<x-td>
|
||||
<x-icon-button
|
||||
hx-get="{{ route('servers.sites.application.deployment.log', ['server' => $server, 'site' => $site, 'deployment' => $deployment]) }}"
|
||||
hx-target="#show-log-content"
|
||||
hx-swap="outerHTML"
|
||||
hx-disable
|
||||
>
|
||||
<x-heroicon-o-eye class="h-5 w-5" />
|
||||
</x-icon-button>
|
||||
</x-td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</x-table>
|
||||
</x-live>
|
||||
<div class="mt-5">
|
||||
{{ $deployments->withQueryString()->links() }}
|
||||
</div>
|
||||
<x-modal name="show-log" max-width="4xl">
|
||||
<div class="p-6" id="show-log-content">
|
||||
<h2 class="mb-5 text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("View Log") }}
|
||||
</h2>
|
||||
<x-console-view>{{ session()->get("content") }}</x-console-view>
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Close") }}
|
||||
</x-secondary-button>
|
||||
</div>
|
||||
</div>
|
||||
</x-modal>
|
||||
</div>
|
43
resources/views/application/env.blade.php
Normal file
43
resources/views/application/env.blade.php
Normal file
@ -0,0 +1,43 @@
|
||||
<div x-data="">
|
||||
<x-modal name="update-env">
|
||||
<form
|
||||
id="update-env-form"
|
||||
hx-post="{{ route("servers.sites.application.env", [$server, $site]) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-select="#update-env-form"
|
||||
class="p-6"
|
||||
>
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("Update .env File") }}
|
||||
</h2>
|
||||
|
||||
<div
|
||||
class="mt-6"
|
||||
id="env-content"
|
||||
hx-get="{{ route("servers.sites.application.env", [$server, $site]) }}"
|
||||
hx-trigger="load"
|
||||
hx-target="#env"
|
||||
hx-select="#env"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<x-input-label for="env" :value="__('.env')" />
|
||||
<x-textarea id="env" name="env" rows="10" class="mt-1 block w-full">
|
||||
{{ old("env", session()->get("env") ?? "Loading...") }}
|
||||
</x-textarea>
|
||||
@error("env")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex items-center justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Cancel") }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button class="ml-3" hx-disable>
|
||||
{{ __("Save") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
||||
</div>
|
1
resources/views/application/laravel-app.blade.php
Normal file
1
resources/views/application/laravel-app.blade.php
Normal file
@ -0,0 +1 @@
|
||||
@include("application.php-app")
|
@ -1,9 +1,11 @@
|
||||
@if($status == \App\Enums\DeploymentStatus::DEPLOYING)
|
||||
@if ($status == \App\Enums\DeploymentStatus::DEPLOYING)
|
||||
<x-status status="warning">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\DeploymentStatus::FINISHED)
|
||||
|
||||
@if ($status == \App\Enums\DeploymentStatus::FINISHED)
|
||||
<x-status status="success">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\DeploymentStatus::FAILED)
|
||||
|
||||
@if ($status == \App\Enums\DeploymentStatus::FAILED)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
56
resources/views/application/php-app.blade.php
Normal file
56
resources/views/application/php-app.blade.php
Normal file
@ -0,0 +1,56 @@
|
||||
<div>
|
||||
<x-card-header>
|
||||
<x-slot name="title">{{ __("Application") }}</x-slot>
|
||||
<x-slot name="description">
|
||||
{{ __("Here you can manage your application") }}
|
||||
</x-slot>
|
||||
<x-slot name="aside">
|
||||
<div class="flex items-center">
|
||||
<div class="mr-2">
|
||||
@include("application.deploy")
|
||||
</div>
|
||||
@if ($site->source_control_id)
|
||||
<div class="mr-2">
|
||||
@include("application.auto-deployment")
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<x-dropdown>
|
||||
<x-slot name="trigger">
|
||||
<x-secondary-button>
|
||||
{{ __("Manage") }}
|
||||
</x-secondary-button>
|
||||
</x-slot>
|
||||
<x-slot name="content">
|
||||
@if ($site->source_control_id)
|
||||
<x-dropdown-link
|
||||
class="cursor-pointer"
|
||||
x-on:click="$dispatch('open-modal', 'change-branch')"
|
||||
>
|
||||
{{ __("Branch") }}
|
||||
</x-dropdown-link>
|
||||
@endif
|
||||
|
||||
<x-dropdown-link
|
||||
class="cursor-pointer"
|
||||
x-on:click="$dispatch('open-modal', 'deployment-script')"
|
||||
>
|
||||
{{ __("Deployment Script") }}
|
||||
</x-dropdown-link>
|
||||
<x-dropdown-link class="cursor-pointer" x-on:click="$dispatch('open-modal', 'update-env')">
|
||||
{{ __(".env") }}
|
||||
</x-dropdown-link>
|
||||
</x-slot>
|
||||
</x-dropdown>
|
||||
@if ($site->source_control_id)
|
||||
@include("application.change-branch")
|
||||
@endif
|
||||
|
||||
@include("application.deployment-script")
|
||||
@include("application.env")
|
||||
</div>
|
||||
</x-slot>
|
||||
</x-card-header>
|
||||
|
||||
@include("application.deployments-list")
|
||||
</div>
|
1
resources/views/application/php-blank-app.blade.php
Normal file
1
resources/views/application/php-blank-app.blade.php
Normal file
@ -0,0 +1 @@
|
||||
@include("application.php-app")
|
10
resources/views/application/wordpress-app.blade.php
Normal file
10
resources/views/application/wordpress-app.blade.php
Normal file
@ -0,0 +1,10 @@
|
||||
<div>
|
||||
<x-simple-card class="flex items-center justify-between">
|
||||
<span>
|
||||
{{ __("Your Wordpress site is installed and ready to use! ") }}
|
||||
</span>
|
||||
<x-secondary-button :href="$site->url" target="_blank">
|
||||
{{ __("Open Website") }}
|
||||
</x-secondary-button>
|
||||
</x-simple-card>
|
||||
</div>
|
@ -1,26 +1,30 @@
|
||||
<x-guest-layout>
|
||||
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __('This is a secure area of the application. Please confirm your password before continuing.') }}
|
||||
{{ __("This is a secure area of the application. Please confirm your password before continuing.") }}
|
||||
</div>
|
||||
|
||||
<form method="POST" action="{{ route('password.confirm') }}">
|
||||
<form method="POST" action="{{ route("password.confirm") }}">
|
||||
@csrf
|
||||
|
||||
<!-- Password -->
|
||||
<div>
|
||||
<x-input-label for="password" :value="__('Password')" />
|
||||
|
||||
<x-text-input id="password" class="block mt-1 w-full"
|
||||
type="password"
|
||||
name="password"
|
||||
required autocomplete="current-password" />
|
||||
<x-text-input
|
||||
id="password"
|
||||
class="mt-1 block w-full"
|
||||
type="password"
|
||||
name="password"
|
||||
required
|
||||
autocomplete="current-password"
|
||||
/>
|
||||
|
||||
<x-input-error :messages="$errors->get('password')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end mt-4">
|
||||
<div class="mt-4 flex justify-end">
|
||||
<x-primary-button>
|
||||
{{ __('Confirm') }}
|
||||
{{ __("Confirm") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -1,24 +1,32 @@
|
||||
<x-guest-layout>
|
||||
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __('Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.') }}
|
||||
{{ __("Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.") }}
|
||||
</div>
|
||||
|
||||
<!-- Session Status -->
|
||||
<x-auth-session-status class="mb-4" :status="session('status')" />
|
||||
|
||||
<form method="POST" action="{{ route('password.email') }}">
|
||||
<form method="POST" action="{{ route("password.email") }}">
|
||||
@csrf
|
||||
|
||||
<!-- Email Address -->
|
||||
<div>
|
||||
<x-input-label for="email" :value="__('Email')" />
|
||||
<x-text-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required autofocus />
|
||||
<x-text-input
|
||||
id="email"
|
||||
class="mt-1 block w-full"
|
||||
type="email"
|
||||
name="email"
|
||||
:value="old('email')"
|
||||
required
|
||||
autofocus
|
||||
/>
|
||||
<x-input-error :messages="$errors->get('email')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end mt-4">
|
||||
<div class="mt-4 flex items-center justify-end">
|
||||
<x-primary-button>
|
||||
{{ __('Email Password Reset Link') }}
|
||||
{{ __("Email Password Reset Link") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -2,57 +2,83 @@
|
||||
<!-- Session Status -->
|
||||
<x-auth-session-status class="mb-4" :status="session('status')" />
|
||||
|
||||
<form method="POST" action="{{ route('login') }}">
|
||||
<form method="POST" action="{{ route("login") }}">
|
||||
@csrf
|
||||
<div x-data="{ isPasswordVisible: false }">
|
||||
<!-- Email Address -->
|
||||
<div>
|
||||
<x-input-label for="email" :value="__('Email')" />
|
||||
<x-text-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')"
|
||||
required autofocus autocomplete="username" />
|
||||
<x-text-input
|
||||
id="email"
|
||||
class="mt-1 block w-full"
|
||||
type="email"
|
||||
name="email"
|
||||
:value="old('email')"
|
||||
required
|
||||
autofocus
|
||||
autocomplete="username"
|
||||
/>
|
||||
<x-input-error :messages="$errors->get('email')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<!-- Password -->
|
||||
<div class="mt-4">
|
||||
<x-input-label for="password" :value="__('Password')" />
|
||||
<x-text-input id="password" class="block mt-1 w-full"
|
||||
x-bind:type="isPasswordVisible ? 'text' : 'password'" name="password" required
|
||||
autocomplete="current-password" />
|
||||
<x-text-input
|
||||
id="password"
|
||||
class="mt-1 block w-full"
|
||||
x-bind:type="isPasswordVisible ? 'text' : 'password'"
|
||||
name="password"
|
||||
required
|
||||
autocomplete="current-password"
|
||||
/>
|
||||
<x-input-error :messages="$errors->get('password')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between">
|
||||
<!-- Remember Me -->
|
||||
<div class="block mt-4 ">
|
||||
<div class="mt-4 block">
|
||||
<label for="remember_me" class="inline-flex items-center">
|
||||
<input id="remember_me" type="checkbox"
|
||||
class="rounded dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800"
|
||||
name="remember">
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">{{ __('Remember me') }}</span>
|
||||
<input
|
||||
id="remember_me"
|
||||
type="checkbox"
|
||||
class="rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:border-gray-700 dark:bg-gray-900 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800"
|
||||
name="remember"
|
||||
/>
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __("Remember me") }}
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Show Password -->
|
||||
<div class="block mt-4">
|
||||
<label for="show_password" class="inline-flex items-center float-right">
|
||||
<input id="show_password" type="checkbox" x-model="isPasswordVisible"
|
||||
class="rounded dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800">
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">{{ __('Show password') }}</span>
|
||||
<div class="mt-4 block">
|
||||
<label for="show_password" class="float-right inline-flex items-center">
|
||||
<input
|
||||
id="show_password"
|
||||
type="checkbox"
|
||||
x-model="isPasswordVisible"
|
||||
class="rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:border-gray-700 dark:bg-gray-900 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800"
|
||||
/>
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __("Show password") }}
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end mt-4">
|
||||
@if (Route::has('password.request'))
|
||||
<a class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800"
|
||||
href="{{ route('password.request') }}">
|
||||
{{ __('Forgot your password?') }}
|
||||
<div class="mt-4 flex items-center justify-end">
|
||||
@if (Route::has("password.request"))
|
||||
<a
|
||||
class="rounded-md text-sm text-gray-600 underline hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:text-gray-400 dark:hover:text-gray-100 dark:focus:ring-offset-gray-800"
|
||||
href="{{ route("password.request") }}"
|
||||
>
|
||||
{{ __("Forgot your password?") }}
|
||||
</a>
|
||||
@endif
|
||||
|
||||
<x-primary-button class="ml-3">
|
||||
{{ __('Log in') }}
|
||||
{{ __("Log in") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,21 +1,37 @@
|
||||
<x-guest-layout>
|
||||
<form method="POST" action="{{ route('password.update') }}">
|
||||
<form method="POST" action="{{ route("password.update") }}">
|
||||
@csrf
|
||||
|
||||
<!-- Password Reset Token -->
|
||||
<input type="hidden" name="token" value="{{ $token }}">
|
||||
<input type="hidden" name="token" value="{{ $token }}" />
|
||||
|
||||
<!-- Email Address -->
|
||||
<div>
|
||||
<x-input-label for="email" :value="__('Email')" />
|
||||
<x-text-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email', $email)" required autofocus autocomplete="username" />
|
||||
<x-text-input
|
||||
id="email"
|
||||
class="mt-1 block w-full"
|
||||
type="email"
|
||||
name="email"
|
||||
:value="old('email', $email)"
|
||||
required
|
||||
autofocus
|
||||
autocomplete="username"
|
||||
/>
|
||||
<x-input-error :messages="$errors->get('email')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<!-- Password -->
|
||||
<div class="mt-4">
|
||||
<x-input-label for="password" :value="__('Password')" />
|
||||
<x-text-input id="password" class="block mt-1 w-full" type="password" name="password" required autocomplete="new-password" />
|
||||
<x-text-input
|
||||
id="password"
|
||||
class="mt-1 block w-full"
|
||||
type="password"
|
||||
name="password"
|
||||
required
|
||||
autocomplete="new-password"
|
||||
/>
|
||||
<x-input-error :messages="$errors->get('password')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
@ -23,16 +39,21 @@
|
||||
<div class="mt-4">
|
||||
<x-input-label for="password_confirmation" :value="__('Confirm Password')" />
|
||||
|
||||
<x-text-input id="password_confirmation" class="block mt-1 w-full"
|
||||
type="password"
|
||||
name="password_confirmation" required autocomplete="new-password" />
|
||||
<x-text-input
|
||||
id="password_confirmation"
|
||||
class="mt-1 block w-full"
|
||||
type="password"
|
||||
name="password_confirmation"
|
||||
required
|
||||
autocomplete="new-password"
|
||||
/>
|
||||
|
||||
<x-input-error :messages="$errors->get('password_confirmation')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end mt-4">
|
||||
<div class="mt-4 flex items-center justify-end">
|
||||
<x-primary-button>
|
||||
{{ __('Reset Password') }}
|
||||
{{ __("Reset Password") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -4,21 +4,29 @@
|
||||
<form method="POST">
|
||||
@csrf
|
||||
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __('Please enter your recovery code') }}
|
||||
{{ __("Please enter your recovery code") }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<x-input-label for="recovery_code" :value="__('Recovery Code')" />
|
||||
<x-text-input id="recovery_code" class="block mt-1 w-full" type="text" name="recovery_code" required autofocus autocomplete="recovery_code" />
|
||||
<x-text-input
|
||||
id="recovery_code"
|
||||
class="mt-1 block w-full"
|
||||
type="text"
|
||||
name="recovery_code"
|
||||
required
|
||||
autofocus
|
||||
autocomplete="recovery_code"
|
||||
/>
|
||||
<x-input-error :messages="$errors->get('recovery_code')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end mt-4">
|
||||
<div class="mt-4 flex items-center justify-end">
|
||||
<x-secondary-button class="mr-2" x-on:click="recover = false">
|
||||
{{ __('Login') }}
|
||||
{{ __("Login") }}
|
||||
</x-secondary-button>
|
||||
<x-primary-button type="submit">
|
||||
{{ __('Recover') }}
|
||||
{{ __("Recover") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
@ -27,21 +35,29 @@
|
||||
<form method="POST">
|
||||
@csrf
|
||||
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __('Please confirm access to your account by entering the authentication code provided by your authenticator application.') }}
|
||||
{{ __("Please confirm access to your account by entering the authentication code provided by your authenticator application.") }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<x-input-label for="code" :value="__('Code')" />
|
||||
<x-text-input id="code" class="block mt-1 w-full" type="text" name="code" required autofocus autocomplete="code" />
|
||||
<x-text-input
|
||||
id="code"
|
||||
class="mt-1 block w-full"
|
||||
type="text"
|
||||
name="code"
|
||||
required
|
||||
autofocus
|
||||
autocomplete="code"
|
||||
/>
|
||||
<x-input-error :messages="$errors->get('code')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end mt-4">
|
||||
<div class="mt-4 flex items-center justify-end">
|
||||
<x-secondary-button class="mr-2" x-on:click="recover = true">
|
||||
{{ __('Recover') }}
|
||||
{{ __("Recover") }}
|
||||
</x-secondary-button>
|
||||
<x-primary-button type="submit">
|
||||
{{ __('Login') }}
|
||||
{{ __("Login") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,7 +1,9 @@
|
||||
@props(['status'])
|
||||
@props([
|
||||
"status",
|
||||
])
|
||||
|
||||
@if ($status)
|
||||
<div {{ $attributes->merge(['class' => 'font-medium text-sm text-green-600 dark:text-green-400']) }}>
|
||||
<div {{ $attributes->merge(["class" => "font-medium text-sm text-green-600 dark:text-green-400"]) }}>
|
||||
{{ $status }}
|
||||
</div>
|
||||
@endif
|
||||
|
@ -1,12 +1,12 @@
|
||||
<div class="mb-6 @if(isset($aside)) flex justify-between @endif">
|
||||
<div class="@if(isset($aside)) flex justify-between @endif mb-6">
|
||||
<div>
|
||||
@if(isset($title))
|
||||
@if (isset($title))
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-300">
|
||||
{{ $title }}
|
||||
</h3>
|
||||
@endif
|
||||
|
||||
@if(isset($description))
|
||||
@if (isset($description))
|
||||
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ $description }}
|
||||
</p>
|
||||
@ -14,7 +14,7 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@if(isset($aside))
|
||||
@if (isset($aside))
|
||||
{{ $aside }}
|
||||
@endif
|
||||
</div>
|
||||
|
@ -1,23 +1,29 @@
|
||||
<div class="mx-auto mb-10">
|
||||
<x-card-header>
|
||||
@if(isset($title))
|
||||
@if (isset($title))
|
||||
<x-slot name="title">{{ $title }}</x-slot>
|
||||
@endif
|
||||
@if(isset($description))
|
||||
|
||||
@if (isset($description))
|
||||
<x-slot name="description">{{ $description }}</x-slot>
|
||||
@endif
|
||||
@if(isset($aside))
|
||||
|
||||
@if (isset($aside))
|
||||
<x-slot name="aside">{{ $aside }}</x-slot>
|
||||
@endif
|
||||
</x-card-header>
|
||||
|
||||
<div class="mt-5">
|
||||
<div class="bg-white px-4 py-5 dark:bg-gray-800 sm:p-6 border border-gray-200 dark:border-gray-700 {{ isset($actions) ? 'sm:rounded-tl-md sm:rounded-tr-md': 'sm:rounded-md' }}">
|
||||
<div
|
||||
class="{{ isset($actions) ? "sm:rounded-tl-md sm:rounded-tr-md" : "sm:rounded-md" }} border border-gray-200 bg-white px-4 py-5 dark:border-gray-700 dark:bg-gray-800 sm:p-6"
|
||||
>
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
||||
@if(isset($actions))
|
||||
<div class="flex items-center justify-end bg-gray-50 border border-r border-b border-l border-t-transparent dark:border-t-transparent border-gray-200 dark:border-gray-700 px-4 py-3 text-right dark:bg-gray-800 dark:bg-opacity-70 sm:rounded-bl-md sm:rounded-br-md sm:px-6">
|
||||
@if (isset($actions))
|
||||
<div
|
||||
class="flex items-center justify-end border border-b border-l border-r border-gray-200 border-t-transparent bg-gray-50 px-4 py-3 text-right dark:border-gray-700 dark:border-t-transparent dark:bg-gray-800 dark:bg-opacity-70 sm:rounded-bl-md sm:rounded-br-md sm:px-6"
|
||||
>
|
||||
{{ $actions }}
|
||||
</div>
|
||||
@endif
|
||||
|
@ -1,18 +0,0 @@
|
||||
@props(['name', 'input', 'title', 'description', 'method'])
|
||||
|
||||
<x-modal :name="$name">
|
||||
<form wire:submit="{{ $method }}" class="p-6">
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __('Confirm') }}
|
||||
</h2>
|
||||
<p>{{ $description }}</p>
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __('Cancel') }}
|
||||
</x-secondary-button>
|
||||
<x-danger-button class="ml-3" @confirmed.window="$dispatch('close')" wire:loading.attr="disabled">
|
||||
{{ __('Confirm') }}
|
||||
</x-danger-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
32
resources/views/components/confirmation-modal.blade.php
Normal file
32
resources/views/components/confirmation-modal.blade.php
Normal file
@ -0,0 +1,32 @@
|
||||
@props([
|
||||
"name",
|
||||
"title",
|
||||
"description",
|
||||
"method",
|
||||
"action" => "",
|
||||
])
|
||||
|
||||
<x-modal :name="$name">
|
||||
<form
|
||||
id="{{ $name }}-form"
|
||||
method="post"
|
||||
action="{{ $action }}"
|
||||
{{ $attributes }}
|
||||
class="p-6"
|
||||
>
|
||||
@csrf
|
||||
@method($method)
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("Confirm") }}
|
||||
</h2>
|
||||
<p>{{ $description }}</p>
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Cancel") }}
|
||||
</x-secondary-button>
|
||||
<x-danger-button class="ml-3">
|
||||
{{ __("Confirm") }}
|
||||
</x-danger-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
@ -1,3 +1,5 @@
|
||||
<div class="h-96 w-full overflow-auto whitespace-pre-line rounded-md border border-gray-200 bg-gray-900 p-5 text-gray-50 dark:border-gray-800">
|
||||
<div
|
||||
class="h-96 w-full overflow-auto whitespace-pre-line rounded-md border border-gray-200 bg-gray-900 p-5 text-gray-50 dark:border-gray-800"
|
||||
>
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
@ -1,3 +1,3 @@
|
||||
<div {!! $attributes->merge(['class' => 'py-12 max-w-7xl mx-auto px-6']) !!}>
|
||||
<div {!! $attributes->merge(["class" => "py-12 max-w-7xl mx-auto px-6"]) !!}>
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
@ -1,3 +1,5 @@
|
||||
<button {{ $attributes->merge(['type' => 'submit', 'class' => 'inline-flex w-max items-center justify-center rounded-md border border-transparent bg-red-600 px-4 py-1 h-9 font-semibold capitalize text-white transition hover:bg-red-500 focus:border-red-700 focus:outline-none focus:ring focus:ring-red-200 active:bg-red-600 disabled:opacity-25']) }}>
|
||||
<button
|
||||
{{ $attributes->merge(["type" => "submit", "class" => "inline-flex w-max items-center justify-center rounded-md border border-transparent bg-red-600 px-4 py-1 h-9 font-semibold capitalize text-white transition hover:bg-red-500 focus:border-red-700 focus:outline-none focus:ring focus:ring-red-200 active:bg-red-600 disabled:opacity-25"]) }}
|
||||
>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
|
@ -1,3 +1,5 @@
|
||||
@props(['value'])
|
||||
@props([
|
||||
"value",
|
||||
])
|
||||
|
||||
{{ date_with_timezone($value, auth()->user()->timezone) }}
|
||||
|
@ -1 +1,5 @@
|
||||
<a {{ $attributes->merge(['class' => 'block w-full px-4 py-2 text-left text-sm leading-5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-700 transition duration-150 ease-in-out flex items-center justify-start']) }}>{{ $slot }}</a>
|
||||
<a
|
||||
{{ $attributes->merge(["class" => "block w-full px-4 py-2 text-left text-sm leading-5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-700 transition duration-150 ease-in-out flex items-center justify-start"]) }}
|
||||
>
|
||||
{{ $slot }}
|
||||
</a>
|
||||
|
@ -1,27 +1,27 @@
|
||||
@props(['align' => 'right', 'width' => '48', 'contentClasses' => 'py-1 bg-white dark:bg-gray-800'])
|
||||
@props(["align" => "right", "width" => "48", "contentClasses" => "bg-white py-1 dark:bg-gray-800"])
|
||||
|
||||
@php
|
||||
switch ($align) {
|
||||
case 'left':
|
||||
$alignmentClasses = 'origin-top-left left-0';
|
||||
break;
|
||||
case 'top':
|
||||
$alignmentClasses = 'origin-top';
|
||||
break;
|
||||
case 'right':
|
||||
default:
|
||||
$alignmentClasses = 'origin-top-right right-0';
|
||||
break;
|
||||
}
|
||||
switch ($align) {
|
||||
case "left":
|
||||
$alignmentClasses = "left-0 origin-top-left";
|
||||
break;
|
||||
case "top":
|
||||
$alignmentClasses = "origin-top";
|
||||
break;
|
||||
case "right":
|
||||
default:
|
||||
$alignmentClasses = "right-0 origin-top-right";
|
||||
break;
|
||||
}
|
||||
|
||||
switch ($width) {
|
||||
case '48':
|
||||
$width = 'w-48';
|
||||
break;
|
||||
case 'full':
|
||||
$width = 'w-full';
|
||||
break;
|
||||
}
|
||||
switch ($width) {
|
||||
case "48":
|
||||
$width = "w-48";
|
||||
break;
|
||||
case "full":
|
||||
$width = "w-full";
|
||||
break;
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="relative" x-data="{ open: false }" @click.outside="open = false" @close.stop="open = false">
|
||||
@ -29,17 +29,19 @@
|
||||
{{ $trigger }}
|
||||
</div>
|
||||
|
||||
<div x-show="open"
|
||||
x-transition:enter="transition ease-out duration-200"
|
||||
x-transition:enter-start="transform opacity-0 scale-95"
|
||||
x-transition:enter-end="transform opacity-100 scale-100"
|
||||
x-transition:leave="transition ease-in duration-75"
|
||||
x-transition:leave-start="transform opacity-100 scale-100"
|
||||
x-transition:leave-end="transform opacity-0 scale-95"
|
||||
class="absolute z-50 mt-2 {{ $width }} rounded-md shadow-lg {{ $alignmentClasses }}"
|
||||
style="display: none;"
|
||||
@click="open = false">
|
||||
<div class="rounded-md ring-1 ring-black ring-opacity-5 {{ $contentClasses }}">
|
||||
<div
|
||||
x-show="open"
|
||||
x-transition:enter="transition duration-200 ease-out"
|
||||
x-transition:enter-start="scale-95 transform opacity-0"
|
||||
x-transition:enter-end="scale-100 transform opacity-100"
|
||||
x-transition:leave="transition duration-75 ease-in"
|
||||
x-transition:leave-start="scale-100 transform opacity-100"
|
||||
x-transition:leave-end="scale-95 transform opacity-0"
|
||||
class="{{ $width }} {{ $alignmentClasses }} absolute z-50 mt-2 rounded-md shadow-lg"
|
||||
style="display: none"
|
||||
@click="open = false"
|
||||
>
|
||||
<div class="{{ $contentClasses }} rounded-md ring-1 ring-black ring-opacity-5">
|
||||
{{ $content }}
|
||||
</div>
|
||||
</div>
|
||||
|
48
resources/views/components/htmx-error-handler.blade.php
Normal file
48
resources/views/components/htmx-error-handler.blade.php
Normal file
@ -0,0 +1,48 @@
|
||||
<div>
|
||||
<style>
|
||||
#htmx-error-modal-backdrop {
|
||||
display: none; /* Hide by default */
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
|
||||
}
|
||||
#htmx-error-modal-content {
|
||||
background-color: #fefefe;
|
||||
margin: 50px auto; /* 200px from the top and centered */
|
||||
padding: 0;
|
||||
width: calc(100% - 100px); /* Full width minus the margin */
|
||||
height: calc(100% - 100px); /* Full height minus the margin */
|
||||
position: relative;
|
||||
}
|
||||
#htmx-error-modal-content iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
<div id="htmx-error-modal-backdrop" onclick="closeHtmxErrorModal()">
|
||||
<div id="htmx-error-modal-content" onclick="event.stopPropagation()"></div>
|
||||
</div>
|
||||
<script>
|
||||
function closeHtmxErrorModal() {
|
||||
document.getElementById('htmx-error-modal-backdrop').style.display = 'none';
|
||||
document.getElementById('htmx-error-modal-content').innerHTML = '';
|
||||
}
|
||||
document.body.addEventListener('htmx:beforeOnLoad', function (evt) {
|
||||
if (evt.detail.xhr.status >= 400) {
|
||||
let iframe = document.createElement('iframe');
|
||||
document.getElementById('htmx-error-modal-content').appendChild(iframe);
|
||||
iframe.src = 'about:blank';
|
||||
iframe.contentWindow.document.open();
|
||||
iframe.contentWindow.document.write(evt.detail.xhr.responseText);
|
||||
iframe.contentWindow.document.close();
|
||||
document.getElementById('htmx-error-modal-backdrop').style.display = 'block';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
@ -1,15 +1,18 @@
|
||||
@props(['href'])
|
||||
@props([
|
||||
"href",
|
||||
])
|
||||
|
||||
@php
|
||||
$class = 'w-max inline-flex items-center justify-center px-2 py-1 font-semibold capitalize transition hover:opacity-50 outline-0 focus:ring focus:ring-primary-200 disabled:opacity-25 dark:focus:ring-primary-700 dark:focus:ring-opacity-40';
|
||||
$class =
|
||||
"inline-flex w-max items-center justify-center px-2 py-1 font-semibold capitalize outline-0 transition hover:opacity-50 focus:ring focus:ring-primary-200 disabled:opacity-25 dark:focus:ring-primary-700 dark:focus:ring-opacity-40";
|
||||
@endphp
|
||||
|
||||
@if(isset($href))
|
||||
<a href="{{ $href }}" {{ $attributes->merge(['class' => $class]) }}>
|
||||
@if (isset($href))
|
||||
<a href="{{ $href }}" {{ $attributes->merge(["class" => $class]) }}>
|
||||
{{ $slot }}
|
||||
</a>
|
||||
@else
|
||||
<button {{ $attributes->merge(['type' => 'submit', 'class' => $class]) }}>
|
||||
<button {{ $attributes->merge(["type" => "submit", "class" => $class]) }}>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
@endif
|
||||
|
@ -1,7 +1,9 @@
|
||||
@props(['messages'])
|
||||
@props([
|
||||
"messages",
|
||||
])
|
||||
|
||||
@if ($messages)
|
||||
<ul {{ $attributes->merge(['class' => 'text-sm text-red-600 dark:text-red-400 space-y-1']) }}>
|
||||
<ul {{ $attributes->merge(["class" => "text-sm text-red-600 dark:text-red-400 space-y-1"]) }}>
|
||||
@foreach ((array) $messages as $message)
|
||||
<li>{{ $message }}</li>
|
||||
@endforeach
|
||||
|
@ -1 +1,5 @@
|
||||
<p {{ $attributes->merge(['class' => 'mt-2 text-sm text-gray-500 dark:text-gray-300']) }}>{{ $slot }}</p>
|
||||
<p
|
||||
{{ $attributes->merge(["class" => "mt-2 text-sm text-gray-500 dark:text-gray-300"]) }}
|
||||
>
|
||||
{{ $slot }}
|
||||
</p>
|
||||
|
@ -1,5 +1,9 @@
|
||||
@props(['value'])
|
||||
@props([
|
||||
"value",
|
||||
])
|
||||
|
||||
<label {{ $attributes->merge(['class' => 'block font-medium text-sm text-gray-700 dark:text-gray-300']) }}>
|
||||
<label
|
||||
{{ $attributes->merge(["class" => "block font-medium text-sm text-gray-700 dark:text-gray-300"]) }}
|
||||
>
|
||||
{{ $value ?? $slot }}
|
||||
</label>
|
||||
|
@ -1,3 +1,5 @@
|
||||
<div class="rounded-t-md rounded-b-md flex h-20 items-center justify-between border border-gray-200 bg-white p-7 text-center dark:border-gray-700 dark:bg-gray-800">
|
||||
<div
|
||||
class="flex h-20 items-center justify-between rounded-b-md rounded-t-md border border-gray-200 bg-white p-7 text-center dark:border-gray-700 dark:bg-gray-800"
|
||||
>
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
14
resources/views/components/live.blade.php
Normal file
14
resources/views/components/live.blade.php
Normal file
@ -0,0 +1,14 @@
|
||||
@props([
|
||||
"interval" => "30s",
|
||||
"id",
|
||||
])
|
||||
|
||||
<div
|
||||
id="{{ $id }}"
|
||||
hx-get="{{ request()->getUri() }}"
|
||||
hx-trigger="every {{ $interval }}"
|
||||
hx-select="#{{ $id }}"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
{{ $slot }}
|
||||
</div>
|
@ -1,19 +1,19 @@
|
||||
@props([
|
||||
'name',
|
||||
'show' => false,
|
||||
'maxWidth' => '2xl'
|
||||
"name",
|
||||
"show" => false,
|
||||
"maxWidth" => "2xl",
|
||||
])
|
||||
|
||||
@php
|
||||
$maxWidth = [
|
||||
'sm' => 'sm:max-w-sm',
|
||||
'md' => 'sm:max-w-md',
|
||||
'lg' => 'sm:max-w-lg',
|
||||
'xl' => 'sm:max-w-xl',
|
||||
'2xl' => 'sm:max-w-2xl',
|
||||
'3xl' => 'sm:max-w-3xl',
|
||||
'4xl' => 'sm:max-w-4xl',
|
||||
][$maxWidth];
|
||||
$maxWidth = [
|
||||
"sm" => "sm:max-w-sm",
|
||||
"md" => "sm:max-w-md",
|
||||
"lg" => "sm:max-w-lg",
|
||||
"xl" => "sm:max-w-xl",
|
||||
"2xl" => "sm:max-w-2xl",
|
||||
"3xl" => "sm:max-w-3xl",
|
||||
"4xl" => "sm:max-w-4xl",
|
||||
][$maxWidth];
|
||||
@endphp
|
||||
|
||||
<div
|
||||
@ -33,47 +33,49 @@
|
||||
nextFocusableIndex() { return (this.focusables().indexOf(document.activeElement) + 1) % (this.focusables().length + 1) },
|
||||
prevFocusableIndex() { return Math.max(0, this.focusables().indexOf(document.activeElement)) -1 },
|
||||
}"
|
||||
x-init="$watch('show', value => {
|
||||
if (value) {
|
||||
document.body.classList.add('overflow-y-hidden');
|
||||
{{ $attributes->has('focusable') ? 'setTimeout(() => firstFocusable().focus(), 100)' : '' }}
|
||||
} else {
|
||||
document.body.classList.remove('overflow-y-hidden');
|
||||
}
|
||||
})"
|
||||
x-on:open-modal.window="$event.detail == '{{ $name }}' ? show = true : null"
|
||||
x-on:close-modal.window="$event.detail == '{{ $name }}' ? show = false : null"
|
||||
x-init="
|
||||
$watch('show', (value) => {
|
||||
if (value) {
|
||||
document.body.classList.add('overflow-y-hidden')
|
||||
{{ $attributes->has("focusable") ? "setTimeout(() => firstFocusable().focus(), 100)" : "" }}
|
||||
} else {
|
||||
document.body.classList.remove('overflow-y-hidden')
|
||||
}
|
||||
})
|
||||
"
|
||||
x-on:open-modal.window="$event.detail == '{{ $name }}' ? (show = true) : null"
|
||||
x-on:close-modal.window="$event.detail == '{{ $name }}' ? (show = false) : null"
|
||||
x-on:close.stop="show = false"
|
||||
x-on:keydown.escape.window="show = false"
|
||||
x-on:keydown.tab.prevent="$event.shiftKey || nextFocusable().focus()"
|
||||
x-on:keydown.shift.tab.prevent="prevFocusable().focus()"
|
||||
x-show="show"
|
||||
class="fixed inset-0 overflow-y-auto px-4 py-6 sm:px-0 z-50"
|
||||
style="display: {{ $show ? 'block' : 'none' }};"
|
||||
class="fixed inset-0 z-50 overflow-y-auto px-4 py-6 sm:px-0"
|
||||
style="display: {{ $show ? "block" : "none" }}"
|
||||
>
|
||||
<div
|
||||
x-show="show"
|
||||
class="fixed inset-0 transform transition-all"
|
||||
x-on:click="show = false"
|
||||
x-transition:enter="ease-out duration-300"
|
||||
x-transition:enter="duration-300 ease-out"
|
||||
x-transition:enter-start="opacity-0"
|
||||
x-transition:enter-end="opacity-100"
|
||||
x-transition:leave="ease-in duration-200"
|
||||
x-transition:leave="duration-200 ease-in"
|
||||
x-transition:leave-start="opacity-100"
|
||||
x-transition:leave-end="opacity-0"
|
||||
>
|
||||
<div class="absolute inset-0 bg-gray-500 dark:bg-gray-900 opacity-75"></div>
|
||||
<div class="absolute inset-0 bg-gray-500 opacity-75 dark:bg-gray-900"></div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
x-show="show"
|
||||
class="mb-6 bg-white dark:bg-gray-800 rounded-lg overflow-hidden shadow-xl transform transition-all sm:w-full {{ $maxWidth }} sm:mx-auto"
|
||||
x-transition:enter="ease-out duration-300"
|
||||
x-transition:enter-start="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
||||
x-transition:enter-end="opacity-100 translate-y-0 sm:scale-100"
|
||||
x-transition:leave="ease-in duration-200"
|
||||
x-transition:leave-start="opacity-100 translate-y-0 sm:scale-100"
|
||||
x-transition:leave-end="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
||||
class="{{ $maxWidth }} mb-6 transform overflow-hidden rounded-lg bg-white shadow-xl transition-all dark:bg-gray-800 sm:mx-auto sm:w-full"
|
||||
x-transition:enter="duration-300 ease-out"
|
||||
x-transition:enter-start="translate-y-4 opacity-0 sm:translate-y-0 sm:scale-95"
|
||||
x-transition:enter-end="translate-y-0 opacity-100 sm:scale-100"
|
||||
x-transition:leave="duration-200 ease-in"
|
||||
x-transition:leave-start="translate-y-0 opacity-100 sm:scale-100"
|
||||
x-transition:leave-end="translate-y-4 opacity-0 sm:translate-y-0 sm:scale-95"
|
||||
>
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
@ -1,11 +1,14 @@
|
||||
@props(['active'])
|
||||
@props([
|
||||
"active",
|
||||
])
|
||||
|
||||
@php
|
||||
$classes = ($active ?? false)
|
||||
? 'px-2 inline-flex items-center px-1 pt-1 border-b-2 border-primary-400 dark:border-primary-600 text-sm font-medium leading-5 text-gray-900 dark:text-gray-100 focus:outline-none focus:border-primary-700 transition duration-150 ease-in-out'
|
||||
: 'px-2 inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium leading-5 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-700 focus:outline-none focus:text-gray-700 dark:focus:text-gray-300 focus:border-gray-300 dark:focus:border-gray-700 transition duration-150 ease-in-out';
|
||||
$classes =
|
||||
$active ?? false
|
||||
? "inline-flex items-center border-b-2 border-primary-400 px-1 px-2 pt-1 text-sm font-medium leading-5 text-gray-900 transition duration-150 ease-in-out focus:border-primary-700 focus:outline-none dark:border-primary-600 dark:text-gray-100"
|
||||
: "inline-flex items-center border-b-2 border-transparent px-1 px-2 pt-1 text-sm font-medium leading-5 text-gray-500 transition duration-150 ease-in-out hover:border-gray-300 hover:text-gray-700 focus:border-gray-300 focus:text-gray-700 focus:outline-none dark:text-gray-400 dark:hover:border-gray-700 dark:hover:text-gray-300 dark:focus:border-gray-700 dark:focus:text-gray-300";
|
||||
@endphp
|
||||
|
||||
<a {{ $attributes->merge(['class' => $classes]) }}>
|
||||
<a {{ $attributes->merge(["class" => $classes]) }}>
|
||||
{{ $slot }}
|
||||
</a>
|
||||
|
@ -1,15 +1,18 @@
|
||||
@props(['href'])
|
||||
@props([
|
||||
"href",
|
||||
])
|
||||
|
||||
@php
|
||||
$class = 'w-max inline-flex items-center justify-center rounded-md border border-transparent bg-primary-600 px-4 py-1 h-9 font-semibold text-white transition hover:bg-primary-700 focus:border-primary-700 focus:border-primary-300 outline-0 focus:ring focus:ring-primary-200 focus:ring-opacity-50 active:bg-primary-700 disabled:opacity-25 dark:focus:border-primary-700 dark:focus:ring-primary-700 dark:focus:ring-opacity-40';
|
||||
$class =
|
||||
"inline-flex h-9 w-max items-center justify-center rounded-md border border-transparent bg-primary-600 px-4 py-1 font-semibold text-white outline-0 transition hover:bg-primary-700 focus:border-primary-300 focus:border-primary-700 focus:ring focus:ring-primary-200 focus:ring-opacity-50 active:bg-primary-700 disabled:opacity-25 dark:focus:border-primary-700 dark:focus:ring-primary-700 dark:focus:ring-opacity-40";
|
||||
@endphp
|
||||
|
||||
@if(isset($href))
|
||||
<button onclick="location.href = '{{ $href }}'" {{ $attributes->merge(['class' => $class]) }}>
|
||||
@if (isset($href))
|
||||
<button onclick="location.href = '{{ $href }}'" {{ $attributes->merge(["class" => $class]) }}>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
@else
|
||||
<button {{ $attributes->merge(['type' => 'submit', 'class' => $class]) }}>
|
||||
<button {{ $attributes->merge(["type" => "submit", "class" => $class]) }}>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
@endif
|
||||
|
@ -1,11 +1,14 @@
|
||||
@props(['active'])
|
||||
@props([
|
||||
"active",
|
||||
])
|
||||
|
||||
@php
|
||||
$classes = ($active ?? false)
|
||||
? 'block w-full pl-3 pr-4 py-2 border-l-4 border-primary-400 dark:border-primary-600 text-left text-base font-medium text-primary-700 dark:text-primary-300 bg-primary-50 dark:bg-primary-900/50 focus:outline-none focus:text-primary-800 dark:focus:text-primary-200 focus:bg-primary-100 dark:focus:bg-primary-900 focus:border-primary-700 dark:focus:border-primary-300 transition duration-150 ease-in-out'
|
||||
: 'block w-full pl-3 pr-4 py-2 border-l-4 border-transparent text-left text-base font-medium text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700 hover:border-gray-300 dark:hover:border-gray-600 focus:outline-none focus:text-gray-800 dark:focus:text-gray-200 focus:bg-gray-50 dark:focus:bg-gray-700 focus:border-gray-300 dark:focus:border-gray-600 transition duration-150 ease-in-out';
|
||||
$classes =
|
||||
$active ?? false
|
||||
? "block w-full border-l-4 border-primary-400 bg-primary-50 py-2 pl-3 pr-4 text-left text-base font-medium text-primary-700 transition duration-150 ease-in-out focus:border-primary-700 focus:bg-primary-100 focus:text-primary-800 focus:outline-none dark:border-primary-600 dark:bg-primary-900/50 dark:text-primary-300 dark:focus:border-primary-300 dark:focus:bg-primary-900 dark:focus:text-primary-200"
|
||||
: "block w-full border-l-4 border-transparent py-2 pl-3 pr-4 text-left text-base font-medium text-gray-600 transition duration-150 ease-in-out hover:border-gray-300 hover:bg-gray-50 hover:text-gray-800 focus:border-gray-300 focus:bg-gray-50 focus:text-gray-800 focus:outline-none dark:text-gray-400 dark:hover:border-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-200 dark:focus:border-gray-600 dark:focus:bg-gray-700 dark:focus:text-gray-200";
|
||||
@endphp
|
||||
|
||||
<a {{ $attributes->merge(['class' => $classes]) }}>
|
||||
<a {{ $attributes->merge(["class" => $classes]) }}>
|
||||
{{ $slot }}
|
||||
</a>
|
||||
|
@ -1,24 +1,31 @@
|
||||
@props(['href', 'type', 'span', 'disabled'])
|
||||
@props([
|
||||
"href",
|
||||
"type",
|
||||
"span",
|
||||
"disabled",
|
||||
])
|
||||
|
||||
@php
|
||||
$class = 'inline-flex items-center px-4 py-1 h-9 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-500 rounded-md font-semibold text-gray-700 dark:text-gray-300 shadow-sm hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 disabled:opacity-25 transition ease-in-out duration-150';
|
||||
$class =
|
||||
"inline-flex h-9 items-center rounded-md border border-gray-300 bg-white px-4 py-1 font-semibold text-gray-700 shadow-sm transition duration-150 ease-in-out hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 disabled:opacity-25 dark:border-gray-500 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700 dark:focus:ring-offset-gray-800";
|
||||
@endphp
|
||||
|
||||
@if(isset($href))
|
||||
@if(isset($disabled))
|
||||
@if (isset($href))
|
||||
@if (isset($disabled))
|
||||
@php
|
||||
$class .= ' opacity-25 cursor-default';
|
||||
$class .= " opacity-25 cursor-default";
|
||||
@endphp
|
||||
<span {{ $attributes->merge(['class' => $class]) }}>
|
||||
|
||||
<span {{ $attributes->merge(["class" => $class]) }}>
|
||||
{{ $slot }}
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ $href }}" {{ $attributes->merge(['class' => $class]) }}>
|
||||
<a href="{{ $href }}" {{ $attributes->merge(["class" => $class]) }}>
|
||||
{{ $slot }}
|
||||
</a>
|
||||
@endif
|
||||
@else
|
||||
<button {{ $attributes->merge(['type' => $type ?? 'submit', 'class' => $class]) }}>
|
||||
<button {{ $attributes->merge(["type" => $type ?? "submit", "class" => $class]) }}>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
@endif
|
||||
|
@ -1,11 +1,14 @@
|
||||
@props(['active'])
|
||||
@props([
|
||||
"active",
|
||||
])
|
||||
|
||||
@php
|
||||
$classes = ($active ?? false)
|
||||
? 'h-10 flex items-center justify-start rounded-lg px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-800 bg-primary-50 dark:bg-primary-500 dark:bg-opacity-20 text-primary-500 font-semibold'
|
||||
: 'h-10 flex items-center justify-start rounded-lg px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-800 dark:text-gray-300 font-semibold';
|
||||
$classes =
|
||||
$active ?? false
|
||||
? "flex h-10 items-center justify-start rounded-lg bg-primary-50 px-3 py-2 font-semibold text-primary-500 hover:bg-gray-100 dark:bg-primary-500 dark:bg-opacity-20 dark:hover:bg-gray-800"
|
||||
: "flex h-10 items-center justify-start rounded-lg px-3 py-2 font-semibold text-gray-800 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-800";
|
||||
@endphp
|
||||
|
||||
<a {{ $attributes->merge(['class' => $classes]) }}>
|
||||
<a {{ $attributes->merge(["class" => $classes]) }}>
|
||||
{{ $slot }}
|
||||
</a>
|
||||
|
@ -1,17 +1,23 @@
|
||||
<div {!! $attributes->merge(['class' => 'flex justify-between md:col-span-1 mb-5']) !!}>
|
||||
@if(isset($title) || isset($description))
|
||||
<div
|
||||
{!! $attributes->merge(["class" => "flex justify-between md:col-span-1 mb-5"]) !!}
|
||||
>
|
||||
@if (isset($title) || isset($description))
|
||||
<div>
|
||||
@if(isset($title))
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-300">{{ $title }}</h3>
|
||||
@if (isset($title))
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-300">
|
||||
{{ $title }}
|
||||
</h3>
|
||||
@endif
|
||||
@if(isset($description))
|
||||
|
||||
@if (isset($description))
|
||||
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ $description }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
@if(isset($aside))
|
||||
|
||||
@if (isset($aside))
|
||||
<div>
|
||||
{{ $aside }}
|
||||
</div>
|
||||
|
@ -1,5 +1,8 @@
|
||||
@props(['disabled' => false])
|
||||
@props(["disabled" => false])
|
||||
|
||||
<select {{ $disabled ? 'disabled' : '' }} {!! $attributes->merge(['class' => 'border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-primary-500 dark:focus:border-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600 rounded-md shadow-sm']) !!}>
|
||||
<select
|
||||
{{ $disabled ? "disabled" : "" }}
|
||||
{!! $attributes->merge(["class" => "border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-primary-500 dark:focus:border-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600 rounded-md shadow-sm"]) !!}
|
||||
>
|
||||
{{ $slot }}
|
||||
</select>
|
||||
|
@ -1,12 +1,16 @@
|
||||
@props(['active'])
|
||||
@props([
|
||||
"active",
|
||||
])
|
||||
|
||||
@php
|
||||
$class = 'flex w-full items-center justify-center rounded-md border-2 bg-primary-50 px-3 pt-3 pb-2 dark:bg-primary-500 dark:bg-opacity-10 cursor-pointer';
|
||||
$classes = ($active ?? false)
|
||||
? $class . ' border-primary-600'
|
||||
: $class . ' border-primary-200 dark:border-primary-600 dark:border-opacity-20'
|
||||
$class =
|
||||
"flex w-full cursor-pointer items-center justify-center rounded-md border-2 bg-primary-50 px-3 pb-2 pt-3 dark:bg-primary-500 dark:bg-opacity-10";
|
||||
$classes =
|
||||
$active ?? false
|
||||
? $class . " border-primary-600"
|
||||
: $class . " border-primary-200 dark:border-primary-600 dark:border-opacity-20"
|
||||
@endphp
|
||||
|
||||
<div {{ $attributes->merge(['class' => $classes]) }}>
|
||||
<a {{ $attributes->merge(["class" => $classes]) }}>
|
||||
{{ $slot }}
|
||||
</div>
|
||||
</a>
|
||||
|
@ -1,11 +1,14 @@
|
||||
@props(['active'])
|
||||
@props([
|
||||
"active",
|
||||
])
|
||||
|
||||
@php
|
||||
$classes = ($active ?? false)
|
||||
? 'h-10 rounded-md px-4 py-3 text-md font-semibold flex items-center bg-gray-900 text-primary-500 transition duration-150 ease-in-out transition-all duration-100'
|
||||
: 'h-10 rounded-md px-4 py-3 text-md font-semibold flex items-center text-gray-500 transition duration-150 ease-in-out transition-all duration-100 hover:bg-gray-900';
|
||||
$classes =
|
||||
$active ?? false
|
||||
? "text-md flex h-10 items-center rounded-md bg-gray-900 px-4 py-3 font-semibold text-primary-500 transition transition-all duration-100 duration-150 ease-in-out"
|
||||
: "text-md flex h-10 items-center rounded-md px-4 py-3 font-semibold text-gray-500 transition transition-all duration-100 duration-150 ease-in-out hover:bg-gray-900";
|
||||
@endphp
|
||||
|
||||
<a {{ $attributes->merge(['class' => $classes]) }}>
|
||||
<a {{ $attributes->merge(["class" => $classes]) }}>
|
||||
{{ $slot }}
|
||||
</a>
|
||||
|
@ -1,3 +1,5 @@
|
||||
<div {!! $attributes->merge(['class' => 'bg-white border boarder-gray-200 dark:border-gray-700 dark:bg-gray-800 p-6 rounded-md']) !!}>
|
||||
<div
|
||||
{!! $attributes->merge(["class" => "bg-white border boarder-gray-200 dark:border-gray-700 dark:bg-gray-800 p-6 rounded-md"]) !!}
|
||||
>
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
@ -1,12 +1,16 @@
|
||||
@props(['active'])
|
||||
@props([
|
||||
"active",
|
||||
])
|
||||
|
||||
@php
|
||||
$class = 'flex w-full items-center justify-center rounded-md border-2 bg-primary-50 px-3 pt-3 pb-2 dark:bg-primary-500 dark:bg-opacity-10 cursor-pointer';
|
||||
$classes = ($active ?? false)
|
||||
? $class . ' border-primary-600'
|
||||
: $class . ' border-primary-200 dark:border-primary-600 dark:border-opacity-20'
|
||||
$class =
|
||||
"flex w-full cursor-pointer items-center justify-center rounded-md border-2 bg-primary-50 px-3 pb-2 pt-3 dark:bg-primary-500 dark:bg-opacity-10";
|
||||
$classes =
|
||||
$active ?? false
|
||||
? $class . " border-primary-600"
|
||||
: $class . " border-primary-200 dark:border-primary-600 dark:border-opacity-20"
|
||||
@endphp
|
||||
|
||||
<div {{ $attributes->merge(['class' => $classes]) }}>
|
||||
<div {{ $attributes->merge(["class" => $classes]) }}>
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
@ -1,4 +1,6 @@
|
||||
@props(['status'])
|
||||
@props([
|
||||
"status",
|
||||
])
|
||||
|
||||
@php
|
||||
$class = [
|
||||
@ -10,6 +12,6 @@
|
||||
];
|
||||
@endphp
|
||||
|
||||
<div {{ $attributes->merge(['class' => $class[$status]]) }}>
|
||||
<div {{ $attributes->merge(["class" => $class[$status]]) }}>
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
@ -1,4 +1,6 @@
|
||||
<div {!! $attributes->merge(['class' => 'inline-block min-w-full overflow-x-auto rounded-md bg-white align-middle border border-gray-200 dark:border-gray-700 dark:bg-gray-800']) !!}>
|
||||
<div
|
||||
{!! $attributes->merge(["class" => "inline-block min-w-full overflow-x-auto rounded-md bg-white align-middle border border-gray-200 dark:border-gray-700 dark:bg-gray-800"]) !!}
|
||||
>
|
||||
<table class="min-w-full">
|
||||
{{ $slot }}
|
||||
</table>
|
||||
|
@ -1,3 +1,5 @@
|
||||
<td {!! $attributes->merge(['class' => 'whitespace-nowrap border-t border-gray-200 px-6 py-4 text-gray-700 dark:border-gray-700 dark:text-gray-300 w-1']) !!}>
|
||||
<td
|
||||
{!! $attributes->merge(["class" => "whitespace-nowrap border-t border-gray-200 px-6 py-4 text-gray-700 dark:border-gray-700 dark:text-gray-300 w-1"]) !!}
|
||||
>
|
||||
{{ $slot }}
|
||||
</td>
|
||||
|
@ -1,3 +1,7 @@
|
||||
@props(['disabled' => false])
|
||||
@props(["disabled" => false])
|
||||
|
||||
<input {{ $disabled ? 'disabled' : '' }} {!! $attributes->merge(['class' => 'border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-primary-500 dark:focus:border-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600 rounded-md shadow-sm']) !!}>
|
||||
<input
|
||||
hx-disable
|
||||
{{ $disabled ? "disabled" : "" }}
|
||||
{!! $attributes->merge(["class" => "border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-primary-500 dark:focus:border-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600 rounded-md shadow-sm"]) !!}
|
||||
/>
|
||||
|
@ -1,3 +1,8 @@
|
||||
@props(['disabled' => false])
|
||||
@props(["disabled" => false])
|
||||
|
||||
<textarea {{ $disabled ? 'disabled' : '' }} {!! $attributes->merge(['class' => 'border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-primary-500 dark:focus:border-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600 rounded-md shadow-sm w-full']) !!}>{{ $slot }}</textarea>
|
||||
<textarea
|
||||
{{ $disabled ? "disabled" : "" }}
|
||||
{!! $attributes->merge(["class" => "border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-primary-500 dark:focus:border-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600 rounded-md shadow-sm w-full"]) !!}
|
||||
>
|
||||
{{ $slot }}</textarea
|
||||
>
|
||||
|
@ -1,3 +1,5 @@
|
||||
<th {!! $attributes->merge(['class' => 'whitespace-nowrap bg-gray-50 px-6 py-3 text-left text-xs font-medium uppercase leading-4 tracking-wider text-gray-500 dark:bg-gray-700 dark:text-gray-400']) !!}>
|
||||
<th
|
||||
{!! $attributes->merge(["class" => "whitespace-nowrap bg-gray-50 px-6 py-3 text-left text-xs font-medium uppercase leading-4 tracking-wider text-gray-500 dark:bg-gray-700 dark:text-gray-400"]) !!}
|
||||
>
|
||||
{{ $slot }}
|
||||
</th>
|
||||
|
@ -1,13 +1,16 @@
|
||||
<div>
|
||||
<div id="toast" hx-swap-oob="true">
|
||||
<script>
|
||||
window.addEventListener('toast', (e) => {
|
||||
window.toastr[e.detail.type](e.detail.message)
|
||||
window.toastr[e.detail.type](e.detail.message);
|
||||
});
|
||||
</script>
|
||||
@if(session()->has('toast.type') && session()->has('toast.message'))
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
window.toastr['{{ session()->get('toast.type') }}']('{{ session()->get('toast.message') }}');
|
||||
@if (session()->has("toast.type") && session()->has("toast.message"))
|
||||
<script defer>
|
||||
if (window.toastr) {
|
||||
window.toastr['{{ session()->get("toast.type") }}']('{{ session()->get("toast.message") }}');
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
window.toastr['{{ session()->get("toast.type") }}']('{{ session()->get("toast.message") }}');
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
|
42
resources/views/components/user-dropdown.blade.php
Normal file
42
resources/views/components/user-dropdown.blade.php
Normal file
@ -0,0 +1,42 @@
|
||||
<div class="flex items-center text-gray-600 dark:text-gray-300">
|
||||
<x-dropdown align="right" width="48">
|
||||
<x-slot name="trigger">
|
||||
<button class="flex items-center">
|
||||
<x-heroicon-o-cog-6-tooth class="h-7 w-7" />
|
||||
</button>
|
||||
</x-slot>
|
||||
<x-slot name="content">
|
||||
<x-dropdown-link :href="route('profile')">
|
||||
{{ __("Profile") }}
|
||||
</x-dropdown-link>
|
||||
<x-dropdown-link :href="route('projects')">
|
||||
{{ __("Projects") }}
|
||||
</x-dropdown-link>
|
||||
<x-dropdown-link :href="route('server-providers')">
|
||||
{{ __("Server Providers") }}
|
||||
</x-dropdown-link>
|
||||
<x-dropdown-link :href="route('source-controls')">
|
||||
{{ __("Source Controls") }}
|
||||
</x-dropdown-link>
|
||||
<x-dropdown-link :href="route('storage-providers')">
|
||||
{{ __("Storage Providers") }}
|
||||
</x-dropdown-link>
|
||||
<x-dropdown-link :href="route('notification-channels')">
|
||||
{{ __("Notification Channels") }}
|
||||
</x-dropdown-link>
|
||||
<x-dropdown-link :href="route('ssh-keys')">
|
||||
{{ __("SSH Keys") }}
|
||||
</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>
|
@ -1,5 +1,5 @@
|
||||
<x-server-layout :server="$server">
|
||||
<x-slot name="pageTitle">{{ __("Cronjobs") }}</x-slot>
|
||||
|
||||
<livewire:cronjobs.cronjobs-list :server="$server"/>
|
||||
@include("cronjobs.partrials.cronjobs-list")
|
||||
</x-server-layout>
|
||||
|
116
resources/views/cronjobs/partrials/create-cronjob.blade.php
Normal file
116
resources/views/cronjobs/partrials/create-cronjob.blade.php
Normal file
@ -0,0 +1,116 @@
|
||||
<div>
|
||||
<x-primary-button x-data="" x-on:click.prevent="$dispatch('open-modal', 'create-cronjob')">
|
||||
{{ __("Create Cronjob") }}
|
||||
</x-primary-button>
|
||||
|
||||
<x-modal name="create-cronjob">
|
||||
<form
|
||||
id="create-cronjob-form"
|
||||
hx-post="{{ route("servers.cronjobs.store", ["server" => $server]) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-select="#create-cronjob-form"
|
||||
class="p-6"
|
||||
x-data="{
|
||||
frequency: '{{ old("frequency", "* * * * *") }}',
|
||||
custom: '{{ old("custom", "") }}',
|
||||
}"
|
||||
>
|
||||
@csrf
|
||||
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("Create Cronjob") }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="command" :value="__('Command')" />
|
||||
<x-text-input
|
||||
value="{{ old('command') }}"
|
||||
id="command"
|
||||
name="command"
|
||||
type="text"
|
||||
class="mt-1 w-full"
|
||||
/>
|
||||
@error("command")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
@php
|
||||
$user = old("user", "vito");
|
||||
@endphp
|
||||
|
||||
<x-input-label for="user" :value="__('User')" />
|
||||
<x-select-input id="user" name="user" class="mt-1 w-full">
|
||||
<option value="" selected disabled>
|
||||
{{ __("Select") }}
|
||||
</option>
|
||||
<option value="root" @if($user === 'root') selected @endif>root</option>
|
||||
<option value="{{ $server->ssh_user }}" @if($user === $server->ssh_user) selected @endif>
|
||||
{{ $server->ssh_user }}
|
||||
</option>
|
||||
</x-select-input>
|
||||
@error("user")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
@php
|
||||
$frequency = old("frequency", "* * * * *");
|
||||
@endphp
|
||||
|
||||
<x-input-label for="frequency" :value="__('Frequency')" />
|
||||
<x-select-input id="frequency" name="frequency" class="mt-1 w-full" x-model="frequency">
|
||||
<option value="" selected disabled>
|
||||
{{ __("Select") }}
|
||||
</option>
|
||||
<option value="* * * * *" @if($frequency === '* * * * *') selected @endif>
|
||||
{{ __("Every minute") }}
|
||||
</option>
|
||||
<option value="0 * * * *" @if($frequency === '0 * * * *') selected @endif>
|
||||
{{ __("Hourly") }}
|
||||
</option>
|
||||
<option value="0 0 * * *" @if($frequency === '0 0 * * *') selected @endif>
|
||||
{{ __("Daily") }}
|
||||
</option>
|
||||
<option value="0 0 * * 0" @if($frequency === '0 0 * * 0') selected @endif>
|
||||
{{ __("Weekly") }}
|
||||
</option>
|
||||
<option value="0 0 1 * *" @if($frequency === '0 0 1 * *') selected @endif>
|
||||
{{ __("Monthly") }}
|
||||
</option>
|
||||
<option value="custom">{{ __("Custom") }}</option>
|
||||
</x-select-input>
|
||||
@error("frequency")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div x-show="frequency === 'custom'" class="mt-6">
|
||||
<x-input-label for="custom" :value="__('Custom Frequency')" />
|
||||
<x-text-input
|
||||
value="{{ old('custom') }}"
|
||||
id="custom"
|
||||
name="custom"
|
||||
type="text"
|
||||
class="mt-1 w-full"
|
||||
placeholder="* * * * *"
|
||||
/>
|
||||
@error("custom")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Cancel") }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button class="ml-3" hx-disable>
|
||||
{{ __("Create") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
||||
</div>
|
52
resources/views/cronjobs/partrials/cronjobs-list.blade.php
Normal file
52
resources/views/cronjobs/partrials/cronjobs-list.blade.php
Normal file
@ -0,0 +1,52 @@
|
||||
<div x-data="{ deleteAction: '' }">
|
||||
<x-card-header>
|
||||
<x-slot name="title">{{ __("Cronjobs") }}</x-slot>
|
||||
<x-slot name="description">
|
||||
{{ __("Your server's Cronjobs are here. You can manage them") }}
|
||||
</x-slot>
|
||||
<x-slot name="aside">
|
||||
@include("cronjobs.partrials.create-cronjob")
|
||||
</x-slot>
|
||||
</x-card-header>
|
||||
<x-live id="live-cronjobs">
|
||||
<div x-data="" class="space-y-3">
|
||||
@if (count($cronjobs) > 0)
|
||||
@foreach ($cronjobs as $cronjob)
|
||||
<x-item-card>
|
||||
<div class="flex flex-grow flex-col items-start justify-center">
|
||||
<span class="mb-1 flex items-center lowercase text-red-600">
|
||||
{{ $cronjob->command }}
|
||||
</span>
|
||||
<span class="text-sm text-gray-400">
|
||||
{{ $cronjob->frequency_label }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
@include("cronjobs.partrials.status", ["status" => $cronjob->status])
|
||||
<div class="inline">
|
||||
<x-icon-button
|
||||
x-on:click="deleteAction = '{{ route('servers.cronjobs.destroy', ['server' => $server, 'cronJob' => $cronjob]) }}'; $dispatch('open-modal', 'delete-cronjob')"
|
||||
>
|
||||
<x-heroicon-o-trash class="h-5 w-5" />
|
||||
</x-icon-button>
|
||||
</div>
|
||||
</div>
|
||||
</x-item-card>
|
||||
@endforeach
|
||||
@else
|
||||
<x-simple-card>
|
||||
<div class="text-center">
|
||||
{{ __("You haven't connected to any server providers yet!") }}
|
||||
</div>
|
||||
</x-simple-card>
|
||||
@endif
|
||||
</div>
|
||||
</x-live>
|
||||
<x-confirmation-modal
|
||||
name="delete-cronjob"
|
||||
:title="__('Confirm')"
|
||||
:description="__('Are you sure that you want to delete this cronjob?')"
|
||||
method="delete"
|
||||
x-bind:action="deleteAction"
|
||||
/>
|
||||
</div>
|
@ -1,9 +1,11 @@
|
||||
@if($status == \App\Enums\SshKeyStatus::ADDED)
|
||||
@if ($status == \App\Enums\CronjobStatus::READY)
|
||||
<x-status status="success">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\SshKeyStatus::ADDING)
|
||||
|
||||
@if ($status == \App\Enums\CronjobStatus::CREATING)
|
||||
<x-status status="warning">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\SshKeyStatus::DELETING)
|
||||
|
||||
@if ($status == \App\Enums\CronjobStatus::DELETING)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
@ -1,4 +1,3 @@
|
||||
<x-server-layout :server="$server">
|
||||
<x-slot name="pageTitle">{{ __("Daemons") }}</x-slot>
|
||||
|
||||
</x-server-layout>
|
||||
|
@ -2,6 +2,6 @@
|
||||
<x-slot name="pageTitle">{{ __("Backup Files") }}</x-slot>
|
||||
|
||||
<div class="space-y-10">
|
||||
<livewire:databases.database-backup-files :server="$server" :backup="$backup" />
|
||||
@include("databases.partials.database-backup-files")
|
||||
</div>
|
||||
</x-server-layout>
|
||||
|
@ -2,10 +2,10 @@
|
||||
<x-slot name="pageTitle">{{ __("Databases") }}</x-slot>
|
||||
|
||||
<div class="space-y-10">
|
||||
<livewire:databases.database-list :server="$server" />
|
||||
@include("databases.partials.database-list")
|
||||
|
||||
<livewire:databases.database-user-list :server="$server" />
|
||||
@include("databases.partials.database-user-list")
|
||||
|
||||
<livewire:databases.database-backups :server="$server" />
|
||||
@include("databases.partials.database-backups")
|
||||
</div>
|
||||
</x-server-layout>
|
||||
|
@ -1,21 +1,27 @@
|
||||
@if($status == \App\Enums\BackupFileStatus::CREATED)
|
||||
@if ($status == \App\Enums\BackupFileStatus::CREATED)
|
||||
<x-status status="success">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\BackupFileStatus::CREATING)
|
||||
|
||||
@if ($status == \App\Enums\BackupFileStatus::CREATING)
|
||||
<x-status status="warning">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\BackupFileStatus::FAILED)
|
||||
|
||||
@if ($status == \App\Enums\BackupFileStatus::FAILED)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\BackupFileStatus::DELETING)
|
||||
|
||||
@if ($status == \App\Enums\BackupFileStatus::DELETING)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\BackupFileStatus::RESTORING)
|
||||
|
||||
@if ($status == \App\Enums\BackupFileStatus::RESTORING)
|
||||
<x-status status="warning">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\BackupFileStatus::RESTORED)
|
||||
|
||||
@if ($status == \App\Enums\BackupFileStatus::RESTORED)
|
||||
<x-status status="success">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\BackupFileStatus::RESTORE_FAILED)
|
||||
|
||||
@if ($status == \App\Enums\BackupFileStatus::RESTORE_FAILED)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
@ -1,9 +1,11 @@
|
||||
@if($status == \App\Enums\BackupStatus::RUNNING)
|
||||
@if ($status == \App\Enums\BackupStatus::RUNNING)
|
||||
<x-status status="success">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\BackupStatus::DELETING)
|
||||
|
||||
@if ($status == \App\Enums\BackupStatus::DELETING)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\BackupStatus::FAILED)
|
||||
|
||||
@if ($status == \App\Enums\BackupStatus::FAILED)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
105
resources/views/databases/partials/create-backup-modal.blade.php
Normal file
105
resources/views/databases/partials/create-backup-modal.blade.php
Normal file
@ -0,0 +1,105 @@
|
||||
<x-primary-button x-on:click="$dispatch('open-modal', 'create-backup')">
|
||||
{{ __("Create Backup") }}
|
||||
</x-primary-button>
|
||||
<x-modal name="create-backup">
|
||||
<form
|
||||
id="create-backup-form"
|
||||
hx-post="{{ route("servers.databases.backups.store", ["server" => $server]) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-select="#create-backup-form"
|
||||
hx-ext="disable-element"
|
||||
hx-disable-element="#btn-create-backup"
|
||||
class="p-6"
|
||||
>
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("Create Backup") }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="backup_database" :value="__('Database')" />
|
||||
<x-select-input id="backup_database" name="backup_database" class="mt-1 w-full">
|
||||
<option value="" selected disabled>{{ __("Select") }}</option>
|
||||
@foreach ($databases as $db)
|
||||
<option value="{{ $db->id }}" @if($db->id == old('backup_database')) selected @endif>
|
||||
{{ $db->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</x-select-input>
|
||||
@error("backup_database")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="backup_storage" :value="__('Storage')" />
|
||||
<x-select-input id="backup_storage" name="backup_storage" class="mt-1 w-full">
|
||||
<option value="" selected disabled>{{ __("Select") }}</option>
|
||||
@foreach (auth()->user()->storageProviders as $st)
|
||||
<option value="{{ $st->id }}" @if(old('backup_storage') == $st->id) selected @endif>
|
||||
{{ $st->profile }} - {{ $st->provider }}
|
||||
</option>
|
||||
@endforeach
|
||||
</x-select-input>
|
||||
@error("backup_storage")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="backup_interval" :value="__('Interval')" />
|
||||
<x-select-input id="backup_interval" name="backup_interval" class="mt-1 w-full">
|
||||
<option value="" selected disabled>{{ __("Select") }}</option>
|
||||
<option value="0 * * * *" @if(old('backup_interval') === '0 * * * *') selected @endif>
|
||||
{{ __("Hourly") }}
|
||||
</option>
|
||||
<option value="0 0 * * *" @if(old('backup_interval') === '0 0 * * *') selected @endif>
|
||||
{{ __("Daily") }}
|
||||
</option>
|
||||
<option value="0 0 * * 0" @if(old('backup_interval') === '0 0 * * 0') selected @endif>
|
||||
{{ __("Weekly") }}
|
||||
</option>
|
||||
<option value="0 0 1 * *" @if(old('backup_interval') === '0 0 1 * *') selected @endif>
|
||||
{{ __("Monthly") }}
|
||||
</option>
|
||||
<option value="custom">{{ __("Custom") }}</option>
|
||||
</x-select-input>
|
||||
@error("backup_interval")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
@if (old("backup_interval") === "custom")
|
||||
<div class="mt-6">
|
||||
<x-input-label for="backup_custom" :value="__('Custom interval (Cron)')" />
|
||||
<x-text-input
|
||||
id="backup_custom"
|
||||
name="backup_custom"
|
||||
type="text"
|
||||
class="mt-1 w-full"
|
||||
placeholder="* * * * *"
|
||||
/>
|
||||
@error("backup_custom")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="backup_keep" :value="__('Backups to Keep')" />
|
||||
<x-text-input id="backup_keep" name="backup_keep" type="text" class="mt-1 w-full" />
|
||||
@error("backup_keep")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Cancel") }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button id="btn-create-backup" class="ml-3">
|
||||
{{ __("Create") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
@ -0,0 +1,109 @@
|
||||
<x-modal name="create-database">
|
||||
<form
|
||||
id="create-database-form"
|
||||
hx-post="{{ route("servers.databases.store", $server) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-select="#create-database-form"
|
||||
hx-ext="disable-element"
|
||||
hx-disable-element="#btn-create-database"
|
||||
class="p-6"
|
||||
x-data="{ user: @js((bool) old("user", false)), remote: @js((bool) old("remote", false)) }"
|
||||
>
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("Create Database") }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="name" :value="__('Name')" />
|
||||
<x-text-input value="{{ old('name') }}" id="name" name="name" type="text" class="mt-1 w-full" />
|
||||
@error("name")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
<label for="user" class="inline-flex items-center">
|
||||
<input
|
||||
id="user"
|
||||
name="user"
|
||||
type="checkbox"
|
||||
x-model="user"
|
||||
class="rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:border-gray-700 dark:bg-gray-900 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800"
|
||||
/>
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __("Create a user for this database") }}
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div x-show="user">
|
||||
<div class="mt-6">
|
||||
<x-input-label for="db-username" :value="__('Username')" />
|
||||
<x-text-input
|
||||
value="{{ old('username') }}"
|
||||
id="db-username"
|
||||
name="username"
|
||||
type="text"
|
||||
class="mt-1 w-full"
|
||||
/>
|
||||
@error("username")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="db-password" :value="__('Password')" />
|
||||
<x-text-input
|
||||
value="{{ old('password') }}"
|
||||
id="db-password"
|
||||
name="password"
|
||||
type="text"
|
||||
class="mt-1 w-full"
|
||||
/>
|
||||
@error("password")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
<label for="db-remote" class="inline-flex items-center">
|
||||
<input
|
||||
id="db-remote"
|
||||
type="checkbox"
|
||||
x-model="remote"
|
||||
name="remote"
|
||||
class="rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:border-gray-700 dark:bg-gray-900 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800"
|
||||
/>
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __("Enable remote access") }}
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div x-show="remote">
|
||||
<div class="mt-6">
|
||||
<x-input-label for="db-host" :value="__('Host')" />
|
||||
<x-text-input value="{{ old('host') }}" id="db-host" name="host" type="text" class="mt-1 w-full" />
|
||||
<x-input-label
|
||||
for="db-host"
|
||||
:value="__('You might also need to open the database port in Firewall')"
|
||||
class="mt-1"
|
||||
/>
|
||||
@error("host")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Cancel") }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button id="btn-create-database" class="ml-3">
|
||||
{{ __("Create") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
@ -0,0 +1,84 @@
|
||||
<x-modal name="create-database-user">
|
||||
<form
|
||||
id="create-database-user-form"
|
||||
hx-post="{{ route("servers.databases.users.store", $server) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-select="#create-database-user-form"
|
||||
hx-ext="disable-element"
|
||||
hx-disable-element="#btn-database-user-database"
|
||||
class="p-6"
|
||||
x-data="{ remote: @js((bool) old("remote", false)) }"
|
||||
>
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("Create Database User") }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="user-username" :value="__('Username')" />
|
||||
<x-text-input
|
||||
value="{{ old('username') }}"
|
||||
id="user-username"
|
||||
name="username"
|
||||
type="text"
|
||||
class="mt-1 w-full"
|
||||
/>
|
||||
@error("username")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="user-password" :value="__('Password')" />
|
||||
<x-text-input
|
||||
value="{{ old('password') }}"
|
||||
id="user-password"
|
||||
name="password"
|
||||
type="text"
|
||||
class="mt-1 w-full"
|
||||
/>
|
||||
@error("password")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
<label for="user-remote" class="inline-flex items-center">
|
||||
<input
|
||||
id="user-remote"
|
||||
type="checkbox"
|
||||
x-model="remote"
|
||||
name="remote"
|
||||
class="rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:border-gray-700 dark:bg-gray-900 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800"
|
||||
/>
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __("Enable remote access") }}
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div x-show="remote">
|
||||
<div class="mt-6">
|
||||
<x-input-label for="user-host" :value="__('Host')" />
|
||||
<x-text-input value="{{ old('host') }}" id="user-host" name="host" type="text" class="mt-1 w-full" />
|
||||
<x-input-label
|
||||
for="user-host"
|
||||
:value="__('You might also need to open the database port in Firewall')"
|
||||
class="mt-1"
|
||||
/>
|
||||
@error("host")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Cancel") }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button id="btn-database-user-database" class="ml-3">
|
||||
{{ __("Create") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
@ -0,0 +1,94 @@
|
||||
<div x-data="{ restoreAction: '', deleteAction: '' }">
|
||||
<x-card-header>
|
||||
<x-slot name="title">{{ __("Backup Files") }}</x-slot>
|
||||
<x-slot name="description">
|
||||
{{ __("Here you can see your backup files") }}
|
||||
</x-slot>
|
||||
<x-slot name="aside">
|
||||
<div>
|
||||
<x-secondary-button :href="route('servers.databases', ['server' => $server])">
|
||||
{{ __("Back to Databases") }}
|
||||
</x-secondary-button>
|
||||
<x-primary-button
|
||||
class="ml-1"
|
||||
:href="route('servers.databases.backups.run', ['server' => $server, 'backup' => $backup])"
|
||||
>
|
||||
{{ __("Backup Now") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</x-slot>
|
||||
</x-card-header>
|
||||
<x-live id="live-backup-files">
|
||||
@if (count($files) > 0)
|
||||
<x-table class="mt-5">
|
||||
<tr>
|
||||
<x-th>{{ __("Name") }}</x-th>
|
||||
<x-th>{{ __("Created") }}</x-th>
|
||||
{{-- <x-th>{{ __("Size") }}</x-th> --}}
|
||||
<x-th>{{ __("Status") }}</x-th>
|
||||
<x-th>{{ __("Restored") }}</x-th>
|
||||
<x-th>{{ __("Restored To") }}</x-th>
|
||||
<x-th></x-th>
|
||||
</tr>
|
||||
@foreach ($files as $file)
|
||||
<tr>
|
||||
<x-td>{{ $file->name }}</x-td>
|
||||
<x-td>
|
||||
<x-datetime :value="$file->created_at" />
|
||||
</x-td>
|
||||
{{-- <x-td>{{ $file->size }}</x-td> --}}
|
||||
<x-td>
|
||||
<div class="inline-flex">
|
||||
@include("databases.partials.backup-file-status", ["status" => $file->status])
|
||||
</div>
|
||||
</x-td>
|
||||
<x-td>
|
||||
@if ($file->restored_at)
|
||||
<x-datetime :value="$file->restored_at" />
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</x-td>
|
||||
<x-td>
|
||||
@if ($file->restored_to)
|
||||
{{ $file->restored_to }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</x-td>
|
||||
<x-td class="flex w-full justify-end">
|
||||
@if (in_array($file->status, [\App\Enums\BackupFileStatus::CREATED, \App\Enums\BackupFileStatus::RESTORED, \App\Enums\BackupFileStatus::RESTORE_FAILED]))
|
||||
<x-icon-button
|
||||
x-on:click="restoreAction = '{{ route('servers.databases.backups.files.restore', ['server' => $server, 'backup' => $backup, 'backupFile' => $file]) }}'; $dispatch('open-modal', 'restore-backup')"
|
||||
>
|
||||
<x-heroicon-o-arrow-path class="h-5 w-5" />
|
||||
</x-icon-button>
|
||||
@endif
|
||||
|
||||
<x-icon-button
|
||||
x-on:click="deleteAction = '{{ route('servers.databases.backups.files.destroy', ['server' => $server, 'backup' => $backup, 'backupFile' => $file]) }}'; $dispatch('open-modal', 'delete-backup-file')"
|
||||
>
|
||||
<x-heroicon-o-trash class="h-5 w-5" />
|
||||
</x-icon-button>
|
||||
</x-td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</x-table>
|
||||
<div class="mt-5">
|
||||
{{ $files->withQueryString()->links() }}
|
||||
</div>
|
||||
@else
|
||||
<x-simple-card class="text-center">
|
||||
{{ __("You don't have any backups yet") }}
|
||||
</x-simple-card>
|
||||
@endif
|
||||
</x-live>
|
||||
@include("databases.partials.restore-backup-modal", ["databases" => $server->databases])
|
||||
<x-confirmation-modal
|
||||
name="delete-backup-file"
|
||||
:title="__('Confirm')"
|
||||
:description="__('Are you sure that you want to delete this file?')"
|
||||
method="delete"
|
||||
x-bind:action="deleteAction"
|
||||
/>
|
||||
</div>
|
@ -0,0 +1,61 @@
|
||||
<div x-data="{ deleteAction: '' }">
|
||||
<x-card-header>
|
||||
<x-slot name="title">{{ __("Backups") }}</x-slot>
|
||||
<x-slot name="description">
|
||||
{{ __("You can backup your databases into external storages") }}
|
||||
</x-slot>
|
||||
<x-slot name="aside">
|
||||
<div>
|
||||
@include("databases.partials.create-backup-modal")
|
||||
</div>
|
||||
</x-slot>
|
||||
</x-card-header>
|
||||
<x-live id="live-backups">
|
||||
@if (count($backups) > 0)
|
||||
<x-table>
|
||||
<tr>
|
||||
<x-th>{{ __("Database") }}</x-th>
|
||||
<x-th>{{ __("Created") }}</x-th>
|
||||
<x-th>{{ __("Status") }}</x-th>
|
||||
<x-th></x-th>
|
||||
</tr>
|
||||
@foreach ($backups as $backup)
|
||||
<tr>
|
||||
<x-td>{{ $backup->database->name }}</x-td>
|
||||
<x-td>
|
||||
<x-datetime :value="$backup->created_at" />
|
||||
</x-td>
|
||||
<x-td>
|
||||
<div class="inline-flex">
|
||||
@include("databases.partials.backup-status", ["status" => $backup->status])
|
||||
</div>
|
||||
</x-td>
|
||||
<x-td class="flex w-full justify-end">
|
||||
<x-icon-button
|
||||
:href="route('servers.databases.backups', ['server' => $server, 'backup' => $backup])"
|
||||
>
|
||||
<x-heroicon-o-circle-stack class="h-5 w-5" />
|
||||
</x-icon-button>
|
||||
<x-icon-button
|
||||
x-on:click="deleteAction = '{{ route('servers.databases.backups.destroy', ['server' => $server, 'backup' => $backup]) }}'; $dispatch('open-modal', 'delete-backup')"
|
||||
>
|
||||
<x-heroicon-o-trash class="h-5 w-5" />
|
||||
</x-icon-button>
|
||||
</x-td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</x-table>
|
||||
@else
|
||||
<x-simple-card class="text-center">
|
||||
{{ __("You don't have any backups yet") }}
|
||||
</x-simple-card>
|
||||
@endif
|
||||
</x-live>
|
||||
<x-confirmation-modal
|
||||
name="delete-backup"
|
||||
title="Confirm"
|
||||
description="Are you sure that you want to delete this backup?"
|
||||
method="delete"
|
||||
x-bind:action="deleteAction"
|
||||
/>
|
||||
</div>
|
59
resources/views/databases/partials/database-list.blade.php
Normal file
59
resources/views/databases/partials/database-list.blade.php
Normal file
@ -0,0 +1,59 @@
|
||||
<div x-data="{ deleteAction: '' }">
|
||||
<x-card-header>
|
||||
<x-slot name="title">{{ __("Databases") }}</x-slot>
|
||||
<x-slot name="description">
|
||||
{{ __("You can see and manage your databases here") }}
|
||||
</x-slot>
|
||||
<x-slot name="aside">
|
||||
<div>
|
||||
<x-primary-button x-data="" x-on:click.prevent="$dispatch('open-modal', 'create-database')">
|
||||
{{ __("Create Database") }}
|
||||
</x-primary-button>
|
||||
@include("databases.partials.create-database-modal")
|
||||
</div>
|
||||
</x-slot>
|
||||
</x-card-header>
|
||||
<x-live id="live-databases">
|
||||
@if (count($databases) > 0)
|
||||
<x-table>
|
||||
<tr>
|
||||
<x-th>{{ __("Name") }}</x-th>
|
||||
<x-th>{{ __("Created") }}</x-th>
|
||||
<x-th>{{ __("Status") }}</x-th>
|
||||
<x-th></x-th>
|
||||
</tr>
|
||||
@foreach ($databases as $database)
|
||||
<tr>
|
||||
<x-td>{{ $database->name }}</x-td>
|
||||
<x-td>
|
||||
<x-datetime :value="$database->created_at" />
|
||||
</x-td>
|
||||
<x-td>
|
||||
<div class="inline-flex">
|
||||
@include("databases.partials.database-status", ["status" => $database->status])
|
||||
</div>
|
||||
</x-td>
|
||||
<x-td class="flex w-full justify-end">
|
||||
<x-icon-button
|
||||
x-on:click="deleteAction = '{{ route('servers.databases.destroy', ['server' => $server, 'database' => $database]) }}'; $dispatch('open-modal', 'delete-database')"
|
||||
>
|
||||
<x-heroicon-o-trash class="h-5 w-5" />
|
||||
</x-icon-button>
|
||||
</x-td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</x-table>
|
||||
@else
|
||||
<x-simple-card class="text-center">
|
||||
{{ __("You don't have any databases yet") }}
|
||||
</x-simple-card>
|
||||
@endif
|
||||
</x-live>
|
||||
<x-confirmation-modal
|
||||
name="delete-database"
|
||||
title="Confirm"
|
||||
description="Are you sure that you want to delete this database?"
|
||||
method="delete"
|
||||
x-bind:action="deleteAction"
|
||||
/>
|
||||
</div>
|
@ -1,12 +1,15 @@
|
||||
@if($status == \App\Enums\DatabaseStatus::READY)
|
||||
@if ($status == \App\Enums\DatabaseStatus::READY)
|
||||
<x-status status="success">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\DatabaseStatus::CREATING)
|
||||
|
||||
@if ($status == \App\Enums\DatabaseStatus::CREATING)
|
||||
<x-status status="warning">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\DatabaseStatus::DELETING)
|
||||
|
||||
@if ($status == \App\Enums\DatabaseStatus::DELETING)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\DatabaseStatus::FAILED)
|
||||
|
||||
@if ($status == \App\Enums\DatabaseStatus::FAILED)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
@ -0,0 +1,84 @@
|
||||
<div x-data="{
|
||||
deleteAction: '',
|
||||
linkAction: '',
|
||||
linkedDatabases: [],
|
||||
}">
|
||||
<x-card-header>
|
||||
<x-slot name="title">{{ __("Database Users") }}</x-slot>
|
||||
<x-slot name="description">
|
||||
{{ __("You can see and manage your database users here") }}
|
||||
</x-slot>
|
||||
<x-slot name="aside">
|
||||
<div>
|
||||
<x-primary-button x-data="" x-on:click.prevent="$dispatch('open-modal', 'create-database-user')">
|
||||
{{ __("Create Database User") }}
|
||||
</x-primary-button>
|
||||
@include("databases.partials.create-database-user-modal")
|
||||
</div>
|
||||
</x-slot>
|
||||
</x-card-header>
|
||||
<x-live id="live-database-users">
|
||||
@if (count($databaseUsers) > 0)
|
||||
<x-table>
|
||||
<tr>
|
||||
<x-th>{{ __("Username") }}</x-th>
|
||||
<x-th>{{ __("Created") }}</x-th>
|
||||
<x-th class="flex items-center">
|
||||
<x-heroicon-o-link class="mr-1 h-5 w-5" />
|
||||
{{ __("Linked Databases") }}
|
||||
</x-th>
|
||||
<x-th>{{ __("Status") }}</x-th>
|
||||
<x-th></x-th>
|
||||
</tr>
|
||||
@foreach ($databaseUsers as $databaseUser)
|
||||
<tr>
|
||||
<x-td>{{ $databaseUser->username }}</x-td>
|
||||
<x-td>
|
||||
<x-datetime :value="$databaseUser->created_at" />
|
||||
</x-td>
|
||||
<x-td>[{{ $databaseUser->databases ? implode(", ", $databaseUser->databases) : "-" }}]</x-td>
|
||||
<x-td>
|
||||
<div class="inline-flex">
|
||||
@include("databases.partials.database-user-status", ["status" => $databaseUser->status])
|
||||
</div>
|
||||
</x-td>
|
||||
<x-td class="flex w-full justify-end">
|
||||
<x-icon-button
|
||||
x-on:click="$dispatch('open-modal', 'database-user-password'); document.getElementById('txt-database-user-password').value = 'Loading...';"
|
||||
hx-post="{{ route('servers.databases.users.password', ['server' => $server, 'databaseUser' => $databaseUser]) }}"
|
||||
hx-target="#database-user-password-content"
|
||||
hx-select="#database-user-password-content"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<x-heroicon-o-lock-closed class="h-5 w-5" />
|
||||
</x-icon-button>
|
||||
<x-icon-button
|
||||
x-on:click="linkAction = '{{ route('servers.databases.users.link', ['server' => $server, 'databaseUser' => $databaseUser]) }}';linkedDatabases = {{ json_encode($databaseUser->databases) }}; $dispatch('open-modal', 'link-database-user');"
|
||||
>
|
||||
<x-heroicon-o-link class="h-5 w-5" />
|
||||
</x-icon-button>
|
||||
<x-icon-button
|
||||
x-on:click="deleteAction = '{{ route('servers.databases.users.destroy', ['server' => $server, 'databaseUser' => $databaseUser]) }}'; $dispatch('open-modal', 'delete-database-user')"
|
||||
>
|
||||
<x-heroicon-o-trash class="h-5 w-5" />
|
||||
</x-icon-button>
|
||||
</x-td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</x-table>
|
||||
@else
|
||||
<x-simple-card class="text-center">
|
||||
{{ __("You don't have any database users yet") }}
|
||||
</x-simple-card>
|
||||
@endif
|
||||
</x-live>
|
||||
<x-confirmation-modal
|
||||
name="delete-database-user"
|
||||
title="Confirm"
|
||||
description="Are you sure that you want to delete this user?"
|
||||
method="delete"
|
||||
x-bind:action="deleteAction"
|
||||
/>
|
||||
@include("databases.partials.database-user-password-modal")
|
||||
@include("databases.partials.link-database-user-modal")
|
||||
</div>
|
@ -0,0 +1,45 @@
|
||||
<x-modal name="database-user-password">
|
||||
<div id="database-user-password-content" class="p-6">
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("View Password") }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label :value="__('Password')" />
|
||||
<x-text-input
|
||||
id="txt-database-user-password"
|
||||
type="text"
|
||||
class="mt-1 w-full"
|
||||
disabled
|
||||
value="{{ session()->has('password') ? session()->get('password') : '' }}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Close") }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button
|
||||
x-data="{ copied: false }"
|
||||
x-clipboard.raw="{{ session()->has('password') ? session()->get('password') : '' }}"
|
||||
class="ml-2"
|
||||
>
|
||||
<div x-show="copied" class="flex items-center">
|
||||
{{ __("Copied") }}
|
||||
</div>
|
||||
<div
|
||||
x-show="!copied"
|
||||
x-on:click="
|
||||
copied = true
|
||||
setTimeout(() => {
|
||||
copied = false
|
||||
}, 2000)
|
||||
"
|
||||
>
|
||||
{{ __("Copy") }}
|
||||
</div>
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</div>
|
||||
</x-modal>
|
@ -1,12 +1,15 @@
|
||||
@if($status == \App\Enums\DatabaseUserStatus::READY)
|
||||
@if ($status == \App\Enums\DatabaseUserStatus::READY)
|
||||
<x-status status="success">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\DatabaseUserStatus::CREATING)
|
||||
|
||||
@if ($status == \App\Enums\DatabaseUserStatus::CREATING)
|
||||
<x-status status="warning">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\DatabaseUserStatus::DELETING)
|
||||
|
||||
@if ($status == \App\Enums\DatabaseUserStatus::DELETING)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\DatabaseUserStatus::FAILED)
|
||||
|
||||
@if ($status == \App\Enums\DatabaseUserStatus::FAILED)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
@ -0,0 +1,52 @@
|
||||
<x-modal name="link-database-user">
|
||||
<div id="link-database-user-modal">
|
||||
<form
|
||||
id="link-database-user-form"
|
||||
:hx-post="linkAction"
|
||||
x-init="$watch('linkAction', () => htmx.process($el))"
|
||||
hx-swap="outerHTML"
|
||||
hx-select="#link-database-user-form"
|
||||
hx-ext="disable-element"
|
||||
hx-disable-element="#btn-link-database-user"
|
||||
class="p-6"
|
||||
>
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("Link User to Databases") }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
@foreach ($databases as $database)
|
||||
<div class="mb-2">
|
||||
<label for="db-{{ $database->id }}" class="inline-flex items-center">
|
||||
<input
|
||||
id="db-{{ $database->id }}"
|
||||
value="{{ $database->name }}"
|
||||
x-model="linkedDatabases"
|
||||
type="checkbox"
|
||||
name="databases[]"
|
||||
class="rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:border-gray-700 dark:bg-gray-900 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800"
|
||||
/>
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ $database->name }}
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@error("databases")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Close") }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button id="btn-link-database-user" class="ml-2">
|
||||
{{ __("Save") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</x-modal>
|
@ -0,0 +1,41 @@
|
||||
<x-modal name="restore-backup">
|
||||
<form
|
||||
id="restore-backup-form"
|
||||
:hx-post="restoreAction"
|
||||
x-init="$watch('restoreAction', () => htmx.process($el))"
|
||||
hx-swap="outerHTML"
|
||||
hx-select="#restore-backup-form"
|
||||
hx-ext="disable-element"
|
||||
hx-disable-element="#btn-restore"
|
||||
class="p-6"
|
||||
>
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("Restore Backup") }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="database" :value="__('Database')" />
|
||||
<x-select-input id="database" name="database" class="mt-1 w-full">
|
||||
<option value="" selected disabled>{{ __("Select") }}</option>
|
||||
@foreach ($databases as $db)
|
||||
<option value="{{ $db->id }}" @if(old('database') == $db->id) selected @endif>
|
||||
{{ $db->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</x-select-input>
|
||||
@error("database")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Cancel") }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button id="btn-restore" class="ml-3">
|
||||
{{ __("Restore") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
@ -1,5 +1,5 @@
|
||||
<x-server-layout :server="$server">
|
||||
<x-slot name="pageTitle">{{ __("Firewall") }}</x-slot>
|
||||
|
||||
<livewire:firewall.firewall-rules-list :server="$server"/>
|
||||
@include("firewall.partials.firewall-rules-list")
|
||||
</x-server-layout>
|
||||
|
@ -0,0 +1,92 @@
|
||||
<div>
|
||||
<x-primary-button x-data="" x-on:click.prevent="$dispatch('open-modal', 'create-rule')">
|
||||
{{ __("Create new Rule") }}
|
||||
</x-primary-button>
|
||||
|
||||
<x-modal name="create-rule">
|
||||
<form
|
||||
id="create-rule-form"
|
||||
hx-post="{{ route("servers.firewall.store", ["server" => $server]) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-select="#create-rule-form"
|
||||
class="p-6"
|
||||
>
|
||||
@csrf
|
||||
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("Create new Rule") }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="type" :value="__('Rule Type')" />
|
||||
<x-select-input id="type" name="type" class="mt-1 w-full">
|
||||
<option value="allow" @if(old('type', 'allow') === 'allow') selected @endif>
|
||||
{{ __("Allow") }}
|
||||
</option>
|
||||
<option value="deny" @if(old('type', 'allow') === 'deny') selected @endif>
|
||||
{{ __("Deny") }}
|
||||
</option>
|
||||
</x-select-input>
|
||||
@error("type")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6 grid grid-cols-1 gap-3 lg:grid-cols-2">
|
||||
<div>
|
||||
<x-input-label for="protocol" :value="__('Protocol')" />
|
||||
<x-select-input id="protocol" name="protocol" class="mt-1 w-full">
|
||||
@foreach (config("core.firewall_protocols_port") as $key => $value)
|
||||
<option value="{{ $key }}" @if($key === old('protocol')) selected @endif>
|
||||
{{ $key }}
|
||||
</option>
|
||||
@endforeach
|
||||
</x-select-input>
|
||||
@error("protocol")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<x-input-label for="port" :value="__('Port')" />
|
||||
<x-text-input value="{{ old('port') }}" id="port" name="port" type="text" class="mt-1 w-full" />
|
||||
@error("port")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<x-input-label for="source" :value="__('Source')" />
|
||||
<x-text-input
|
||||
value="{{ old('source') }}"
|
||||
id="source"
|
||||
name="source"
|
||||
type="text"
|
||||
class="mt-1 w-full"
|
||||
/>
|
||||
@error("source")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<x-input-label for="mask" :value="__('Mask')" />
|
||||
<x-text-input value="{{ old('mask') }}" id="mask" name="mask" type="text" class="mt-1 w-full" />
|
||||
@error("mask")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Cancel") }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button class="ml-3" hx-disable>
|
||||
{{ __("Create") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
||||
</div>
|
@ -0,0 +1,65 @@
|
||||
<div x-data="{ deleteAction: '' }">
|
||||
<x-card-header>
|
||||
<x-slot name="title">{{ __("Firewall Rules") }}</x-slot>
|
||||
<x-slot name="description">
|
||||
{{ __("Your server's firewall rules are here. You can manage them") }}
|
||||
</x-slot>
|
||||
<x-slot name="aside">
|
||||
@include("firewall.partials.create-firewall-rule")
|
||||
</x-slot>
|
||||
</x-card-header>
|
||||
|
||||
<x-live id="live-rules">
|
||||
<div x-data="" class="space-y-3">
|
||||
@foreach ($rules as $rule)
|
||||
<x-item-card>
|
||||
<div class="flex flex-grow flex-col items-start justify-center">
|
||||
<span class="mb-1 flex items-center uppercase">
|
||||
{{ $rule->protocol }}
|
||||
<x-status :status="$rule->type == 'allow' ? 'success' : 'danger'" class="ml-1">
|
||||
{{ $rule->type }}
|
||||
</x-status>
|
||||
</span>
|
||||
<span class="text-sm text-gray-400">
|
||||
{{ __("From") }}
|
||||
{{ $rule->source }}/{{ $rule->mask }} {{ __("Port") }} {{ $rule->port }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
@include("firewall.partials.status", ["status" => $rule->status])
|
||||
<div class="inline">
|
||||
<x-icon-button
|
||||
x-on:click="deleteAction = '{{ route('servers.firewall.destroy', ['server' => $server, 'firewallRule' => $rule]) }}'; $dispatch('open-modal', 'delete-rule')"
|
||||
>
|
||||
<x-heroicon-o-trash class="h-5 w-5" />
|
||||
</x-icon-button>
|
||||
</div>
|
||||
</div>
|
||||
</x-item-card>
|
||||
@endforeach
|
||||
|
||||
<x-item-card>
|
||||
<div class="flex flex-grow flex-col items-start justify-center">
|
||||
<span class="mb-1 flex items-center uppercase">
|
||||
{{ __("All") }}
|
||||
<x-status status="danger" class="ml-1">
|
||||
{{ __("Deny") }}
|
||||
</x-status>
|
||||
</span>
|
||||
<span class="text-sm text-gray-400">{{ __("From") }} 0.0.0.0/0</span>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
{{ __("Default") }}
|
||||
</div>
|
||||
</x-item-card>
|
||||
</div>
|
||||
</x-live>
|
||||
|
||||
<x-confirmation-modal
|
||||
name="delete-rule"
|
||||
:title="__('Confirm')"
|
||||
:description="__('Are you sure that you want to delete this rule?')"
|
||||
method="delete"
|
||||
x-bind:action="deleteAction"
|
||||
/>
|
||||
</div>
|
@ -1,9 +1,11 @@
|
||||
@if($status == \App\Enums\FirewallRuleStatus::READY)
|
||||
@if ($status == \App\Enums\FirewallRuleStatus::READY)
|
||||
<x-status status="success">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\FirewallRuleStatus::CREATING)
|
||||
|
||||
@if ($status == \App\Enums\FirewallRuleStatus::CREATING)
|
||||
<x-status status="warning">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\FirewallRuleStatus::DELETING)
|
||||
|
||||
@if ($status == \App\Enums\FirewallRuleStatus::DELETING)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
@ -1,212 +1,364 @@
|
||||
@props(['server'])
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
@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" />
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<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" />
|
||||
<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'])
|
||||
@include("layouts.partials.favicon")
|
||||
|
||||
@livewireStyles
|
||||
<!-- Scripts -->
|
||||
@vite(["resources/css/app.css", "resources/js/app.js"])
|
||||
</head>
|
||||
|
||||
<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>
|
||||
|
||||
@include('layouts.partials.favicon')
|
||||
</head>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
@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))
|
||||
<body
|
||||
class="min-h-screen min-w-max bg-gray-100 font-sans antialiased dark:bg-gray-900 dark:text-gray-300"
|
||||
x-data=""
|
||||
x-cloak
|
||||
hx-ext="source"
|
||||
>
|
||||
<div class="flex min-h-screen">
|
||||
<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 }}
|
||||
class="left-0 top-0 min-h-screen w-64 flex-none bg-gray-800 p-3 dark:border-r-2 dark:border-gray-800 dark:bg-gray-800/50"
|
||||
>
|
||||
<div class="block h-16">
|
||||
<div class="flex items-center justify-start text-2xl font-extrabold text-white">
|
||||
<x-application-logo class="h-7 w-7 rounded-md" />
|
||||
<span class="ml-1">Deploy</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-5">
|
||||
<div class="text-sm font-semibold uppercase text-gray-300">
|
||||
{{ __("Projects") }}
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
@include("layouts.partials.project-select", ["project" => auth()->user()->currentProject])
|
||||
</div>
|
||||
|
||||
<div class="mt-5 text-sm font-semibold uppercase text-gray-300">
|
||||
{{ __("Servers") }}
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
@include("layouts.partials.server-select", ["server" => isset($server) ? $server : null])
|
||||
</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="h-6 w-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="h-6 w-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="h-6 w-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="h-6 w-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="h-6 w-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="h-6 w-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="h-6 w-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="h-6 w-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="h-6 w-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="h-6 w-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>
|
||||
@endif
|
||||
|
||||
<div class="flex min-h-screen flex-grow flex-col">
|
||||
@include('layouts.navigation')
|
||||
|
||||
<!-- Page Heading -->
|
||||
@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 }}
|
||||
</div>
|
||||
</header>
|
||||
@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
|
||||
|
||||
@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">
|
||||
{{ $header2 }}
|
||||
</div>
|
||||
</header>
|
||||
@endif
|
||||
<div class="flex min-h-screen flex-grow flex-col">
|
||||
@include("layouts.navigation")
|
||||
|
||||
<!-- Page Content -->
|
||||
<main class="px-8">
|
||||
{{ $slot }}
|
||||
</main>
|
||||
<!-- Page Heading -->
|
||||
@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 }}
|
||||
</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 px-8 py-6">
|
||||
{{ $header2 }}
|
||||
</div>
|
||||
</header>
|
||||
@endif
|
||||
|
||||
<!-- Page Content -->
|
||||
<main class="px-8">
|
||||
{{ $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,14 @@
|
||||
<nav x-data="{ open: false }" class="h-16 border-b border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900">
|
||||
<nav x-data="{ open: false }" class="h-16 border-b border-gray-200 bg-white dark:border-gray-800 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">
|
||||
|
||||
</div>
|
||||
<div class="flex h-16 items-center justify-between">
|
||||
<div class="flex"></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-user-dropdown />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,24 +1,31 @@
|
||||
<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()
|
||||
},
|
||||
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>
|
||||
@ -30,13 +37,25 @@
|
||||
</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-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-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-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,30 +1,61 @@
|
||||
<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>
|
||||
<div
|
||||
@click="open = !open"
|
||||
class="text-md z-0 flex h-10 w-full cursor-pointer items-center rounded-md bg-gray-900 px-4 py-3 pr-10 leading-5 text-gray-100 focus:ring-1 focus:ring-gray-700"
|
||||
x-text="selected.name ?? 'Select Project'"
|
||||
></div>
|
||||
<button type="button" @click="open = !open" class="absolute inset-y-0 right-0 z-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"
|
||||
>
|
||||
class="absolute z-10 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="filterProjectsAndOpen"
|
||||
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-900 dark:text-gray-100"
|
||||
/>
|
||||
</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">
|
||||
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="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>
|
||||
<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="filteredProjects.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 projects 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('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">
|
||||
href="{{ route("projects") }}"
|
||||
class="relative block cursor-pointer select-none px-4 py-2 text-gray-700 hover:bg-primary-600 hover:text-white dark:text-white"
|
||||
>
|
||||
<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">
|
||||
href="{{ route("projects", ["create" => true]) }}"
|
||||
class="relative block cursor-pointer 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 Project</span>
|
||||
</a>
|
||||
</div>
|
||||
@ -68,7 +102,7 @@ function projectCombobox() {
|
||||
selectProject(project) {
|
||||
if (this.selected.id !== project.id) {
|
||||
this.selected = project;
|
||||
window.location.href = '{{ url('/settings/projects/') }}/' + project.id
|
||||
window.location.href = '{{ url('/settings/projects/switch') }}/' + project.id
|
||||
}
|
||||
},
|
||||
filterProjectsAndOpen() {
|
||||
|
@ -1,30 +1,61 @@
|
||||
<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>
|
||||
<div
|
||||
@click="open = !open"
|
||||
class="text-md z-0 flex h-10 w-full cursor-pointer items-center rounded-md bg-gray-900 px-4 py-3 pr-10 leading-5 text-gray-100 focus:ring-1 focus:ring-gray-700"
|
||||
x-text="selected.name ?? 'Select Server'"
|
||||
></div>
|
||||
<button type="button" @click="open = !open" class="absolute inset-y-0 right-0 z-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"
|
||||
>
|
||||
class="absolute z-10 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="filterServersAndOpen"
|
||||
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-900 dark:text-gray-100"
|
||||
/>
|
||||
</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">
|
||||
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="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>
|
||||
<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="filteredServers.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 servers 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') }}"
|
||||
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">
|
||||
href="{{ route("servers") }}"
|
||||
class="@if(request()->routeIs('servers')) 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">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">
|
||||
href="{{ route("servers.create") }}"
|
||||
class="@if(request()->routeIs('servers.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 Server</span>
|
||||
</a>
|
||||
</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,56 +1,145 @@
|
||||
<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="flex h-16 items-center justify-center border-b border-gray-200 px-3 py-2 dark:border-gray-800">
|
||||
<div class="w-full">
|
||||
<span>Account Settings</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-3 space-y-2">
|
||||
<div class="space-y-2 p-3">
|
||||
<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
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="mr-2 h-6 w-6"
|
||||
>
|
||||
<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') }}
|
||||
{{ __("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
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="mr-2 h-6 w-6"
|
||||
>
|
||||
<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') }}
|
||||
{{ __("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" />
|
||||
<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="mr-2 h-6 w-6"
|
||||
>
|
||||
<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') }}
|
||||
{{ __("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" />
|
||||
<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="mr-2 h-6 w-6"
|
||||
>
|
||||
<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') }}
|
||||
{{ __("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" />
|
||||
<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="mr-2 h-6 w-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>
|
||||
{{ __('Storage Providers') }}
|
||||
{{ __("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" />
|
||||
<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="mr-2 h-6 w-6"
|
||||
>
|
||||
<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') }}
|
||||
{{ __("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
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="mr-2 h-6 w-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>
|
||||
{{ __('SSH Keys') }}
|
||||
{{ __("SSH Keys") }}
|
||||
</x-secondary-sidebar-link>
|
||||
</div>
|
||||
</x-slot>
|
||||
|
@ -1,17 +1,36 @@
|
||||
<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" />
|
||||
@include("servers.partials.server-status")
|
||||
<x-input-label class="mt-1 cursor-pointer" x-data="{ copied: false }" x-clipboard.raw="{{ $server->ip }}">
|
||||
<div
|
||||
class="flex items-center text-sm"
|
||||
x-on:click="
|
||||
copied = true
|
||||
setTimeout(() => {
|
||||
copied = false
|
||||
}, 2000)
|
||||
"
|
||||
>
|
||||
<div x-show="copied" class="mr-1 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="h-4 w-4 font-bold text-primary-600 dark:text-white"
|
||||
>
|
||||
<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>
|
||||
</div>
|
||||
{{ $server->ip }}
|
||||
@ -20,7 +39,7 @@
|
||||
</div>
|
||||
</x-slot>
|
||||
|
||||
@if(isset($sidebar))
|
||||
@if (isset($sidebar))
|
||||
<x-slot name="sidebar">
|
||||
{{ $sidebar }}
|
||||
</x-slot>
|
||||
|
@ -1,45 +1,118 @@
|
||||
@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>
|
||||
<a href="{{ $site->activeSsl ? "https://" : "http://" . $site->domain }}" target="_blank">
|
||||
{{ $site->domain }}
|
||||
</a>
|
||||
</h2>
|
||||
<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
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="mr-1 h-5 w-5 text-gray-500"
|
||||
>
|
||||
<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" />
|
||||
@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" />
|
||||
<x-input-label
|
||||
class="mt-1 cursor-pointer"
|
||||
x-data="{ copied: false }"
|
||||
x-clipboard.raw="{{ $site->web_directory_path }}"
|
||||
>
|
||||
<div
|
||||
class="flex items-center text-sm"
|
||||
x-on:click="
|
||||
copied = true
|
||||
setTimeout(() => {
|
||||
copied = false
|
||||
}, 2000)
|
||||
"
|
||||
>
|
||||
<div x-show="copied" class="mr-1 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="h-4 w-4 font-bold text-primary-600 dark:text-white"
|
||||
>
|
||||
<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>
|
||||
</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
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="mr-1 h-5 w-5 text-gray-500"
|
||||
>
|
||||
<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" />
|
||||
@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" />
|
||||
<x-input-label
|
||||
class="mt-1 cursor-pointer"
|
||||
x-data="{ copied: false }"
|
||||
x-clipboard.raw="{{ $site->server->ip }}"
|
||||
>
|
||||
<div
|
||||
class="flex items-center text-sm"
|
||||
x-on:click="
|
||||
copied = true
|
||||
setTimeout(() => {
|
||||
copied = false
|
||||
}, 2000)
|
||||
"
|
||||
>
|
||||
<div x-show="copied" class="mr-1 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="h-4 w-4 font-bold text-primary-600 dark:text-white"
|
||||
>
|
||||
<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>
|
||||
</div>
|
||||
{{ $site->server->ip }}
|
||||
@ -50,30 +123,47 @@
|
||||
</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="flex h-16 items-center justify-center border-b border-gray-200 px-3 py-2 dark:border-gray-800">
|
||||
<div class="w-full">
|
||||
@include('layouts.partials.site-select', ['server' => $site->server, 'site' => $site ])
|
||||
@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') }}
|
||||
<div class="space-y-2 p-3">
|
||||
<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') }}
|
||||
@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') }}
|
||||
|
||||
@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
|
||||
: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
|
||||
:href="route('servers.sites.logs', ['server' => $site->server, 'site' => $site])"
|
||||
:active="request()->routeIs('servers.sites.logs')"
|
||||
>
|
||||
{{ __("Logs") }}
|
||||
</x-secondary-sidebar-link>
|
||||
</div>
|
||||
</x-slot>
|
||||
|
@ -1,32 +0,0 @@
|
||||
<div>
|
||||
@if($site->deploymentScript?->content)
|
||||
<x-dropdown>
|
||||
<x-slot name="trigger">
|
||||
<x-secondary-button>
|
||||
{{ __('Auto Deployment') }}
|
||||
<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 ml-1">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" />
|
||||
</svg>
|
||||
</x-secondary-button>
|
||||
</x-slot>
|
||||
<x-slot name="content">
|
||||
<x-dropdown-link class="cursor-pointer" wire:click="enable">
|
||||
{{ __("Enable") }}
|
||||
@if($site->auto_deployment)
|
||||
<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 ml-1 text-green-600">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
@endif
|
||||
</x-dropdown-link>
|
||||
<x-dropdown-link class="cursor-pointer" wire:click="disable">
|
||||
{{ __("Disable") }}
|
||||
@if(!$site->auto_deployment)
|
||||
<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 ml-1 text-green-600">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
@endif
|
||||
</x-dropdown-link>
|
||||
</x-slot>
|
||||
</x-dropdown>
|
||||
@endif
|
||||
</div>
|
@ -1,31 +0,0 @@
|
||||
<div x-data="">
|
||||
<x-modal name="change-branch">
|
||||
<form wire:submit="change" class="p-6">
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __('Change Branch') }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="branch" :value="__('Branch')" />
|
||||
<x-text-input wire:model="branch" id="branch" name="branch" type="text" class="mt-1 w-full" />
|
||||
@error('branch')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex items-center justify-end">
|
||||
@if (session('status') === 'updating-branch')
|
||||
<p class="mr-2">{{ __('Updating branch...') }}</p>
|
||||
@endif
|
||||
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __('Cancel') }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button class="ml-3">
|
||||
{{ __('Save') }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
||||
</div>
|
@ -1,5 +0,0 @@
|
||||
<div>
|
||||
@if($site->deploymentScript?->content)
|
||||
<x-primary-button wire:click="deploy" wire:loading.attr="disabled">{{ __("Deploy") }}</x-primary-button>
|
||||
@endif
|
||||
</div>
|
@ -1,31 +0,0 @@
|
||||
<div x-data="">
|
||||
<x-modal name="deployment-script">
|
||||
<form wire:submit="save" class="p-6">
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __('Deployment Script') }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="script" :value="__('Script')" />
|
||||
<x-textarea wire:model="script" rows="10" id="script" name="script" class="mt-1 w-full" />
|
||||
@error('script')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex items-center justify-end">
|
||||
@if (session('status') === 'script-updated')
|
||||
<p class="mr-2">{{ __('Saved') }}</p>
|
||||
@endif
|
||||
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __('Cancel') }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button class="ml-3">
|
||||
{{ __('Save') }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
||||
</div>
|
@ -1,51 +0,0 @@
|
||||
<div x-data="">
|
||||
<x-card-header>
|
||||
<x-slot name="title">{{ __("Deployments") }}</x-slot>
|
||||
</x-card-header>
|
||||
<x-table>
|
||||
<tr>
|
||||
<x-th>{{ __("Commit") }}</x-th>
|
||||
<x-th>{{ __("Date") }}</x-th>
|
||||
<x-th>{{ __("Status") }}</x-th>
|
||||
<x-th></x-th>
|
||||
</tr>
|
||||
@foreach($deployments as $deployment)
|
||||
<tr>
|
||||
<x-td>
|
||||
<a href="{{ $deployment->commit_data['url'] }}" target="_blank" class="text-primary-600 font-semibold">{{ $deployment->commit_data['message'] }}</a>
|
||||
</x-td>
|
||||
<x-td>
|
||||
<x-datetime :value="$deployment->created_at" />
|
||||
</x-td>
|
||||
<x-td>
|
||||
<div class="inline-flex">
|
||||
@include('livewire.application.partials.deployment-status', ['status' => $deployment->status])
|
||||
</div>
|
||||
</x-td>
|
||||
<x-td>
|
||||
@if($deployment->status != \App\Enums\DeploymentStatus::DEPLOYING)
|
||||
<x-icon-button wire:click="showLog({{ $deployment->id }})" wire:loading.attr="disabled">
|
||||
Logs
|
||||
</x-icon-button>
|
||||
@endif
|
||||
</x-td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</x-table>
|
||||
<div class="mt-5">
|
||||
{{ $deployments->withQueryString()->links() }}
|
||||
</div>
|
||||
<x-modal name="show-log" max-width="4xl">
|
||||
<div class="p-6">
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-5">
|
||||
{{ __('View Log') }}
|
||||
</h2>
|
||||
<x-console-view>{{ $logContent }}</x-console-view>
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __('Close') }}
|
||||
</x-secondary-button>
|
||||
</div>
|
||||
</div>
|
||||
</x-modal>
|
||||
</div>
|
@ -1,35 +0,0 @@
|
||||
<div x-data="">
|
||||
<x-modal name="update-env">
|
||||
<form wire:submit="save" class="p-6">
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __('Update .env File') }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="env" :value="__('.env')" />
|
||||
<x-textarea id="env" wire:init="loadEnv" wire:model="env" rows="10" class="mt-1 block w-full"></x-textarea>
|
||||
@error('env')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex items-center justify-end">
|
||||
@if (session('status') === 'updating-env')
|
||||
<p class="mr-2">{{ __('Updating env...') }}</p>
|
||||
@endif
|
||||
|
||||
@if (session('status') === 'env-updated')
|
||||
<p class="mr-2">{{ __('Saved') }}</p>
|
||||
@endif
|
||||
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __('Cancel') }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button class="ml-3">
|
||||
{{ __('Save') }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
||||
</div>
|
@ -1 +0,0 @@
|
||||
@include('livewire.application.php-app')
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user