From 288afb1f9ee7c95cdc2ae2fd99eb20de4e99bdb3 Mon Sep 17 00:00:00 2001 From: Lewis Larsen Date: Sun, 28 Jul 2024 18:44:14 +0100 Subject: [PATCH] style: Improved button placement --- .../partials/account-wrapper.blade.php | 27 +++--- .../backup-destinations/create.blade.php | 11 +-- .../views/backup-destinations/edit.blade.php | 13 +-- .../views/backup-destinations/index.blade.php | 29 +++---- resources/views/backup-tasks/edit.blade.php | 14 +-- .../components/layouts/account-app.blade.php | 9 +- .../views/components/layouts/app.blade.php | 10 ++- resources/views/dashboard.blade.php | 58 ++++++++----- resources/views/layouts/app.blade.php | 60 +++++++++---- .../forms/create-backup-task-form.blade.php | 85 ++++++++++++------- .../livewire/backup-tasks/index.blade.php | 42 ++++----- .../create-notification-stream.blade.php | 7 +- .../update-notification-stream.blade.php | 9 +- .../notification-streams/index.blade.php | 24 ++---- .../views/livewire/tags/index-item.blade.php | 4 +- .../views/livewire/tags/index-table.blade.php | 2 +- resources/views/profile.blade.php | 4 +- .../views/remote-servers/create.blade.php | 11 +-- resources/views/remote-servers/edit.blade.php | 12 +-- .../views/remote-servers/index.blade.php | 29 +++---- resources/views/tags/create.blade.php | 15 +--- resources/views/tags/edit.blade.php | 6 +- resources/views/tags/index.blade.php | 24 +++--- 23 files changed, 241 insertions(+), 264 deletions(-) diff --git a/resources/views/account/partials/account-wrapper.blade.php b/resources/views/account/partials/account-wrapper.blade.php index 0a606e0b..697a9e50 100644 --- a/resources/views/account/partials/account-wrapper.blade.php +++ b/resources/views/account/partials/account-wrapper.blade.php @@ -1,21 +1,20 @@ -@props(['pageTitle' => __('Account')]) +@props(['pageTitle' => __('Account'), 'action' => null]) @section('title', $pageTitle) -

- {{ $pageTitle }} -

+ {{ $pageTitle }}
-
-
-
- -
- {{ $slot }} -
-
+
+
+ +
+ + {{ $action }} + + {{ $slot }} +
diff --git a/resources/views/backup-destinations/create.blade.php b/resources/views/backup-destinations/create.blade.php index 867ebb3d..5fa3e920 100644 --- a/resources/views/backup-destinations/create.blade.php +++ b/resources/views/backup-destinations/create.blade.php @@ -1,14 +1,7 @@ @section('title', __('Add Backup Destination')) -

- {{ __('Add Backup Destination') }} -

+ {{ __('Add Backup Destination') }}
- -
-
- @livewire('backup-destinations.create-backup-destination-form') -
-
+ @livewire('backup-destinations.create-backup-destination-form')
diff --git a/resources/views/backup-destinations/edit.blade.php b/resources/views/backup-destinations/edit.blade.php index ee90eb99..18c68fe7 100644 --- a/resources/views/backup-destinations/edit.blade.php +++ b/resources/views/backup-destinations/edit.blade.php @@ -1,15 +1,8 @@ @section('title', __('Update Backup Destination')) -

- {{ __('Update Backup Destination') }} -

+ {{ __('Update Backup Destination') }}
- -
-
- @livewire('backup-destinations.update-backup-destination-form', ['backupDestination' => $backupDestination]) - @livewire('backup-destinations.delete-backup-destination-form', ['backupDestination' => $backupDestination]) -
-
+ @livewire('backup-destinations.update-backup-destination-form', ['backupDestination' => $backupDestination]) + @livewire('backup-destinations.delete-backup-destination-form', ['backupDestination' => $backupDestination])
diff --git a/resources/views/backup-destinations/index.blade.php b/resources/views/backup-destinations/index.blade.php index c1f5e165..c81ec097 100644 --- a/resources/views/backup-destinations/index.blade.php +++ b/resources/views/backup-destinations/index.blade.php @@ -1,23 +1,16 @@ @section('title', __('Backup Destinations')) -

- {{ __('Backup Destinations') }} -

