do not use hash routing for tabs
add empty project creation if local image is found, we only refresh the configuration
This commit is contained in:
@@ -4,28 +4,22 @@
|
||||
@elseif ($type === 'resource')
|
||||
<h1>New Resource</h1>
|
||||
@endif
|
||||
<div x-data="{ tab: window.location.hash ? window.location.hash.substring(1) : 'choose' }">
|
||||
<div x-data="{ activeTab: 'choose' }">
|
||||
<div class="flex flex-col w-64 gap-2 mb-10">
|
||||
<button @click.prevent="tab = 'public-repo'; window.location.hash = 'public-repo'">Public Repository
|
||||
</button>
|
||||
<button @click.prevent="tab = 'github-private-repo'; window.location.hash = 'github-private-repo'">Private
|
||||
Repository (GitHub App)</button>
|
||||
<button @click.prevent="activeTab = 'public-repo'">Public Repository</button>
|
||||
<button @click.prevent="activeTab = 'github-private-repo'">Private Repository (GitHub App)</button>
|
||||
@if ($type === 'project')
|
||||
<button @click.prevent="tab = 'empty-project'; window.location.hash = 'empty-project'">Empty
|
||||
Project</button>
|
||||
<livewire:project.new.empty-project />
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div x-cloak x-show="tab === 'public-repo'">
|
||||
<div x-cloak x-show="activeTab === 'public-repo'">
|
||||
<livewire:project.new.public-git-repository :type="$type" />
|
||||
</div>
|
||||
<div x-cloak x-show="tab === 'github-private-repo'">
|
||||
<div x-cloak x-show="activeTab === 'github-private-repo'">
|
||||
github-private-repo
|
||||
</div>
|
||||
<div x-cloak x-show="tab === 'empty-project'">
|
||||
empty-project
|
||||
</div>
|
||||
<div x-cloak x-show="tab === 'choose'">
|
||||
<div x-cloak x-show="activeTab === 'choose'">
|
||||
Choose any option
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user