css and stuffs

This commit is contained in:
Andras Bacsai 2023-05-18 13:26:35 +02:00
parent f2e91f97ed
commit b58a3bf209
49 changed files with 327 additions and 252 deletions

View File

@ -0,0 +1,9 @@
<?php
namespace App\Http\Livewire\Project\Application;
use Livewire\Component;
class Danger extends Component
{
}

View File

@ -2,10 +2,7 @@
namespace App\Http\Livewire\Project\Application\EnvironmentVariable; namespace App\Http\Livewire\Project\Application\EnvironmentVariable;
use App\Models\Application;
use App\Models\EnvironmentVariable as ModelsEnvironmentVariable; use App\Models\EnvironmentVariable as ModelsEnvironmentVariable;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\Route;
use Livewire\Component; use Livewire\Component;
class Show extends Component class Show extends Component

View File

@ -17,6 +17,7 @@ public function revertImage($tag)
} }
public function loadImages() public function loadImages()
{ {
sleep(2);
try { try {
$image = $this->application->uuid; $image = $this->application->uuid;
$output = instantRemoteProcess([ $output = instantRemoteProcess([

View File

@ -4,7 +4,6 @@
use App\Models\Application; use App\Models\Application;
use App\Models\LocalPersistentVolume; use App\Models\LocalPersistentVolume;
use Illuminate\Database\QueryException;
use Livewire\Component; use Livewire\Component;
class All extends Component class All extends Component

View File

@ -11,6 +11,8 @@ class Change extends Component
public string $host; public string $host;
public $parameters; public $parameters;
public GithubApp $github_app; public GithubApp $github_app;
public string $installation_url;
public string $name;
public bool $is_system_wide; public bool $is_system_wide;
protected $rules = [ protected $rules = [

11
package-lock.json generated
View File

@ -7,7 +7,8 @@
"dependencies": { "dependencies": {
"@tailwindcss/typography": "^0.5.9", "@tailwindcss/typography": "^0.5.9",
"alpinejs": "3.12.0", "alpinejs": "3.12.0",
"daisyui": "^2.51.6" "daisyui": "^2.51.6",
"tailwindcss-scrollbar": "^0.1.0"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^4.0.0", "@vitejs/plugin-vue": "^4.0.0",
@ -1883,6 +1884,14 @@
"postcss": "^8.0.9" "postcss": "^8.0.9"
} }
}, },
"node_modules/tailwindcss-scrollbar": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/tailwindcss-scrollbar/-/tailwindcss-scrollbar-0.1.0.tgz",
"integrity": "sha512-egipxw4ooQDh94x02XQpPck0P0sfwazwoUGfA9SedPATIuYDR+6qe8d31Gl7YsSMRiOKDkkqfI0kBvEw9lT/Hg==",
"peerDependencies": {
"tailwindcss": ">= 2.x.x"
}
},
"node_modules/thenify": { "node_modules/thenify": {
"version": "3.3.1", "version": "3.3.1",
"resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",

View File

@ -17,6 +17,7 @@
"dependencies": { "dependencies": {
"@tailwindcss/typography": "^0.5.9", "@tailwindcss/typography": "^0.5.9",
"alpinejs": "3.12.0", "alpinejs": "3.12.0",
"daisyui": "^2.51.6" "daisyui": "^2.51.6",
"tailwindcss-scrollbar": "^0.1.0"
} }
} }

View File

@ -2,32 +2,43 @@
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
* {
@apply scrollbar-thumb-yellow-400 scrollbar-track-coolgray-200 scrollbar-w-1;
}
html {
@apply h-full min-h-full bg-coolgray-100 ;
}
body { body {
@apply bg-coolgray-100 text-white; @apply bg-coolgray-100 text-white min-h-full antialiased;
}
input[type="checkbox"] {
@apply toggle toggle-warning toggle-sm;
} }
input { input {
@apply input w-full max-w-xl input-bordered input-sm; @apply input input-sm;
} }
textarea { input[type="text"],[type="number"],[type="email"],[type="password"] {
@apply textarea textarea-sm; @apply read-only:opacity-40;
} }
/* input,
textarea { textarea {
@apply border border-solid border-coolgray-500 bg-coolgray-200 rounded p-2 px-4 text-white outline-none transition-all; @apply textarea;
} }
input,
textarea {
@apply disabled:text-neutral-600 read-only:text-neutral-600 read-only:select-none read-only:bg-coolgray-200/50;
} */
select { select {
@apply border border-solid border-coolgray-400 rounded p-2 px-4 bg-coolgray-200 text-white disabled:text-neutral-600 read-only:select-none outline-none; @apply select select-sm disabled:opacity-40;
} }
button {
@apply btn btn-xs btn-ghost no-animation normal-case; button[type="button"] {
@apply btn btn-xs btn-ghost no-animation normal-case text-white;
} }
button[type="submit"] { button[type="submit"] {
@apply btn-primary btn-sm; @apply btn btn-xs no-animation normal-case text-white btn-primary;
}
button[isWarning] {
@apply btn-error text-white;
}
button[isHighlighted] {
@apply btn-primary text-white;
} }
h1 { h1 {
@apply text-3xl font-bold pb-4; @apply text-3xl font-bold pb-4;
@ -36,10 +47,10 @@ h2 {
@apply text-2xl font-bold pb-4; @apply text-2xl font-bold pb-4;
} }
h3 { h3 {
@apply text-xl font-bold pb-4; @apply text-xl font-bold py-4;
} }
a{ a {
@apply hover:text-white text-sm; @apply text-neutral-400 hover:text-white text-sm link link-hover hover:bg-transparent;
} }
.box { .box {

View File

@ -8,7 +8,7 @@
@env('local') value="test@example.com" @endenv autofocus /> @env('local') value="test@example.com" @endenv autofocus />
<input type="password" name="password" placeholder="{{ __('input.password') }}" <input type="password" name="password" placeholder="{{ __('input.password') }}"
@env('local') value="password" @endenv /> @env('local') value="password" @endenv />
<x-inputs.button isBold type="submit">{{ __('auth.login') }}</x-inputs.button> <x-inputs.button type="submit">{{ __('auth.login') }}</x-inputs.button>
</form> </form>
@if ($errors->any()) @if ($errors->any())
<div class="alert alert-danger"> <div class="alert alert-danger">

View File

@ -11,7 +11,7 @@
@env('local') value="password" @endenv /> @env('local') value="password" @endenv />
<input type="password" name="password_confirmation" placeholder="{{ __('input.password.again') }}" <input type="password" name="password_confirmation" placeholder="{{ __('input.password.again') }}"
@env('local') value="password" @endenv /> @env('local') value="password" @endenv />
<x-inputs.button isBold type="submit">{{ __('auth.register') }}</x-inputs.button> <x-inputs.button type="submit">{{ __('auth.register') }}</x-inputs.button>
</form> </form>
@if ($errors->any()) @if ($errors->any())
<div class="alert alert-danger"> <div class="alert alert-danger">

View File

@ -1,4 +1,4 @@
<nav class="flex justify-center gap-4 py-2 border-b-2 border-solid border-coolgray-200 "> <nav class="flex justify-center gap-4 py-2 border-b-2 border-solid border-coolgray-200">
<a <a
href="{{ route('project.application.configuration', [ href="{{ route('project.application.configuration', [
'project_uuid' => Route::current()->parameters()['project_uuid'], 'project_uuid' => Route::current()->parameters()['project_uuid'],
@ -16,14 +16,16 @@
Deployments Deployments
</a> </a>
<a target="_blank" href="{{ $application->gitBranchLocation }}"> <a target="_blank" href="{{ $application->gitBranchLocation }}">
Open on Git <img class="inline-flex w-4 h-4" src="{{ asset('svgs/external-link.svg') }}"> Open on Git
<x-external-link />
</a> </a>
@if (data_get($application, 'ports_mappings_array')) @if (data_get($application, 'ports_mappings_array'))
@foreach ($application->ports_mappings_array as $port) @foreach ($application->ports_mappings_array as $port)
@if (config('app.env') === 'local') @if (config('app.env') === 'local')
<a target="_blank" href="http://localhost:{{ explode(':', $port)[0] }}">Open <a target="_blank" href="http://localhost:{{ explode(':', $port)[0] }}">Open
{{ explode(':', $port)[0] }} <img class="inline-flex w-4 h-4" {{ explode(':', $port)[0] }}
src="{{ asset('svgs/external-link.svg') }}"></a> <x-external-link />
</a>
@else @else
<a target="_blank" <a target="_blank"
href="http://{{ $application->destination->server->ip }}:{{ explode(':', $port)[0] }}">Open href="http://{{ $application->destination->server->ip }}:{{ explode(':', $port)[0] }}">Open

View File

@ -22,7 +22,7 @@
<div class="flex flex-col items-center justify-center h-full"> <div class="flex flex-col items-center justify-center h-full">
<div class="pb-5 text-white" x-text="message"></div> <div class="pb-5 text-white" x-text="message"></div>
<div> <div>
<x-inputs.button isWarning x-on:click='confirmed()'>Confirm</x-inputs.button> <x-inputs.button x-on:click='confirmed()'>Confirm</x-inputs.button>
<x-inputs.button x-on:click="open = false">Cancel</x-inputs.button> <x-inputs.button x-on:click="open = false">Cancel</x-inputs.button>
</div> </div>
</div> </div>

View File

@ -0,0 +1 @@
<img class="inline-flex w-3 h-3 mb-1 ml-2" src="{{ asset('svgs/external-link.svg') }}">

View File

@ -1,17 +1,30 @@
@props([ @props([
'type' => $attributes->get('type') ?? 'button',
'disabled' => null, 'disabled' => null,
'confirm' => null, 'confirm' => null,
'confirmAction' => null, 'confirmAction' => null,
]) ])
<button {{ $attributes }} @if ($type === 'submit')
@if ($attributes->whereStartsWith('wire:click') && !$disabled) wire:target="{{ explode('(', $attributes->whereStartsWith('wire:click')->first())[0] }}" <button type="submit" @if ($disabled !== null) disabled @endif wire:target="submit"
wire:loading.delay.class='loading' wire:loading.delay.attr="disabled" @endif wire:loading.delay.shorter.class="loading"
@if ($disabled !== null) disabled title="{{ $disabled }}" @endif @isset($confirm)
@isset($confirm)
x-on:click="toggleConfirmModal('{{ $confirm }}', '{{ explode('(', $confirmAction)[0] }}')" x-on:click="toggleConfirmModal('{{ $confirm }}', '{{ explode('(', $confirmAction)[0] }}')"
@endisset @endisset
@isset($confirmAction) @isset($confirmAction)
x-on:{{ explode('(', $confirmAction)[0] }}.window="$wire.{{ explode('(', $confirmAction)[0] }}" x-on:{{ explode('(', $confirmAction)[0] }}.window="$wire.{{ explode('(', $confirmAction)[0] }}"
@endisset> @endisset>
{{ $slot }} {{ $slot }}
</button> </button>
@elseif($type === 'button')
<button {{ $attributes }} @if ($disabled !== null) disabled @endif type="button"
wire:target="{{ explode('(', $attributes->whereStartsWith('wire:click')->first())[0] }}"
wire:loading.delay.shorter.class="loading"
@isset($confirm)
x-on:click="toggleConfirmModal('{{ $confirm }}', '{{ explode('(', $confirmAction)[0] }}')"
@endisset
@isset($confirmAction)
x-on:{{ explode('(', $confirmAction)[0] }}.window="$wire.{{ explode('(', $confirmAction)[0] }}"
@endisset>
{{ $slot }}
</button>
@endif

View File

@ -8,17 +8,16 @@
'noDirty' => $attributes->has('noDirty'), 'noDirty' => $attributes->has('noDirty'),
'disabled' => null, 'disabled' => null,
]) ])
<label {{ $attributes->merge(['class' => 'flex cursor-pointer w-64 label']) }}>
<label {{ $attributes->merge(['class' => 'flex items-center gap-16 cursor-pointer']) }}> <div class="label-text">
<span class="label-text">
@if ($label) @if ($label)
{{ $label }} {{ $label }}
@else @else
{{ $id }} {{ $id }}
@endif @endif
</span> </div>
<input type="checkbox" @if ($disabled !== null) disabled @endif class="toggle" name={{ $id }} <div class="flex-1"></div>
<input type="checkbox" @if ($disabled !== null) disabled @endif name={{ $id }}
@if (!$noDirty) wire:dirty.class="input-warning" @endif @if (!$noDirty) wire:dirty.class="input-warning" @endif
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $id }} @else wire:model.defer={{ $value ?? $id }} @endif /> @if ($instantSave) wire:click='instantSave' wire:model.defer={{ $id }} @else wire:model.defer={{ $value ?? $id }} @endif />
</label> </label>
</div>

View File

@ -1,14 +1,15 @@
@props([ @props([
'id' => $attributes->has('id') || $attributes->has('label'), 'id' => $attributes->has('id') || $attributes->has('label'),
'required' => $attributes->has('required'), 'type' => $attributes->get('type') ?? 'text',
'required' => null,
'label' => $attributes->has('label'), 'label' => $attributes->has('label'),
'helper' => $attributes->has('helper'), 'helper' => $attributes->has('helper'),
'instantSave' => $attributes->has('instantSave'),
'noLabel' => $attributes->has('noLabel'), 'noLabel' => $attributes->has('noLabel'),
'noDirty' => $attributes->has('noDirty'), 'noDirty' => $attributes->has('noDirty'),
'disabled' => null,
]) ])
<div class="w-full max-w-xs form-control"> <div {{ $attributes->merge(['class' => 'w-full form-control']) }}>
@if (!$noLabel) @if (!$noLabel)
<label class="label"> <label class="label">
<span class="label-text"> <span class="label-text">
@ -40,8 +41,8 @@ class="w-64 border-2 shadow border-coolgray-500 card compact dropdown-content bg
</span> </span>
</label> </label>
@endif @endif
<input {{ $attributes }} name={{ $id }} <input {{ $attributes }} type={{ $type }} name={{ $id }} wire:model.defer={{ $id }}
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $id }} @else wire:model.defer={{ $value ?? $id }} @endif @if ($disabled !== null) disabled @endif @if ($required !== null) required @endif
@if (!$noDirty) wire:dirty.class="input-warning" @endif /> @if (!$noDirty) wire:dirty.class="input-warning" @endif />
@error($id) @error($id)
<label class="label"> <label class="label">

View File

@ -4,7 +4,7 @@
'required' => false, 'required' => false,
]) ])
<span @class(['flex flex-col'])> <span {{ $attributes->merge(['class' => 'flex flex-col']) }}>
<label for={{ $id }}> <label for={{ $id }}>
@if ($label) @if ($label)
{{ $label }} {{ $label }}

View File

@ -8,7 +8,7 @@
'noDirty' => $attributes->has('noDirty'), 'noDirty' => $attributes->has('noDirty'),
]) ])
<div class="w-full max-w-xs form-control"> <div class=" form-control">
@if (!$noLabel) @if (!$noLabel)
<label class="label"> <label class="label">
<span class="label-text"> <span class="label-text">
@ -40,8 +40,7 @@ class="w-64 border-2 shadow border-coolgray-500 card compact dropdown-content bg
</span> </span>
</label> </label>
@endif @endif
<textarea {{ $attributes }} name={{ $id }} <textarea {{ $attributes }} name={{ $id }} wire:model.defer={{ $value ?? $id }}
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $id }} @else wire:model.defer={{ $value ?? $id }} @endif
@if (!$noDirty) wire:dirty.class="input-warning" @endif></textarea> @if (!$noDirty) wire:dirty.class="input-warning" @endif></textarea>
@error($id) @error($id)
<label class="label"> <label class="label">

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html data-theme="coollabs" lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="h-full bg-coolgray-100"> <html data-theme="coollabs" lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
@ -24,14 +24,13 @@
@livewireStyles @livewireStyles
</head> </head>
<body class="antialiased"> <body>
@livewireScripts @livewireScripts
@auth @auth
<x-navbar /> <x-navbar />
@endauth @endauth
<main class="max-w-6xl px-8 pt-10 mx-auto"> <main class="min-h-full px-8 pt-10 mx-auto max-w-7xl">
{{ $slot }} {{ $slot }}
</main> </main>
<a <a

