From b71aec35a1de1c0209e1e425248c8a4f0e056b37 Mon Sep 17 00:00:00 2001
From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com>
Date: Wed, 16 Apr 2025 10:04:03 +0200
Subject: [PATCH] refactor(source): conditionally display connected source and
change source options based on private key presence
---
.../project/application/source.blade.php | 72 ++++++++++---------
1 file changed, 37 insertions(+), 35 deletions(-)
diff --git a/resources/views/livewire/project/application/source.blade.php b/resources/views/livewire/project/application/source.blade.php
index 29c5c6142..ee217649a 100644
--- a/resources/views/livewire/project/application/source.blade.php
+++ b/resources/views/livewire/project/application/source.blade.php
@@ -26,9 +26,11 @@
Code source of your application.
-
Currently connected source: {{ $application->source->name }}
-
+ @if (!$privateKeyId)
+
Currently connected source: {{ $application->source->name }}
+
+ @endif
@@ -38,38 +40,6 @@
-
-
Change Git Source
-
- @forelse ($sources as $source)
-
-
-
-
-
- {{ $source->name }}
- @if ($application->source_id === $source->id)
- (current)
- @endif
-
-
- {{ $source->organization ?? 'Personal Account' }}
-
-
-
-
-
- @empty
-
No sources found
- @endforelse
-
-
-
@if ($privateKeyId)
Deploy Key
Currently attached Private Key:
@endforeach
+ @else
+
+
Change Git Source
+
+ @forelse ($sources as $source)
+
+
+
+
+
+ {{ $source->name }}
+ @if ($application->source_id === $source->id)
+ (current)
+ @endif
+
+
+ {{ $source->organization ?? 'Personal Account' }}
+
+
+
+
+
+ @empty
+
No sources found
+ @endforelse
+
+
@endif