+ {{ __('Backup Destinations') }}
- -
-
- @if (!Auth::user()->backupDestinations->isEmpty()) - - @endif - @livewire('backup-destinations.index-table') -
-
+ + @if (!Auth::user()->backupDestinations->isEmpty()) + + + {{ __('Add Backup Destination') }} + + + @endif + + @livewire('backup-destinations.index-table')
diff --git a/resources/views/backup-tasks/edit.blade.php b/resources/views/backup-tasks/edit.blade.php index 23dfff2e..3545dd79 100644 --- a/resources/views/backup-tasks/edit.blade.php +++ b/resources/views/backup-tasks/edit.blade.php @@ -1,16 +1,10 @@ @section('title', __('Update Backup Task')) -

- {{ __('Update Backup Task') }} -

+ {{ __('Update Backup Task') }}
- -
-
- @livewire('backup-tasks.forms.update-backup-task-form', ['backupTask' => $backupTask]) - @livewire('backup-tasks.forms.delete-backup-task-form', ['backupTask' => $backupTask]) - -
+
+ @livewire('backup-tasks.forms.update-backup-task-form', ['backupTask' => $backupTask]) + @livewire('backup-tasks.forms.delete-backup-task-form', ['backupTask' => $backupTask])
diff --git a/resources/views/components/layouts/account-app.blade.php b/resources/views/components/layouts/account-app.blade.php index 843701f2..b0967b74 100644 --- a/resources/views/components/layouts/account-app.blade.php +++ b/resources/views/components/layouts/account-app.blade.php @@ -1,6 +1,11 @@ @section('title', $header ) - -
+ + @if(isset($action)) + + {{ $action }} + + @endif +
{{ $slot }}
diff --git a/resources/views/components/layouts/app.blade.php b/resources/views/components/layouts/app.blade.php index bc775959..ddbe84b2 100644 --- a/resources/views/components/layouts/app.blade.php +++ b/resources/views/components/layouts/app.blade.php @@ -1,11 +1,13 @@ @isset($header) -

- {{ $header }} -

+ {{ $header }} +
+ @endisset + @isset($action) + + {{ $action }} @endisset - {{ $slot }}
diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 20d66367..f1e25e9c 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -6,13 +6,12 @@ @if (Auth::user()->backupTasks->isNotEmpty()) -

- {{ __('Overview') }} -

+ {{ __('Overview') }}
-
+
-
+

-

+

{{ \App\Facades\Greeting::auto(Auth::user()->timezone) }}, {{ Auth::user()->first_name }}!

-

-

+

+

{{ trans_choice(':count backup task has|:count backup tasks have', Auth::user()->backupTasklogCountToday(), ['count' => Auth::user()->backupTasklogCountToday()]) }} {{ __('been run today.') }}

