fix(ui): align profile dropdown items and prevent phantom synthetic drag clicks (#21699)
This commit is contained in:
@@ -201,7 +201,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition cursor-pointer"
|
class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition cursor-pointer select-none"
|
||||||
on:click={async () => {
|
on:click={async () => {
|
||||||
show = false;
|
show = false;
|
||||||
|
|
||||||
@@ -220,7 +220,7 @@
|
|||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition cursor-pointer"
|
class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition cursor-pointer select-none"
|
||||||
on:click={async () => {
|
on:click={async () => {
|
||||||
show = false;
|
show = false;
|
||||||
|
|
||||||
@@ -243,7 +243,8 @@
|
|||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
as="a"
|
as="a"
|
||||||
href="/playground"
|
href="/playground"
|
||||||
class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition select-none"
|
draggable="false"
|
||||||
|
class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition cursor-pointer select-none"
|
||||||
on:click={async () => {
|
on:click={async () => {
|
||||||
show = false;
|
show = false;
|
||||||
if ($mobile) {
|
if ($mobile) {
|
||||||
@@ -260,7 +261,8 @@
|
|||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
as="a"
|
as="a"
|
||||||
href="/admin"
|
href="/admin"
|
||||||
class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition select-none"
|
draggable="false"
|
||||||
|
class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition cursor-pointer select-none"
|
||||||
on:click={async () => {
|
on:click={async () => {
|
||||||
show = false;
|
show = false;
|
||||||
if ($mobile) {
|
if ($mobile) {
|
||||||
@@ -284,36 +286,42 @@
|
|||||||
{#if $user?.role === 'admin'}
|
{#if $user?.role === 'admin'}
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
as="a"
|
as="a"
|
||||||
|
href="https://docs.openwebui.com"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="flex gap-3 items-center py-1.5 px-3 text-sm select-none w-full cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl transition"
|
draggable="false"
|
||||||
|
class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition cursor-pointer select-none"
|
||||||
id="chat-share-button"
|
id="chat-share-button"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
show = false;
|
show = false;
|
||||||
}}
|
}}
|
||||||
href="https://docs.openwebui.com"
|
|
||||||
>
|
>
|
||||||
<QuestionMarkCircle className="size-5" />
|
<div class=" self-center mr-3">
|
||||||
<div class="flex items-center">{$i18n.t('Documentation')}</div>
|
<QuestionMarkCircle className="size-5" />
|
||||||
|
</div>
|
||||||
|
<div class=" self-center truncate">{$i18n.t('Documentation')}</div>
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
|
|
||||||
<!-- Releases -->
|
<!-- Releases -->
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
as="a"
|
as="a"
|
||||||
|
href="https://github.com/open-webui/open-webui/releases"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="flex gap-3 items-center py-1.5 px-3 text-sm select-none w-full cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl transition"
|
draggable="false"
|
||||||
|
class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition cursor-pointer select-none"
|
||||||
id="chat-share-button"
|
id="chat-share-button"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
show = false;
|
show = false;
|
||||||
}}
|
}}
|
||||||
href="https://github.com/open-webui/open-webui/releases"
|
|
||||||
>
|
>
|
||||||
<Map className="size-5" />
|
<div class=" self-center mr-3">
|
||||||
<div class="flex items-center">{$i18n.t('Releases')}</div>
|
<Map className="size-5" />
|
||||||
|
</div>
|
||||||
|
<div class=" self-center truncate">{$i18n.t('Releases')}</div>
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
class="flex gap-3 items-center py-1.5 px-3 text-sm select-none w-full hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl transition cursor-pointer"
|
class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition cursor-pointer select-none"
|
||||||
id="chat-share-button"
|
id="chat-share-button"
|
||||||
on:click={async () => {
|
on:click={async () => {
|
||||||
show = false;
|
show = false;
|
||||||
@@ -325,15 +333,17 @@
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Keyboard className="size-5" />
|
<div class=" self-center mr-3">
|
||||||
<div class="flex items-center">{$i18n.t('Keyboard shortcuts')}</div>
|
<Keyboard className="size-5" />
|
||||||
|
</div>
|
||||||
|
<div class=" self-center truncate">{$i18n.t('Keyboard shortcuts')}</div>
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<hr class=" border-gray-50/30 dark:border-gray-800/30 my-1 p-0" />
|
<hr class=" border-gray-50/30 dark:border-gray-800/30 my-1 p-0" />
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition"
|
class="flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition cursor-pointer select-none"
|
||||||
on:click={async () => {
|
on:click={async () => {
|
||||||
const res = await userSignOut();
|
const res = await userSignOut();
|
||||||
user.set(null);
|
user.set(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user