View File

@ -3,17 +3,14 @@
'message' => 'Are you sure you want to delete this?', 'message' => 'Are you sure you want to delete this?',
'action' => 'delete', 'action' => 'delete',
]) ])
<div x-cloak x-show="{{ $show }}" x-transition.opacity class="fixed inset-0 bg-coolgray-100/75"></div> <div x-cloak x-show="{{ $show }}" x-transition class="modal modal-open">
<div x-cloak x-show="{{ $show }}" x-transition class="fixed inset-0 z-50 top-20"> <div class="relative modal-box">
<div @click.away="{{ $show }} = false" class="w-screen max-w-xl mx-auto rounded-lg shadow-xl bg-coolgray-200"> <div class="pb-8 text-base font-bold">{{ $message }}</div>
<div class="flex flex-col items-center justify-center h-full p-4"> <div class="flex justify-end gap-4 text-xs">
<div class="pb-5 text-xs text-white">{{ $message }}</div> <x-inputs.button isWarning wire:click='{{ $action }}' x-on:click="{{ $show }} = false">
<div class="text-xs"> Yes
<x-inputs.button isWarning wire:click='{{ $action }}' x-on:click="{{ $show }} = false"> </x-inputs.button>
Yes <x-inputs.button x-on:click="{{ $show }} = false">No</x-inputs.button>
</x-inputs.button>
<x-inputs.button x-on:click="{{ $show }} = false">No</x-inputs.button>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -10,29 +10,29 @@
</label> </label>
<ul tabindex="0" class="p-2 mt-3 shadow menu menu-compact dropdown-content bg-base-100 rounded-box w-52"> <ul tabindex="0" class="p-2 mt-3 shadow menu menu-compact dropdown-content bg-base-100 rounded-box w-52">
<li> <li>
<a href="/" class="justify-between"> <a href="/">
Home Home
</a> </a>
</li> </li>
@if (auth()->user()->isRoot()) @if (auth()->user()->isRoot())
<li> <li>
<a href="/settings" class="justify-between"> <a href="/settings">
Settings Settings
</a> </a>
</li> </li>
@endif @endif
<li> <li>
<a href="/profile" class="justify-between"> <a href="/profile">
Profile Profile
</a> </a>
</li> </li>
<li> <li>
<a href="/profile/team" class="justify-between"> <a href="/profile/team">
Team Team
</a> </a>
</li> </li>
<li> <li>
<a href="/command-center" class="justify-between"> <a href="/command-center">
Command Center Command Center
</a> </a>
</li> </li>
@ -49,7 +49,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<a href="/" class="text-xl normal-case btn btn-ghost">Coolify</a> <a href="/" class="text-xl no-underline normal-case btn btn-ghost">Coolify</a>
<div class="form-control"> <div class="form-control">
<x-magic-bar /> <x-magic-bar />
</div> </div>
@ -58,23 +58,23 @@
<ul class="px-1 menu menu-horizontal text-neutral-400"> <ul class="px-1 menu menu-horizontal text-neutral-400">
@if (auth()->user()->isRoot()) @if (auth()->user()->isRoot())
<li> <li>
<a href="/settings" class="justify-between link link-hover hover:bg-transparent"> <a href="/settings">
Settings Settings
</a> </a>
</li> </li>
@endif @endif
<li> <li>
<a href="/profile" class="justify-between link link-hover hover:bg-transparent"> <a href="/profile">
Profile Profile
</a> </a>
</li> </li>
<li> <li>
<a href="/profile/team" class="justify-between link link-hover hover:bg-transparent"> <a href="/profile/team">
Team Team
</a> </a>
</li> </li>
<li> <li>
<a class="justify-between link link-hover hover:bg-transparent" href="/command-center"> <a href="/command-center">
Command Center Command Center
</a> </a>
</li> </li>

