fix tags + ui

This commit is contained in:
Andras Bacsai 2024-04-25 15:04:49 +02:00
parent da521020f6
commit 96883dabe3
3 changed files with 17 additions and 14 deletions

View File

@ -71,7 +71,7 @@ class="items-center justify-center box">+ Add New Resource</a>
<div class="max-w-full px-4 truncate box-description" x-text="item.fqdn"></div>
</div>
</a>
<div class="flex gap-1 pt-1 group-hover:dark:text-white group-hover:text-black group min-h-6">
<div class="flex flex-wrap gap-1 pt-1 group-hover:dark:text-white group-hover:text-black group min-h-6">
<template x-for="tag in item.tags">
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
</template>

View File

@ -1,6 +1,6 @@
<div>
<h2>Tags</h2>
<div class="flex gap-2 pt-4">
<div class="flex flex-wrap gap-2 pt-4">
@if (data_get($this->resource, 'tags'))
@forelse (data_get($this->resource,'tags') as $tagId => $tag)
<div
@ -29,7 +29,7 @@ class="inline-block w-3 h-3 rounded cursor-pointer stroke-current hover:bg-red-5
@if (count($tags) > 0)
<h3 class="pt-4">Exisiting Tags</h3>
<div>Click to add quickly</div>
<div class="flex gap-2 pt-4">
<div class="flex flex-wrap gap-2 pt-4">
@foreach ($tags as $tag)
<x-forms.button wire:click="addTag('{{ $tag->id }}','{{ $tag->name }}')">
{{ $tag->name }}</x-forms.button>

View File

@ -8,8 +8,7 @@
<div>Available tags</div>
<div class="flex flex-wrap gap-2 ">
@forelse ($tags as $oneTag)
<a :class="{{ $tag->id == $oneTag->id }} && 'bg-coollabs hover:bg-coollabs-100'"
class="w-64 box"
<a :class="{{ $tag->id == $oneTag->id }} && 'bg-coollabs hover:bg-coollabs-100'" class="w-64 box"
href="{{ route('tags.show', ['tag_name' => $oneTag->name]) }}">{{ $oneTag->name }}</a>
@empty
<div>No tags yet defined yet. Go to a resource and add a tag there.</div>
@ -28,19 +27,23 @@ class="w-64 box"
</div>
<div class="grid grid-cols-1 gap-2 pt-4 lg:grid-cols-2 xl:grid-cols-3">
@foreach ($applications as $application)
<a href="{{ $application->link() }}" class="flex flex-col box group">
<span
class="font-bold dark:text-white">{{ $application->project()->name }}/{{ $application->environment->name }}</span>
<span class="dark:text-white ">{{ $application->name }}</span>
<span class="description">{{ $application->description }}</span>
<a href="{{ $application->link() }}" class="box group">
<div class="flex flex-col">
<div class="box-title">{{ $application->project()->name }}/{{ $application->environment->name }}
</div>
<div class="box-description">{{ $application->name }}</div>
<div class="box-description">{{ $application->description }}</div>
</div>
</a>
@endforeach
@foreach ($services as $service)
<a href="{{ $service->link() }}" class="flex flex-col box group">
<span
class="font-bold dark:text-white">{{ $service->project()->name }}/{{ $service->environment->name }}</span>
<span class="dark:text-white ">{{ $service->name }}</span>
<span class="description">{{ $service->description }}</span>
<div class="flex flex-col">
<div class="box-title">{{ $service->project()->name }}/{{ $service->environment->name }}
</div>
<div class="box-description">{{ $service->name }}</div>
<div class="box-description">{{ $service->description }}</div>
</div>
</a>
@endforeach
</div>