move projects from sidebar to topbar (#170)

and fix #169
This commit is contained in:
Saeed Vaziry
2024-04-23 21:34:39 +02:00
committed by GitHub
parent f0da1c6d8c
commit 25977d2ead
14 changed files with 31 additions and 25 deletions

View File

@ -29,9 +29,13 @@ class="absolute bottom-0 left-0 right-0 rounded-b-md bg-gray-700/60 text-center
</div>
</a>
</div>
<div class="ml-5 cursor-pointer" x-data="">
<div class="ml-5 flex cursor-pointer items-center" x-data="">
<div class="mr-2">
@include("layouts.partials.project-select")
</div>
<div
class="flex w-full items-center rounded-md border border-gray-200 bg-gray-100 px-4 py-2 text-sm text-gray-900 focus:ring-4 focus:ring-gray-300 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300 dark:focus:ring-gray-600"
class="flex h-10 w-full items-center rounded-md border border-gray-200 bg-gray-100 px-4 py-2 text-sm text-gray-900 focus:ring-4 focus:ring-gray-300 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300 dark:focus:ring-gray-600"
@click="$dispatch('open-search')"
>
<x-heroicon name="o-magnifying-glass" class="h-4 w-4" />
@ -47,7 +51,7 @@ class="flex w-full items-center rounded-md border border-gray-200 bg-gray-100 px
<x-dropdown align="right" width="48">
<x-slot name="trigger">
<button
class="flex rounded-full text-sm focus:ring-4 focus:ring-gray-300 dark:focus:ring-gray-600"
class="flex rounded-full p-1 text-sm focus:ring-2 focus:ring-gray-300 dark:focus:ring-gray-600"
>
<x-heroicon name="o-cog-6-tooth" class="h-8 w-8 rounded-full" />
</button>

View File

@ -35,7 +35,10 @@ class="flex items-center text-gray-600 dark:text-gray-300"
<div class="flex items-center justify-end">
<x-dropdown>
<x-slot name="trigger">
<button type="button" class="flex items-center">
<button
type="button"
class="flex items-center rounded-full p-1 focus:ring-2 focus:ring-gray-300 dark:focus:ring-gray-600"
>
<x-heroicon name="o-moon" x-show="isDark()" class="h-7 w-7" />
<x-heroicon name="o-sun" x-show="!isDark()" class="h-7 w-7" />
</button>

View File

@ -1,15 +1,15 @@
<div data-tooltip="Project" class="cursor-pointer">
<x-dropdown width="full">
<div class="cursor-pointer">
<x-dropdown align="left">
<x-slot:trigger>
<div>
<div data-tooltip="Project">
<div
class="block w-full rounded-md border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-primary-500 dark:focus:ring-primary-500"
class="flex h-10 w-max items-center rounded-md border border-gray-200 bg-gray-100 px-4 py-2 pr-7 text-sm text-gray-900 focus:ring-4 focus:ring-gray-300 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300 dark:focus:ring-gray-600"
>
{{ auth()->user()->currentProject?->name ?? __("Select Project") }}
<button type="button" class="absolute inset-y-0 right-0 flex items-center pr-2">
<x-heroicon name="o-chevron-down" class="h-4 w-4 text-gray-400" />
</button>
</div>
<button type="button" class="absolute inset-y-0 right-0 flex items-center pr-2">
<x-heroicon name="o-chevron-down" class="h-4 w-4 text-gray-400" />
</button>
</div>
</x-slot>
<x-slot:content>

View File

@ -5,10 +5,6 @@ class="fixed left-0 top-0 z-40 h-screen w-64 -translate-x-full border-r border-g
>
<div class="h-full overflow-y-auto bg-white px-3 pb-4 dark:bg-gray-800">
<ul class="space-y-2 font-medium">
<li x-data="">
@include("layouts.partials.project-select")
</li>
<x-hr />
<li>
@include("layouts.partials.server-select")
</li>