View File

@ -7,10 +7,10 @@
<x-inputs.input id="destination.network" label="Docker Network" readonly /> <x-inputs.input id="destination.network" label="Docker Network" readonly />
@endif @endif
<div> <div>
<x-inputs.button isBold type="submit"> <x-inputs.button type="submit">
Save Save
</x-inputs.button> </x-inputs.button>
<x-inputs.button isWarning x-on:click.prevent="deleteDestination = true"> <x-inputs.button x-on:click.prevent="deleteDestination = true">
Delete Delete
</x-inputs.button> </x-inputs.button>
</div> </div>

View File

@ -8,7 +8,7 @@
<option value="{{ $server->id }}">{{ $server->name }}</option> <option value="{{ $server->id }}">{{ $server->name }}</option>
@endforeach @endforeach
</x-inputs.select> </x-inputs.select>
<x-inputs.button isBold type="submit"> <x-inputs.button type="submit">
Submit Submit
</x-inputs.button> </x-inputs.button>
</form> </form>

View File

@ -3,12 +3,12 @@
<form class="flex flex-col gap-2" wire:submit.prevent='changePrivateKey'> <form class="flex flex-col gap-2" wire:submit.prevent='changePrivateKey'>
<x-inputs.input id="private_key.name" label="Name" required /> <x-inputs.input id="private_key.name" label="Name" required />
<x-inputs.input id="private_key.description" label="Description" /> <x-inputs.input id="private_key.description" label="Description" />
<x-inputs.input type="textarea" rows="10" id="private_key.private_key" label="Private Key" required /> <x-inputs.textarea rows="10" id="private_key.private_key" label="Private Key" required />
<div> <div>
<x-inputs.button isBold type="submit"> <x-inputs.button type="submit">
Save Save
</x-inputs.button> </x-inputs.button>
<x-inputs.button isWarning x-on:click.prevent="deletePrivateKey = true"> <x-inputs.button x-on:click.prevent="deletePrivateKey = true">
Delete Delete
</x-inputs.button> </x-inputs.button>
</div> </div>

