shared variables are more visible now on the ui

This commit is contained in:
Andras Bacsai
2024-04-26 14:59:03 +02:00
parent 50c5d533b0
commit 8a4c2bf208
19 changed files with 307 additions and 97 deletions

View File

@@ -0,0 +1,22 @@
<div>
<div class="flex gap-2">
<h1>Projects</h1>
</div>
<div class="subtitle">List of your projects.</div>
<div class="flex flex-col gap-2">
@forelse ($projects as $project)
<a class="box group"
href="{{ route('shared-variables.project.show', ['project_uuid' => data_get($project, 'uuid')]) }}">
<div class="flex flex-col justify-center mx-6 ">
<div class="box-title">{{ $project->name }}</div>
<div class="box-description ">
{{ $project->description }}</div>
</div>
</a>
@empty
<div>
<div>No project found.</div>
</div>
@endforelse
</div>
</div>

View File

@@ -0,0 +1,22 @@
<div>
<div class="flex gap-2">
<h1>Shared Variables for {{data_get($project,'name')}}</h1>
<x-modal-input buttonTitle="+ Add" title="New Shared Variable">
<livewire:project.shared.environment-variable.add :shared="true" />
</x-modal-input>
</div>
<div class="flex flex-wrap gap-1 subtitle">
<div>You can use these variables anywhere with</div>
<div class="dark:text-warning text-coollabs">@{{ project.VARIABLENAME }} </div>
<x-helper
helper="More info <a class='underline dark:text-white' href='https://coolify.io/docs/knowledge-base/environment-variables#shared-variables' target='_blank'>here</a>."></x-helper>
</div>
<div class="flex flex-col gap-2">
@forelse ($project->environment_variables->sort()->sortBy('key') as $env)
<livewire:project.shared.environment-variable.show wire:key="environment-{{ $env->id }}"
:env="$env" type="project" />
@empty
<div>No environment variables found.</div>
@endforelse
</div>
</div>