Skip to content

Commit

Permalink
update css
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed May 3, 2023
1 parent d5c1e1d commit 5d5d856
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 18 deletions.
2 changes: 1 addition & 1 deletion config/coolify.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

return [
'version' => '4.0.0-nightly.1',
'version' => '4.0.0-nightly.2',
];
2 changes: 1 addition & 1 deletion resources/views/components/confirm-modal.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="flex flex-col items-center justify-center h-full">
<div class="pb-5 text-white" x-text="message"></div>
<div>
<x-inputs.button x-on:click="$dispatch('confirm')">Confirm</x-inputs.button>
<x-inputs.button isWarning x-on:click="$dispatch('confirm')">Confirm</x-inputs.button>
<x-inputs.button x-on:click="open = false">Cancel</x-inputs.button>
</div>
</div>
Expand Down
25 changes: 17 additions & 8 deletions resources/views/components/inputs/button.blade.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
@props([
'class' => null,
'defaultClass' => 'text-white bg-violet-500 hover:bg-violet-600',
'isWarning' => null,
'defaultClass' => 'text-white bg-neutral-800 hover:bg-violet-600',
'defaultWarningClass' => 'text-white bg-red-500 hover:bg-red-600',
'confirm' => null,
'confirmAction' => null,
])

<button {{ $attributes }} {{ $attributes->merge(['class' => "$defaultClass $class"]) }}
@if ($attributes->whereStartsWith('wire:click')) wire:target="{{ $attributes->whereStartsWith('wire:click')->first() }}"
wire:loading.class="text-black bg-green-500" wire:loading.attr="disabled" wire:loading.class.remove="{{ $defaultClass }} {{ $attributes->whereStartsWith('class')->first() }}" @endif
@isset($confirm) x-on:click="toggleConfirmModal('{{ $confirm }}')" @endisset
@isset($confirmAction) @confirm.window="$wire.{{ $confirmAction }}()" @endisset>
<button {{ $attributes }} @class([
$defaultClass => !$confirm && !$isWarning,
$defaultWarningClass => $confirm || $isWarning,
]) @if ($attributes->whereStartsWith('wire:click'))
wire:target="{{ $attributes->whereStartsWith('wire:click')->first() }}"
wire:loading.delay.class="text-black bg-green-500" wire:loading.delay.attr="disabled"
wire:loading.delay.class.remove="{{ $defaultClass }} {{ $attributes->whereStartsWith('class')->first() }}"
@endif
@isset($confirm)
x-on:click="toggleConfirmModal('{{ $confirm }}')"
@endisset
@isset($confirmAction)
@confirm.window="$wire.{{ $confirmAction }}()"
@endisset>
{{ $slot }}
</button>
5 changes: 2 additions & 3 deletions resources/views/livewire/project/application/deploy.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
<x-inputs.button wire:click='start'>Start</x-inputs.button>
<x-inputs.button wire:click='forceRebuild'>Start (no cache)</x-inputs.button>
@endif
<x-inputs.button class="bg-red-500" confirmAction="delete"
confirm='Are you sure you would like to delete this application?'>
<x-inputs.button confirmAction="delete" confirm='Are you sure you would like to delete this application?'>
Delete</x-inputs.button>
<span wire:poll.5000ms='pollingStatus'>
@if ($application->status === 'running')
Expand All @@ -24,7 +23,7 @@
{{ explode(':', $port)[0] }}</a>
@else
<a target="_blank"
href="http://{{ $application->destination->server->ip }}:{{ $port }}">Open
href="http://{{ $application->destination->server->ip }}:{{ explode(':', $port)[0] }}">Open
{{ $port }}</a>
@endif
@endforeach
Expand Down
10 changes: 5 additions & 5 deletions resources/views/project/application/configuration.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<x-applications.navbar :applicationId="$application->id" />
<div x-data="{ activeTab: 'general' }">
<div class="flex gap-4">
<a :class="activeTab === 'general' && 'text-green-500'" @click.prevent="activeTab = 'general'"
<a :class="activeTab === 'general' && 'text-purple-500'" @click.prevent="activeTab = 'general'"
href="#">General</a>
<a :class="activeTab === 'envs' && 'text-green-500'" @click.prevent="activeTab = 'envs'"
<a :class="activeTab === 'envs' && 'text-purple-500'" @click.prevent="activeTab = 'envs'"
href="#">Environment Variables</a>
<a :class="activeTab === 'source' && 'text-green-500'" @click.prevent="activeTab = 'source'"
<a :class="activeTab === 'source' && 'text-purple-500'" @click.prevent="activeTab = 'source'"
href="#">Source</a>
<a :class="activeTab === 'destination' && 'text-green-500'" @click.prevent="activeTab = 'destination'"
<a :class="activeTab === 'destination' && 'text-purple-500'" @click.prevent="activeTab = 'destination'"
href="#">Destination
</a>
<a :class="activeTab === 'storages' && 'text-green-500'" @click.prevent="activeTab = 'storages'"
<a :class="activeTab === 'storages' && 'text-purple-500'" @click.prevent="activeTab = 'storages'"
href="#">Storage
</a>
</div>
Expand Down

0 comments on commit 5d5d856

Please sign in to comment.