View File

@ -3,7 +3,7 @@
<x-inputs.input id="name" label="Name" required /> <x-inputs.input id="name" label="Name" required />
<x-inputs.input id="description" label="Description" /> <x-inputs.input id="description" label="Description" />
<x-inputs.input type="textarea" id="value" label="Private Key" required /> <x-inputs.input type="textarea" id="value" label="Private Key" required />
<x-inputs.button isBold type="submit" wire.click.prevent> <x-inputs.button type="submit" wire.click.prevent>
Save Save
</x-inputs.button> </x-inputs.button>
</form> </form>

View File

@ -0,0 +1,5 @@
<div x-data="{ deleteApplication: false }">
<h2>Danger Zone</h2>
<x-naked-modal show="deleteApplication" />
<x-inputs.button isWarning x-on:click.prevent="deleteApplication = true">Delete this application</x-inputs.button>
</div>

View File

@ -1,15 +1,13 @@
<div x-data="{ deleteApplication: false }" class="flex items-center gap-2"> <div class="flex items-center gap-2">
<x-naked-modal show="deleteApplication" />
@if ($application->status === 'running') @if ($application->status === 'running')
<x-inputs.button wire:click='start'>Rebuild</x-inputs.button> <x-inputs.button wire:click='start'>Rebuild</x-inputs.button>
<x-inputs.button wire:click='forceRebuild'>Force Rebuild</x-inputs.button> <x-inputs.button wire:click='forceRebuild'>Force Rebuild</x-inputs.button>
<x-inputs.button isWarning wire:click='stop'>Stop</x-inputs.button> <x-inputs.button wire:click='stop'>Stop</x-inputs.button>
@else @else
<x-inputs.button wire:click='start'>Start</x-inputs.button> <x-inputs.button wire:click='start'>Start</x-inputs.button>
<x-inputs.button wire:click='forceRebuild'>Start (no cache)</x-inputs.button> <x-inputs.button wire:click='forceRebuild'>Start (no cache)</x-inputs.button>
@endif @endif
<x-inputs.button x-on:click.prevent="deleteApplication = true">
Delete</x-inputs.button>
<span wire:poll.5000ms='pollingStatus'> <span wire:poll.5000ms='pollingStatus'>
@if ($application->status === 'running') @if ($application->status === 'running')
<span class="text-xs text-pink-600" wire:loading.delay.longer>Loading current status...</span> <span class="text-xs text-pink-600" wire:loading.delay.longer>Loading current status...</span>

View File

@ -1,5 +1,5 @@
<div> <div>
<h3>Destination</h3> <h2>Destination</h2>
<p>Server Name: {{ data_get($destination, 'server.name') }}</p> <p>Server Name: {{ data_get($destination, 'server.name') }}</p>
@if (data_get($destination, 'server.description')) @if (data_get($destination, 'server.description'))
<p>Description: {{ data_get($destination, 'server.description') }}</p> <p>Description: {{ data_get($destination, 'server.description') }}</p>

View File

@ -2,10 +2,10 @@
<div class="flex gap-2"> <div class="flex gap-2">
<x-inputs.input noDirty id="key" label="Name" required /> <x-inputs.input noDirty id="key" label="Name" required />
<x-inputs.input noDirty id="value" label="Value" required /> <x-inputs.input noDirty id="value" label="Value" required />
<x-inputs.input noDirty type="checkbox" id="is_build_time" label="Build Variable?" /> <x-inputs.checkbox noDirty class="flex-col items-center" id="is_build_time" label="Build Variable?" />
</div> </div>
<div class="pt-2"> <div class="pt-2">
<x-inputs.button isBold type="submit"> <x-inputs.button type="submit">
Add Add
</x-inputs.button> </x-inputs.button>
</div> </div>

View File

@ -1,5 +1,5 @@
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
<h3>Environment Variables</h3> <h2>Environment Variables</h2>
@forelse ($application->environment_variables as $env) @forelse ($application->environment_variables as $env)
<livewire:project.application.environment-variable.show wire:key="environment-{{ $env->id }}" <livewire:project.application.environment-variable.show wire:key="environment-{{ $env->id }}"
:env="$env" /> :env="$env" />

View File

@ -3,13 +3,13 @@
<div class="flex gap-2"> <div class="flex gap-2">
<x-inputs.input label="Name" id="env.key" /> <x-inputs.input label="Name" id="env.key" />
<x-inputs.input label="Value" id="env.value" /> <x-inputs.input label="Value" id="env.value" />
<x-inputs.input type="checkbox" id="env.is_build_time" label="Build Variable?" /> <x-inputs.checkbox disabled class="flex-col items-center" id="env.is_build_time" label="Build Variable?" />
</div> </div>
<div class="pt-2"> <div class="pt-2">
<x-inputs.button isBold type="submit"> <x-inputs.button type="submit">
Update Update
</x-inputs.button> </x-inputs.button>
<x-inputs.button x-on:click.prevent="deleteEnvironment = true" isWarning> <x-inputs.button x-on:click.prevent="deleteEnvironment = true">
Delete Delete
</x-inputs.button> </x-inputs.button>
</div> </div>

View File