-
+
- - + +
@@ -60,18 +68,23 @@ class="h-16 w-16 rounded-full border-2 border-primary-200 dark:border-primary-70
-
+
-
+
- - + +
@@ -86,7 +99,8 @@ class="h-16 w-16 rounded-full border-2 border-primary-200 dark:border-primary-70
-
+
@@ -127,10 +141,10 @@ function createCharts() { }, scales: { x: { - ticks: { color: textColor } + ticks: {color: textColor} }, y: { - ticks: { color: textColor } + ticks: {color: textColor} } } }, @@ -171,21 +185,21 @@ function createCharts() { }, scales: { x: { - ticks: { color: textColor } + ticks: {color: textColor} }, y: { - ticks: { color: textColor } + ticks: {color: textColor} } } }, }); - return { totalBackupsPerMonth, backupTasksByType }; + return {totalBackupsPerMonth, backupTasksByType}; } let charts = createCharts(); - window.addEventListener('themeChanged', function(event) { + window.addEventListener('themeChanged', function (event) { charts.totalBackupsPerMonth.destroy(); charts.backupTasksByType.destroy(); charts = createCharts(); diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index cd6a67fa..d255ed52 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -8,7 +8,8 @@ @yield('title', '') | {{ config('app.name') }} - + @@ -53,19 +54,37 @@
{{ Breadcrumbs::render() }} - @if (isset($header)) -
-
- {{ $header }} +
+
+
+
+
+ {{ $header }} +
+
+ +
+
+
@endif -
- {{ $slot }} +
+
+ @if(isset($action)) + {{ $action }} + @endif +
+ {{ $slot }} +
@@ -78,13 +97,15 @@

{{ __('Version :version', ['version' => obtain_vanguard_version()]) }}

@if (config('app.env') === 'local') - + @svg('heroicon-s-beaker', ['class' => 'h-3 w-3 mr-1']) {{ __('Local') }} @endif @if (config('app.debug')) - + @svg('heroicon-s-bug-ant', ['class' => 'h-3 w-3 mr-1']) {{ __('Debug') }} @@ -95,13 +116,15 @@

{{ __('Quick Links') }}

diff --git a/resources/views/livewire/backup-tasks/forms/create-backup-task-form.blade.php b/resources/views/livewire/backup-tasks/forms/create-backup-task-form.blade.php index cd9830a7..4c76b90d 100644 --- a/resources/views/livewire/backup-tasks/forms/create-backup-task-form.blade.php +++ b/resources/views/livewire/backup-tasks/forms/create-backup-task-form.blade.php @@ -1,13 +1,10 @@ @section('title', __('Add Backup Task'))
-

- {{ __('Add Backup Task') }} -

+ {{ __('Add Backup Task') }}
- -
-
+
+
@@ -34,10 +31,12 @@ @if ($index < $currentStep - 1) @svg('heroicon-o-check-circle', 'w-5 h-5 text-white') @else - @svg($step['icon'], 'w-5 h-5 ' . ($index <= $currentStep - 1 ? 'text-white dark:text-gray-950' : 'text-gray-500 dark:text-gray-200')) + @svg($step['icon'], 'w-5 h-5 ' . ($index <= $currentStep - 1 ? 'text-white + dark:text-gray-950' : 'text-gray-500 dark:text-gray-200')) @endif
-
+
{{ $step['label'] }}
@@ -55,20 +54,24 @@ @if ($index < $currentStep - 1) @svg('heroicon-o-check-circle', 'w-6 h-6 text-white') @else - @svg($step['icon'], 'w-6 h-6 ' . ($index <= $currentStep - 1 ? 'text-white dark:text-gray-950' : 'text-gray-500 dark:text-gray-200')) + @svg($step['icon'], 'w-6 h-6 ' . ($index <= $currentStep - 1 ? + 'text-white dark:text-gray-950' : 'text-gray-500 dark:text-gray-200')) @endif
-
+
{{ $step['label'] }}
-
+
Step {{ $index + 1 }}
@if ($index < count($steps) - 1)
-
+
@endif @@ -290,7 +293,8 @@
+ wire:model="cronExpression" name="cronExpression" + placeholder="* * * * *"/> @foreach ($availableNotificationStreams as $notificationStream) - + @endforeach @@ -369,31 +375,36 @@ class="relative bg-gray-50 dark:bg-gray-700 rounded-lg p-4 transition-all durati @svg('heroicon-o-tag', 'w-5 h-5 mr-2 text-blue-500') @break @case(__('Description')) - @svg('heroicon-o-document-text', 'w-5 h-5 mr-2 text-purple-500') + @svg('heroicon-o-document-text', 'w-5 h-5 mr-2 + text-purple-500') @break @case(__('Remote Server')) @svg('heroicon-o-server', 'w-5 h-5 mr-2 text-green-500') @break @case(__('Backup Type')) - @svg('heroicon-o-archive-box', 'w-5 h-5 mr-2 text-yellow-500') + @svg('heroicon-o-archive-box', 'w-5 h-5 mr-2 + text-yellow-500') @break @case(__('Backup Destination')) @svg('heroicon-o-cloud', 'w-5 h-5 mr-2 text-indigo-500') @break @case(__('Maximum Backups to Keep')) - @svg('heroicon-o-archive-box-arrow-down', 'w-5 h-5 mr-2 text-red-500') + @svg('heroicon-o-archive-box-arrow-down', 'w-5 h-5 mr-2 + text-red-500') @break @case(__('Source Path')) @svg('heroicon-o-folder', 'w-5 h-5 mr-2 text-orange-500') @break @case(__('Database Name')) - @svg('heroicon-o-circle-stack', 'w-5 h-5 mr-2 text-cyan-500') + @svg('heroicon-o-circle-stack', 'w-5 h-5 mr-2 + text-cyan-500') @break @case(__('Schedule')) @svg('heroicon-o-calendar', 'w-5 h-5 mr-2 text-pink-500') @break @case(__('Using Isolated Environment')) - @svg('heroicon-o-shield-check', 'w-5 h-5 mr-2 text-teal-500') + @svg('heroicon-o-shield-check', 'w-5 h-5 mr-2 + text-teal-500') @break @case(__('Tags')) @svg('heroicon-o-tag', 'w-5 h-5 mr-2 text-lime-500') @@ -402,7 +413,8 @@ class="relative bg-gray-50 dark:bg-gray-700 rounded-lg p-4 transition-all durati @svg('heroicon-o-bell', 'w-5 h-5 mr-2 text-amber-500') @break @default - @svg('heroicon-o-information-circle', 'w-5 h-5 mr-2 text-gray-500') + @svg('heroicon-o-information-circle', 'w-5 h-5 mr-2 + text-gray-500') @endswitch {{ $key }} @@ -411,7 +423,8 @@ class="relative bg-gray-50 dark:bg-gray-700 rounded-lg p-4 transition-all durati {{ Str::limit($value, 50) }} {{ $value }} - @@ -468,7 +481,8 @@ class="relative bg-gray-50 dark:bg-gray-700 rounded-lg p-4 transition-all durati
- + {{ __('Previous') }}
@@ -476,12 +490,14 @@ class="relative bg-gray-50 dark:bg-gray-700 rounded-lg p-4 transition-all durati
@@ -516,7 +532,7 @@ class="relative bg-gray-50 dark:bg-gray-700 rounded-lg p-4 transition-all durati {{ __('Select a preset to quickly set up common backup schedules. The cron expression will be automatically filled in for you.') }}

- +
@svg('heroicon-o-magnifying-glass', 'w-5 h-5 text-gray-400 absolute left-3 top-3') {{ $group }}
@foreach ($presets as $expression => $description) -
+
- {{ $description }} -
- + {{ $description }} +
+ {{ $expression }} -
+
{{ __('Cron Expression') }}
diff --git a/resources/views/livewire/backup-tasks/index.blade.php b/resources/views/livewire/backup-tasks/index.blade.php index e9d6802e..357c1e6c 100644 --- a/resources/views/livewire/backup-tasks/index.blade.php +++ b/resources/views/livewire/backup-tasks/index.blade.php @@ -3,30 +3,24 @@ {{ __('Backup Tasks') }} - -
-
- @if (!Auth::user()->backupTasks->isEmpty()) - - @endif - - @livewire('backup-tasks.tables.index-table') - - @if (!Auth::user()->backupTasks->isEmpty()) -
- @livewire('backup-tasks.tables.backup-task-history-table') -
- @livewire('backup-tasks.buttons.clear-log-button') -
+ + @if (!Auth::user()->backupTasks->isEmpty()) + + + {{ __('Add Backup Task') }} + + + @endif + +
+ @livewire('backup-tasks.tables.index-table') + @if (!Auth::user()->backupTasks->isEmpty()) +
+ @livewire('backup-tasks.tables.backup-task-history-table') +
+ @livewire('backup-tasks.buttons.clear-log-button')
- @endif -
+
+ @endif
-
diff --git a/resources/views/livewire/notification-streams/forms/create-notification-stream.blade.php b/resources/views/livewire/notification-streams/forms/create-notification-stream.blade.php index 47b7cbdf..f28f37cb 100644 --- a/resources/views/livewire/notification-streams/forms/create-notification-stream.blade.php +++ b/resources/views/livewire/notification-streams/forms/create-notification-stream.blade.php @@ -3,10 +3,5 @@ {{ __('Create Notification Stream') }} - -
-
- -
-
+
diff --git a/resources/views/livewire/notification-streams/forms/update-notification-stream.blade.php b/resources/views/livewire/notification-streams/forms/update-notification-stream.blade.php index 5eacf2fe..4c326c0e 100644 --- a/resources/views/livewire/notification-streams/forms/update-notification-stream.blade.php +++ b/resources/views/livewire/notification-streams/forms/update-notification-stream.blade.php @@ -3,11 +3,6 @@ {{ __('Update Notification Stream') }} - -
-
- - @livewire('notification-streams.buttons.remove-notification-stream', ['notificationStream' => $notificationStream]) -
-
+ + @livewire('notification-streams.buttons.remove-notification-stream', ['notificationStream' => $notificationStream])
diff --git a/resources/views/livewire/notification-streams/index.blade.php b/resources/views/livewire/notification-streams/index.blade.php index 1d0e960f..80f136f7 100644 --- a/resources/views/livewire/notification-streams/index.blade.php +++ b/resources/views/livewire/notification-streams/index.blade.php @@ -3,20 +3,12 @@ {{ __('Notification Streams') }} - -
-
- @if (!Auth::user()->notificationStreams->isEmpty()) - - @endif - - @livewire('notification-streams.tables.index-table') -
-
+ + + + {{ __('Create Notification Stream') }} + + + + @livewire('notification-streams.tables.index-table')
diff --git a/resources/views/livewire/tags/index-item.blade.php b/resources/views/livewire/tags/index-item.blade.php index ddf226a1..2fcd8568 100644 --- a/resources/views/livewire/tags/index-item.blade.php +++ b/resources/views/livewire/tags/index-item.blade.php @@ -5,13 +5,13 @@
- + {{ Str::limit($tag->description ?? '—', 50) }}
- + {{ $tag->created_at->timezone(auth()->user()->timezone)->locale(auth()->user()->language ?? app()->getLocale())->isoFormat('MMMM D, YYYY') }}
diff --git a/resources/views/livewire/tags/index-table.blade.php b/resources/views/livewire/tags/index-table.blade.php index 1242a42d..004b0900 100644 --- a/resources/views/livewire/tags/index-table.blade.php +++ b/resources/views/livewire/tags/index-table.blade.php @@ -1,4 +1,4 @@ -
+
@if ($tags->isEmpty()) diff --git a/resources/views/profile.blade.php b/resources/views/profile.blade.php index 4e8d8146..b005b030 100644 --- a/resources/views/profile.blade.php +++ b/resources/views/profile.blade.php @@ -1,13 +1,13 @@
-
+
-
+
diff --git a/resources/views/remote-servers/create.blade.php b/resources/views/remote-servers/create.blade.php index 7ad4a704..b0470253 100644 --- a/resources/views/remote-servers/create.blade.php +++ b/resources/views/remote-servers/create.blade.php @@ -1,14 +1,7 @@ @section('title', __('Add Remote Server')) -

- {{ __('Add Remote Server') }} -

+ {{ __('Add Remote Server') }}
- -
-
- @livewire('remote-servers.create-remote-server-form') -
-
+ @livewire('remote-servers.create-remote-server-form')
diff --git a/resources/views/remote-servers/edit.blade.php b/resources/views/remote-servers/edit.blade.php index acc2bffb..5673c9e3 100644 --- a/resources/views/remote-servers/edit.blade.php +++ b/resources/views/remote-servers/edit.blade.php @@ -1,14 +1,8 @@ @section('title', __('Update Remote Server')) -

- {{ __('Update Remote Server') }} -

+ {{ __('Update Remote Server') }}
-
-
- @livewire('remote-servers.update-remote-server-form', ['remoteServer' => $remoteServer]) - @livewire('remote-servers.delete-remote-server-form', ['remoteServer' => $remoteServer]) -
-
+ @livewire('remote-servers.update-remote-server-form', ['remoteServer' => $remoteServer]) + @livewire('remote-servers.delete-remote-server-form', ['remoteServer' => $remoteServer])
diff --git a/resources/views/remote-servers/index.blade.php b/resources/views/remote-servers/index.blade.php index 6bfd6045..ffa18619 100644 --- a/resources/views/remote-servers/index.blade.php +++ b/resources/views/remote-servers/index.blade.php @@ -1,23 +1,16 @@ @section('title', __('Remote Servers')) -

- {{ __('Remote Servers') }} -

+ {{ __('Remote Servers') }}
- -
-
- @if (!Auth::user()->remoteServers->isEmpty()) - - @endif - @livewire('remote-servers.index-table') -
-
+ + @if (!Auth::user()->remoteServers->isEmpty()) + + + {{ __('Add Remote Server') }} + + + @endif + + @livewire('remote-servers.index-table')
diff --git a/resources/views/tags/create.blade.php b/resources/views/tags/create.blade.php index 249c4236..01ad2e4f 100644 --- a/resources/views/tags/create.blade.php +++ b/resources/views/tags/create.blade.php @@ -1,17 +1,4 @@ @section('title', 'Create Tag') -
-
- @if (!Auth::user()->tags->isEmpty()) - - @endif - @livewire('tags.create-form') -
-
+ @livewire('tags.create-form')
diff --git a/resources/views/tags/edit.blade.php b/resources/views/tags/edit.blade.php index 916fb7f5..27240456 100644 --- a/resources/views/tags/edit.blade.php +++ b/resources/views/tags/edit.blade.php @@ -1,8 +1,4 @@ @section('title', 'Update Tag') -
-
- @livewire('tags.update-form', ['tag' => $tag]) -
-
+ @livewire('tags.update-form', ['tag' => $tag])
diff --git a/resources/views/tags/index.blade.php b/resources/views/tags/index.blade.php index d9aa3ad9..227a23fe 100644 --- a/resources/views/tags/index.blade.php +++ b/resources/views/tags/index.blade.php @@ -1,16 +1,12 @@ -
-
- @if (!Auth::user()->tags->isEmpty()) - - @endif - @livewire('tags.index-table') -
-
+ + @if (!Auth::user()->tags->isEmpty()) + + + {{ __('Create Tag') }} + + + @endif + + @livewire('tags.index-table')