This commit is contained in:
Andras Bacsai
2023-06-12 22:02:10 +02:00
parent 6626795a99
commit bc79e142e5
8 changed files with 157 additions and 91 deletions

View File

@@ -0,0 +1,31 @@
<x-layout>
<h1>Sources</h1>
<div class="pt-2 pb-10 text-sm">All Sources</div>
<div class="grid grid-cols-2 gap-2">
@forelse ($sources as $source)
@if ($source->getMorphClass() === 'App\Models\GithubApp')
<a class="flex gap-4 text-center hover:no-underline box group"
href="{{ route('source.github.show', ['github_app_uuid' => data_get($source, 'uuid')]) }}">
<x-git-icon class="text-white w-9 h-9" git="{{ $source->getMorphClass() }}" />
<div class="group-hover:text-white">
<div>{{ $source->name }}</div>
</div>
</a>
@endif
@if ($source->getMorphClass() === 'App\Models\GitlabApp')
<a class="flex gap-4 text-center hover:no-underline box group"
href="{{ route('source.gitlab.show', ['gitlab_app_uuid' => data_get($source, 'uuid')]) }}">
<x-git-icon class="text-white w-9 h-9" git="{{ $source->getMorphClass() }}" />
<div class="group-hover:text-white">
<div>{{ $source->name }}</div>
</div>
</a>
@endif
@empty
<div>
<div>No sources found.</div>
<x-use-magic-bar />
</div>
@endforelse
</div>
</x-layout>

View File

@@ -1,7 +1,8 @@
<x-layout>
<h1>New Source</h1>
<div class="pt-2 pb-10 text-sm">Add source providers for your applications.</div>
<div x-data="{ activeTab: window.location.hash ? window.location.hash.substring(1) : '' }">
<div class="flex justify-center h-full gap-2">
<div class="flex justify-center h-full gap-2 pb-6">
<a class="flex items-center justify-center w-1/2 p-2 text-sm transition-colors rounded-none min-h-12 bg-coolgray-200 hover:bg-coollabs-100 hover:text-white hover:no-underline"
:class="activeTab === 'github' && 'bg-coollabs text-white'"
@click.prevent="activeTab = 'github'; window.location.hash = 'github'" href="#">GitHub
@@ -15,7 +16,7 @@
<livewire:source.github.create />
</div>
<div x-cloak x-show="activeTab === 'gitlab'" class="h-full">
GitLab here
WIP
</div>
</div>
</x-layout>