@ -1,12 +1,16 @@
<div> <div>
<h3>General</h3>
<form wire:submit.prevent='submit' class="flex flex-col"> <form wire:submit.prevent='submit' class="flex flex-col">
<div class="flex gap-2">
<h2>General</h2>
<x-inputs.button type="submit">
Save
</x-inputs.button>
</div>
<div class="flex flex-col gap-2 pb-4"> <div class="flex flex-col gap-2 pb-4">
<x-inputs.input id="application.name" label="Name" required /> <div class="flex gap-2">
<x-inputs.input id="application.fqdn" label="Domains" /> <x-inputs.input class="w-full" id="application.name" label="Name" required />
<x-inputs.input id="application.install_command" label="Install Command" /> <x-inputs.input class="w-full" id="application.fqdn" label="Domains" />
<x-inputs.input id="application.build_command" label="Build Command" /> </div>
<x-inputs.input id="application.start_command" label="Start Command" />
<x-inputs.select id="application.build_pack" label="Build Pack" required> <x-inputs.select id="application.build_pack" label="Build Pack" required>
<option value="nixpacks">Nixpacks</option> <option value="nixpacks">Nixpacks</option>
<option disabled value="docker">Docker</option> <option disabled value="docker">Docker</option>
@ -18,33 +22,38 @@
<option disabled value="apache:alpine">apache:alpine</option> <option disabled value="apache:alpine">apache:alpine</option>
</x-inputs.select> </x-inputs.select>
@endif @endif
<x-inputs.input id="application.base_directory" label="Base Directory" /> <div class="flex gap-2">
@if ($application->settings->is_static) <x-inputs.input id="application.install_command" label="Install Command" />
<x-inputs.input id="application.publish_directory" label="Publish Directory" required /> <x-inputs.input id="application.build_command" label="Build Command" />
@else <x-inputs.input id="application.start_command" label="Start Command" />
<x-inputs.input id="application.publish_directory" label="Publish Directory" /> </div>
@endif <div class="flex gap-2">
@if ($application->settings->is_static) <x-inputs.input id="application.base_directory" label="Base Directory" />
<x-inputs.input id="application.ports_exposes" label="Ports Exposes" readonly /> @if ($application->settings->is_static)
@else <x-inputs.input id="application.publish_directory" label="Publish Directory" required />
<x-inputs.input id="application.ports_exposes" label="Ports Exposes" required /> @else
@endif <x-inputs.input id="application.publish_directory" label="Publish Directory" />
<x-inputs.input id="application.ports_mappings" label="Ports Mappings" /> @endif
</div>
<div class="flex gap-2">
@if ($application->settings->is_static)
<x-inputs.input id="application.ports_exposes" label="Ports Exposes" readonly />
@else
<x-inputs.input id="application.ports_exposes" label="Ports Exposes" required />
@endif
<x-inputs.input id="application.ports_mappings" label="Ports Mappings" />
</div>
</div>
<div class="flex flex-col">
<x-inputs.checkbox instantSave id="is_debug" label="Debug" />
<x-inputs.checkbox instantSave id="is_static" label="Static website?" />
<x-inputs.checkbox instantSave id="is_git_submodules_allowed" label="Git Submodules Allowed?" />
<x-inputs.checkbox instantSave id="is_git_lfs_allowed" label="Git LFS Allowed?" />
<x-inputs.checkbox instantSave id="is_auto_deploy" label="Auto Deploy?" />
<x-inputs.checkbox instantSave id="is_previews" label="Previews?" />
<x-inputs.checkbox disabled instantSave id="is_dual_cert" label="Dual Certs?" />
<x-inputs.checkbox disabled instantSave id="is_custom_ssl" label="Is Custom SSL?" />
<x-inputs.checkbox disabled instantSave id="is_http2" label="Is Http2?" />
</div> </div>
<x-inputs.button isBold type="submit">
Submit
</x-inputs.button>
</form> </form>
<div class="flex flex-col pt-4">
<x-inputs.input noDirty instantSave type="checkbox" id="is_static" label="Static website?" />
<x-inputs.input noDirty instantSave type="checkbox" id="is_git_submodules_allowed"
label="Git Submodules Allowed?" />
<x-inputs.input noDirty instantSave type="checkbox" id="is_git_lfs_allowed" label="Git LFS Allowed?" />
<x-inputs.input noDirty instantSave type="checkbox" id="is_debug" label="Debug" />
<x-inputs.input noDirty instantSave type="checkbox" id="is_auto_deploy" label="Auto Deploy?" />
<x-inputs.input noDirty instantSave type="checkbox" id="is_previews" label="Previews?" />
<x-inputs.input disabled instantSave type="checkbox" id="is_dual_cert" label="Dual Certs?" />
<x-inputs.input disabled instantSave type="checkbox" id="is_custom_ssl" label="Is Custom SSL?" />
<x-inputs.input disabled instantSave type="checkbox" id="is_http2" label="Is Http2?" />
</div>
</div> </div>

View File

@ -1,6 +1,9 @@
<div> <div>
<h2>Resource Limits</h2> <form wire:submit.prevent='submit' class="flex flex-col">
<form wire:submit.prevent='submit'> <div class="flex gap-2">
<h2>Resource Limits</h2>
<x-inputs.button type='submit'>Save</x-inputs.button>
</div>
<h3>Memory</h3> <h3>Memory</h3>
<x-inputs.input placeholder="69b or 420k or 1337m or 1g" label="Limit" id="application.limits_memory" /> <x-inputs.input placeholder="69b or 420k or 1337m or 1g" label="Limit" id="application.limits_memory" />
<x-inputs.input placeholder="69b or 420k or 1337m or 1g" label="Swap" id="application.limits_memory_swap" /> <x-inputs.input placeholder="69b or 420k or 1337m or 1g" label="Swap" id="application.limits_memory_swap" />
@ -8,13 +11,10 @@
id="application.limits_memory_swappiness" /> id="application.limits_memory_swappiness" />
<x-inputs.input placeholder="69b or 420k or 1337m or 1g" label="Soft Limit" <x-inputs.input placeholder="69b or 420k or 1337m or 1g" label="Soft Limit"
id="application.limits_memory_reservation" /> id="application.limits_memory_reservation" />
<x-inputs.input type="checkbox" label="Is OOM Kill disabled?" id="application.limits_memory_oom_kill" /> <x-inputs.checkbox label="Disable OOM kill" id="application.limits_memory_oom_kill" />
<h3>CPU</h3> <h3>CPU</h3>
<x-inputs.input placeholder="1.5" label="Number of CPUs" id="application.limits_cpus" /> <x-inputs.input placeholder="1.5" label="Number of CPUs" id="application.limits_cpus" />
<x-inputs.input placeholder="0-2" label="CPU set to use" id="application.limits_cpuset" /> <x-inputs.input placeholder="0-2" label="CPU set to use" id="application.limits_cpuset" />
<x-inputs.input placeholder="1024" label="CPU Weight" id="application.limits_cpu_shares" /> <x-inputs.input placeholder="1024" label="CPU Weight" id="application.limits_cpu_shares" />
<div class="pt-4">
<x-inputs.button isBold>Save</x-inputs.button>
</div>
</form> </form>
</div> </div>

View File

@ -1,7 +1,7 @@
<div x-init="$wire.loadImages"> <div x-init="$wire.loadImages">
<h2>Revert</h2> <div class="flex gap-2">
<div> <h2>Rollback</h2>
<x-inputs.button isBold wire:click='loadImages'>Refresh Images</x-inputs.button> <x-inputs.button isHighlighted wire:click='loadImages'>Refresh Images</x-inputs.button>
</div> </div>
<div wire:loading wire:target='loadImages'> <div wire:loading wire:target='loadImages'>
<x-loading /> <x-loading />

View File

@ -1,18 +1,19 @@
<div> <div>
<h3>Source</h3> <h2>Source</h2>
<div class="pb-8">{{ data_get($application, 'source.name') }} <div class="pb-8">{{ data_get($application, 'source.name') }}
@if (data_get($application, 'source.is_public')) @if (data_get($application, 'source.is_public'))
<span class="text-xs">public</span> <span class="text-xs">public</span>
@endif @endif
</div> </div>
<form wire:submit.prevent='submit' class="flex flex-col gap-2 w-max-fit"> <form wire:submit.prevent='submit' class="flex flex-col gap-2 w-max-fit">
<x-inputs.input id="application.git_repository" label="Repository" readonly /> <x-inputs.input id="application.git_repository" label="Repository" />
<x-inputs.input id="application.git_branch" label=" Branch" readonly /> <x-inputs.input id="application.git_branch" label=" Branch" />
<x-inputs.input id="application.git_commit_sha" placeholder="HEAD" label="Commit SHA" /> <x-inputs.input id="application.git_commit_sha" placeholder="HEAD" label="Commit SHA" />
<div> <div>
<x-inputs.button isBold type="submit">Save</x-inputs.button> <x-inputs.button type="submit">Save</x-inputs.button>
<a target="_blank" href="{{ $application->gitCommits }}"> <a target="_blank" href="{{ $application->gitCommits }}">
Commits <img class="inline-flex w-4 h-4" src="{{ asset('svgs/external-link.svg') }}"> Commits
<x-external-link />
</a> </a>
</div> </div>
</form> </form>

