Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(ui): show GitLab Connected badge beside title

Andras Bacsai94c3129ad181
diff --git a/app/Livewire/Source/Gitlab/Change.php b/app/Livewire/Source/Gitlab/Change.php
index bab6a41d1b..3038ff2a18 100644
--- a/app/Livewire/Source/Gitlab/Change.php
+++ b/app/Livewire/Source/Gitlab/Change.php
@@ -319,24 +319,6 @@ class Change extends Component
}
}
- public function disconnect()
- {
- try {
- $this->authorize('update', $this->gitlab_app);
-
- $this->gitlab_app->update([
- 'access_token' => null,
- 'refresh_token' => null,
- 'expires_at' => null,
- ]);
-
- $this->isConnected = false;
- $this->dispatch('success', 'GitLab App disconnected.');
- } catch (\Throwable $e) {
- return handleError($e, $this);
- }
- }
-
public function delete()
{
try {
diff --git a/resources/views/livewire/source/gitlab/change.blade.php b/resources/views/livewire/source/gitlab/change.blade.php
index 3f43874eb9..f4156b8110 100644
--- a/resources/views/livewire/source/gitlab/change.blade.php
+++ b/resources/views/livewire/source/gitlab/change.blade.php
@@ -2,7 +2,10 @@
@if ($isConnected)
<form wire:submit='submit'>
<div class="flex flex-col sm:flex-row sm:items-center gap-2">
- <h1>GitLab App</h1>
+ <div class="flex items-center gap-2">
+ <h1>GitLab App</h1>
+ <x-status-badge status="Connected" type="success" />
+ </div>
<div class="flex gap-2">
<x-forms.button canGate="update" :canResource="$gitlab_app" type="submit">Save</x-forms.button>
<x-forms.button wire:click.prevent="testConnection">Test Connection</x-forms.button>
@@ -17,16 +20,6 @@
</div>
</div>
<div class="subtitle">Your GitLab App for private repositories.</div>
- <div class="flex items-center gap-2 mb-4">
- <span class="inline-flex items-center gap-1 px-2 py-1 text-xs font-medium rounded bg-success/10 text-success">
- <svg class="w-3 h-3" fill="currentColor" viewBox="0 0 8 8"><circle cx="4" cy="4" r="3" /></svg>
- Connected
- </span>
- <x-forms.button wire:click.prevent="disconnect"
- class="bg-transparent border-transparent hover:bg-transparent hover:border-transparent hover:underline text-xs">
- Disconnect
- </x-forms.button>
- </div>
<div class="flex flex-col gap-2">
<x-forms.input canGate="update" :canResource="$gitlab_app" id="name" label="Name" />
@if (!isCloud())