View File

@ -5,7 +5,7 @@
<x-inputs.input noDirty id="mount_path" label="Destination Path" required /> <x-inputs.input noDirty id="mount_path" label="Destination Path" required />
</div> </div>
<div class="pt-2"> <div class="pt-2">
<x-inputs.button isBold type="submit"> <x-inputs.button type="submit">
Add Add
</x-inputs.button> </x-inputs.button>
</div> </div>

View File

@ -1,5 +1,5 @@
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
<h3>Storages</h3> <h2>Storages</h2>
@forelse ($application->persistentStorages as $storage) @forelse ($application->persistentStorages as $storage)
<livewire:project.application.storages.show wire:key="storage-{{ $storage->id }}" :storage="$storage" /> <livewire:project.application.storages.show wire:key="storage-{{ $storage->id }}" :storage="$storage" />
@empty @empty

View File

@ -6,10 +6,10 @@
<x-inputs.input id="storage.mount_path" label="Destination Path" required /> <x-inputs.input id="storage.mount_path" label="Destination Path" required />
</div> </div>
<div class="pt-2"> <div class="pt-2">
<x-inputs.button isBold type="submit"> <x-inputs.button type="submit">
Update Update
</x-inputs.button> </x-inputs.button>
<x-inputs.button x-on:click.prevent="deleteStorage = true" isWarning> <x-inputs.button x-on:click.prevent="deleteStorage = true">
Delete Delete
</x-inputs.button> </x-inputs.button>
</div> </div>

View File

@ -1,11 +1,11 @@
<div x-data="{ deleteProject: false }"> <div x-data="{ deleteProject: false }">
<x-naked-modal show="deleteProject" message='Are you sure you would like to delete this project?' /> <x-naked-modal show="deleteProject" message='Are you sure you would like to delete this project?' />
@if ($resource_count > 0) @if ($resource_count > 0)
<x-inputs.button isWarning disabled="First delete all resources."> <x-inputs.button disabled="First delete all resources.">
Delete Delete
</x-inputs.button> </x-inputs.button>
@else @else
<x-inputs.button isWarning x-on:click.prevent="deleteProject = true"> <x-inputs.button x-on:click.prevent="deleteProject = true">
Delete Delete
</x-inputs.button> </x-inputs.button>
@endif @endif

View File

@ -10,7 +10,7 @@
@endif @endif
@endforeach @endforeach
</select> </select>
<x-inputs.button isBold type="submit">Run</x-inputs.button> <x-inputs.button type="submit">Run</x-inputs.button>
</form> </form>
<div class="container w-full pt-10 mx-auto"> <div class="container w-full pt-10 mx-auto">
<livewire:activity-monitor /> <livewire:activity-monitor />

View File

@ -1,12 +1,12 @@
<div x-data="{ deleteServer: false }"> <div x-data="{ deleteServer: false }">
<h3>General</h3> <h2>General</h2>
<x-naked-modal show="deleteServer" message='Are you sure you would like to delete this server?' /> <x-naked-modal show="deleteServer" message='Are you sure you would like to delete this server?' />
<form wire:submit.prevent='submit' class="flex flex-col"> <form wire:submit.prevent='submit' class="flex flex-col">
<div class="flex flex-col gap-2 xl:flex-row"> <div class="flex flex-col gap-2 xl:flex-row">
<div class="flex flex-col w-96"> <div class="flex flex-col w-96">
<x-inputs.input id="server.name" label="Name" required /> <x-inputs.input id="server.name" label="Name" required />
<x-inputs.input id="server.description" label="Description" /> <x-inputs.input id="server.description" label="Description" />
<x-inputs.input disabled type="checkbox" id="server.settings.is_part_of_swarm" <x-inputs.checkbox disabled type="checkbox" id="server.settings.is_part_of_swarm"
label="Is it part of a Swarm cluster?" /> label="Is it part of a Swarm cluster?" />
</div> </div>
<div class="flex flex-col w-96"> <div class="flex flex-col w-96">
@ -23,9 +23,9 @@
</div> </div>
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<x-inputs.button isBold type="submit">Save</x-inputs.button> <x-inputs.button type="submit">Save</x-inputs.button>
<x-inputs.button isBold wire:click.prevent='validateServer'> <x-inputs.button wire:click.prevent='validateServer'>
@if ($server->settings->is_validated) @if ($server->settings->is_validated)
Check Connection Check Connection
@else @else
@ -33,8 +33,8 @@
@endif @endif
</x-inputs.button> </x-inputs.button>
{{-- <x-inputs.button isBold wire:click.prevent='installDocker'>Install Docker</x-inputs.button> --}} {{-- <x-inputs.button wire:click.prevent='installDocker'>Install Docker</x-inputs.button> --}}
<x-inputs.button isWarning x-on:click.prevent="deleteServer = true"> <x-inputs.button x-on:click.prevent="deleteServer = true">
Delete Delete
</x-inputs.button> </x-inputs.button>
</div> </div>
@ -57,7 +57,7 @@
{{ data_get($server, 'privateKey.uuid') }} {{ data_get($server, 'privateKey.uuid') }}
</a> </a>
<a href="{{ route('server.private-key', ['server_uuid' => $server->uuid]) }}"> <a href="{{ route('server.private-key', ['server_uuid' => $server->uuid]) }}">
<x-inputs.button isBold>Change</x-inputs.button> <x-inputs.button>Change</x-inputs.button>
</a> </a>
</div> </div>
<div class="flex items-center gap-2 py-4"> <div class="flex items-center gap-2 py-4">
@ -71,7 +71,7 @@
@endforeach @endforeach
</div> </div>
<a href="{{ route('destination.new', ['server_id' => $server->id]) }}"> <a href="{{ route('destination.new', ['server_id' => $server->id]) }}">
<x-inputs.button isBold>Add</x-inputs.button> <x-inputs.button>Add</x-inputs.button>
</a> </a>
</div> </div>
</div> </div>

View File

@ -19,7 +19,7 @@
</x-inputs.select> </x-inputs.select>
<x-inputs.input instantSave noDirty type="checkbox" id="is_part_of_swarm" <x-inputs.input instantSave noDirty type="checkbox" id="is_part_of_swarm"
label="Is it part of a Swarm cluster?" /> label="Is it part of a Swarm cluster?" />
<x-inputs.button isBold type="submit"> <x-inputs.button type="submit">
Save Save
</x-inputs.button> </x-inputs.button>
</form> </form>

View File

@ -3,7 +3,7 @@
message='Are you sure you would like to stop the proxy? All resources will be unavailable.' /> message='Are you sure you would like to stop the proxy? All resources will be unavailable.' />
@if ($server->settings->is_validated) @if ($server->settings->is_validated)
<div class="flex items-center gap-2 mb-4"> <div class="flex items-center gap-2 mb-4">
<h3 class="pb-0">Proxy</h3> <h2>Proxy</h2>
<div>{{ $server->extra_attributes->proxy_status }}</div> <div>{{ $server->extra_attributes->proxy_status }}</div>
</div> </div>
@ -13,16 +13,16 @@
$server->extra_attributes->last_applied_proxy_settings && $server->extra_attributes->last_applied_proxy_settings &&
$server->extra_attributes->last_saved_proxy_settings !== $server->extra_attributes->last_applied_proxy_settings) $server->extra_attributes->last_saved_proxy_settings !== $server->extra_attributes->last_applied_proxy_settings)
<div class="text-red-500">Configuration out of sync.</div> <div class="text-red-500">Configuration out of sync.</div>
<x-inputs.button isBold wire:click="installProxy"> <x-inputs.button wire:click="installProxy">
Reconfigure Reconfigure
</x-inputs.button> </x-inputs.button>
@endif @endif
@if ($server->extra_attributes->proxy_status !== 'running') @if ($server->extra_attributes->proxy_status !== 'running')
<x-inputs.button isBold wire:click="installProxy"> <x-inputs.button wire:click="installProxy">
Start Start
</x-inputs.button> </x-inputs.button>
@else @else
<x-inputs.button isWarning x-on:click.prevent="stopProxy = true">Stop <x-inputs.button x-on:click.prevent="stopProxy = true">Stop
</x-inputs.button> </x-inputs.button>
@endif @endif
<div class="py-4"> <div class="py-4">
@ -37,13 +37,14 @@
@if ($selectedProxy->value === 'TRAEFIK_V2') @if ($selectedProxy->value === 'TRAEFIK_V2')
<form wire:submit.prevent='saveConfiguration'> <form wire:submit.prevent='saveConfiguration'>
<div class="py-2 pb-8"> <div class="py-2 pb-8">
<x-inputs.button isBold>Save</x-inputs.button> <x-inputs.button type="submit">Save</x-inputs.button>
<x-inputs.button wire:click.prevent="resetProxy"> <x-inputs.button wire:click.prevent="resetProxy">
Reset Configuration Reset Configuration
</x-inputs.button> </x-inputs.button>
</div> </div>
<h4>traefik.conf</h4> <h4>traefik.conf</h4>
<x-inputs.input noDirty type="textarea" wire:model.defer="proxy_settings" rows="30" /> <x-inputs.textarea noDirty name="proxy_settings" wire:model.defer="proxy_settings"
rows="30" />
</form> </form>
@endif @endif
@endisset @endisset
@ -55,7 +56,7 @@
{{ \App\Enums\ProxyTypes::TRAEFIK_V2 }} {{ \App\Enums\ProxyTypes::TRAEFIK_V2 }}
</option> </option>
</select> </select>
<x-inputs.button isBold wire:click="setProxy">Set Proxy</x-inputs.button> <x-inputs.button wire:click="setProxy">Set Proxy</x-inputs.button>
@endif @endif
@else @else
<p>Server is not validated. Validate first.</p> <p>Server is not validated. Validate first.</p>

View File

@ -1,6 +1,38 @@
<div x-data="{ deleteSource: false }"> <div x-data="{ deleteSource: false }">
<x-naked-modal show="deleteSource" message='Are you sure you would like to delete this source?' /> <x-naked-modal show="deleteSource" message='Are you sure you would like to delete this source?' />
<form wire:submit.prevent='submit'> <form wire:submit.prevent='submit'>
<div class="flex items-center gap-2">
<h1>GitHub App</h1>
<div class="flex gap-2 ">
@if ($github_app->app_id)
<x-inputs.button type="submit">Save</x-inputs.button>
<x-inputs.button x-on:click.prevent="deleteSource = true">
Delete
</x-inputs.button>
<a href="{{ $installation_url }}">
<x-inputs.button>
@if ($github_app->installation_id)
Update Repositories
<x-external-link />
@else
Install Repositories
<x-external-link />
@endif
</x-inputs.button>
</a>
@else
<x-inputs.button disabled type="submit">Save</x-inputs.button>
<x-inputs.button x-on:click.prevent="deleteSource = true">
Delete
</x-inputs.button>
<form x-data>
<x-inputs.button isHighlighted x-on:click.prevent="createGithubApp">Create GitHub Application
</x-inputs.button>
</form>
@endif
</div>
</div>
<x-inputs.input id="github_app.name" label="App Name" required /> <x-inputs.input id="github_app.name" label="App Name" required />
@if ($github_app->app_id) @if ($github_app->app_id)
@ -20,21 +52,64 @@
<x-inputs.input id="github_app.client_id" label="Client Id" type="password" disabled /> <x-inputs.input id="github_app.client_id" label="Client Id" type="password" disabled />
<x-inputs.input id="github_app.client_secret" label="Client Secret" type="password" disabled /> <x-inputs.input id="github_app.client_secret" label="Client Secret" type="password" disabled />
<x-inputs.input id="github_app.webhook_secret" label="Webhook Secret" type="password" disabled /> <x-inputs.input id="github_app.webhook_secret" label="Webhook Secret" type="password" disabled />
<x-inputs.input noDirty type="checkbox" label="System Wide?" instantSave id="is_system_wide" /> <x-inputs.checkbox noDirty label="System Wide?" instantSave id="is_system_wide" />
<div class="py-2">
<x-inputs.button isBold type="submit">Save</x-inputs.button>
<x-inputs.button isWarning x-on:click.prevent="deleteSource = true">
Delete
</x-inputs.button>
</div>
@else @else
<x-inputs.input noDirty type="checkbox" label="System Wide?" instantSave id="is_system_wide" /> <x-inputs.checkbox noDirty label="System Wide?" instantSave id="is_system_wide" />
<div class="py-2"> <div class="py-2">
<x-inputs.button isBold type="submit">Save</x-inputs.button>
<x-inputs.button isWarning x-on:click.prevent="deleteSource = true">
Delete
</x-inputs.button>
</div> </div>
@endif @endif
</form> </form>
@if (!$github_app->app_id)
<script>
function createGithubApp() {
const {
organization,
uuid,
html_url
} = @json($github_app);
let baseUrl = @js($host);
const name = @js($name);
const isDev = @js(config('app.env')) === 'local';
const devWebhook = @js(config('coolify.dev_webhook'));
if (isDev && devWebhook) {
baseUrl = devWebhook;
}
const webhookBaseUrl = `${baseUrl}/webhooks`;
const path = organization ? `organizations/${organization}/settings/apps/new` : 'settings/apps/new';
const data = {
name,
url: baseUrl,
hook_attributes: {
url: `${webhookBaseUrl}/source/github/events`,
active: true,
},
redirect_url: `${webhookBaseUrl}/source/github/redirect`,
callback_urls: [`${baseUrl}/login/github/app`],
public: false,
request_oauth_on_install: false,
setup_url: `${webhookBaseUrl}/source/github/install?source=${uuid}`,
setup_on_update: true,
default_permissions: {
contents: 'read',
metadata: 'read',
pull_requests: 'read',
emails: 'read'
},
default_events: ['pull_request', 'push']
};
const form = document.createElement('form');
form.setAttribute('method', 'post');
form.setAttribute('action', `${html_url}/${path}?state=${uuid}`);
const input = document.createElement('input');
input.setAttribute('id', 'manifest');
input.setAttribute('name', 'manifest');
input.setAttribute('type', 'hidden');
input.setAttribute('value', JSON.stringify(data));
form.appendChild(input);
document.getElementsByTagName('body')[0].appendChild(form);
form.submit();
}
</script>
@endif
</div> </div>

View File

@ -2,7 +2,7 @@
<h3>Other Teams</h3> <h3>Other Teams</h3>
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
@foreach (auth()->user()->otherTeams() as $team) @foreach (auth()->user()->otherTeams() as $team)
<x-inputs.button isBold wire:key="{{ $team->id }}" wire:click="switch_to('{{ $team->id }}')">Switch <x-inputs.button wire:key="{{ $team->id }}" wire:click="switch_to('{{ $team->id }}')">Switch
to: to:
{{ $team->name }}</x-inputs.button> {{ $team->name }}</x-inputs.button>
@endforeach @endforeach

View File

@ -1,8 +1,8 @@
<x-layout> <x-layout>
<x-applications.navbar :application="$application" /> <x-applications.navbar :application="$application" />
<h1 class="py-10">Configuration</h1> <h1 class="py-10">Configuration</h1>
<div x-data="{ activeTab: window.location.hash ? window.location.hash.substring(1) : 'general' }" class="flex pt-6"> <div x-data="{ activeTab: window.location.hash ? window.location.hash.substring(1) : 'general' }" class="flex h-full pt-6">
<div class="flex flex-col min-w-fit"> <div class="flex flex-col gap-4 min-w-fit">
<a :class="activeTab === 'general' && 'text-white'" <a :class="activeTab === 'general' && 'text-white'"
@click.prevent="activeTab = 'general'; window.location.hash = 'general'" href="#">General</a> @click.prevent="activeTab = 'general'; window.location.hash = 'general'" href="#">General</a>
<a :class="activeTab === 'environment-variables' && 'text-white'" <a :class="activeTab === 'environment-variables' && 'text-white'"
@ -25,12 +25,15 @@
@click.prevent="activeTab = 'resource-limits'; window.location.hash = 'resource-limits'" @click.prevent="activeTab = 'resource-limits'; window.location.hash = 'resource-limits'"
href="#">Resource Limits href="#">Resource Limits
</a> </a>
<a :class="activeTab === 'danger' && 'text-white'"
@click.prevent="activeTab = 'danger'; window.location.hash = 'danger'" href="#">Danger Zone
</a>
{{-- <a :class="activeTab === 'previews' && 'text-white'" {{-- <a :class="activeTab === 'previews' && 'text-white'"
@click.prevent="activeTab = 'previews'; window.location.hash = 'previews'" href="#">Previews @click.prevent="activeTab = 'previews'; window.location.hash = 'previews'" href="#">Previews
</a> --}} </a> --}}
</div> </div>
<div class="w-full pt-2 pl-8"> <div class="w-full pl-8">
<div x-cloak x-show="activeTab === 'general'"> <div x-cloak x-show="activeTab === 'general'" class="h-full">
<livewire:project.application.general :application="$application" /> <livewire:project.application.general :application="$application" />
</div> </div>
<div x-cloak x-show="activeTab === 'environment-variables'"> <div x-cloak x-show="activeTab === 'environment-variables'">
@ -51,6 +54,9 @@
<div x-cloak x-show="activeTab === 'resource-limits'"> <div x-cloak x-show="activeTab === 'resource-limits'">
<livewire:project.application.resource-limits :application="$application" /> <livewire:project.application.resource-limits :application="$application" />
</div> </div>
<div x-cloak x-show="activeTab === 'danger'">
<livewire:project.application.danger :application="$application" />
</div>
{{-- <div x-cloak x-show="activeTab === 'previews'"> {{-- <div x-cloak x-show="activeTab === 'previews'">
<livewire:project.application.previews :application="$application" /> <livewire:project.application.previews :application="$application" />
</div> --}} </div> --}}

View File

@ -1,7 +1,7 @@
<x-layout> <x-layout>
<div class="text-3xl font-bold">Server</div> <h1>Server</h1>
<div x-data="{ activeTab: window.location.hash ? window.location.hash.substring(1) : 'general' }" class="flex pt-6"> <div x-data="{ activeTab: window.location.hash ? window.location.hash.substring(1) : 'general' }" class="flex pt-6">
<div class="flex flex-col min-w-fit"> <div class="flex flex-col gap-4 min-w-fit">
<a :class="activeTab === 'general' && 'text-white'" <a :class="activeTab === 'general' && 'text-white'"
@click.prevent="activeTab = 'general'; window.location.hash = 'general'" href="#">General</a> @click.prevent="activeTab = 'general'; window.location.hash = 'general'" href="#">General</a>
<a :class="activeTab === 'proxy' && 'text-white'" <a :class="activeTab === 'proxy' && 'text-white'"

View File

@ -1,67 +1,3 @@
<x-layout> <x-layout>
<h1>GitHub App</h1> <livewire:source.github.change :github_app="$github_app" :installation_url="$installation_url" :host="$host" :name="$name" />
<livewire:source.github.change :github_app="$github_app" />
@if (!$github_app->app_id)
<form x-data>
<x-inputs.button x-on:click.prevent="createGithubApp">Create GitHub Application</x-inputs.button>
</form>
<script>
function createGithubApp() {
const {
organization,
uuid,
html_url
} = @json($github_app);
let baseUrl = @js($host);
const name = @js($name);
const isDev = @js(config('app.env')) === 'local';
const devWebhook = @js(config('coolify.dev_webhook'));
if (isDev && devWebhook) {
baseUrl = devWebhook;
}
const webhookBaseUrl = `${baseUrl}/webhooks`;
const path = organization ? `organizations/${organization}/settings/apps/new` : 'settings/apps/new';
const data = {
name,
url: baseUrl,
hook_attributes: {
url: `${webhookBaseUrl}/source/github/events`,
active: true,
},
redirect_url: `${webhookBaseUrl}/source/github/redirect`,
callback_urls: [`${baseUrl}/login/github/app`],
public: false,
request_oauth_on_install: false,
setup_url: `${webhookBaseUrl}/source/github/install?source=${uuid}`,
setup_on_update: true,
default_permissions: {
contents: 'read',
metadata: 'read',
pull_requests: 'read',
emails: 'read'
},
default_events: ['pull_request', 'push']
};
const form = document.createElement('form');
form.setAttribute('method', 'post');
form.setAttribute('action', `${html_url}/${path}?state=${uuid}`);
const input = document.createElement('input');
input.setAttribute('id', 'manifest');
input.setAttribute('name', 'manifest');
input.setAttribute('type', 'hidden');
input.setAttribute('value', JSON.stringify(data));
form.appendChild(input);
document.getElementsByTagName('body')[0].appendChild(form);
form.submit();
}
</script>
@elseif($github_app->app_id && !$github_app->installation_id)
<a href="{{ $installation_url }}">
<x-inputs.button isBold>Install Repositories</x-inputs.button>
</a>
@elseif($github_app->app_id && $github_app->installation_id)
<a href="{{ $installation_url }}">
<x-inputs.button isBold>Update Repositories</x-inputs.button>
</a>
@endif
</x-layout> </x-layout>

View File

@ -30,6 +30,10 @@ module.exports = {
} }
}, },
}, },
variants: {
scrollbar: ['dark'],
extend: {}
},
daisyui: { daisyui: {
themes: [ themes: [
{ {
@ -47,5 +51,5 @@ module.exports = {
} }
], ],
}, },
plugins: [require("@tailwindcss/typography"),require("daisyui")], plugins: [require('tailwindcss-scrollbar'),require("@tailwindcss/typography"),require("daisyui")],
} }