more ui components

This commit is contained in:
2023-05-26 17:32:43 +02:00
parent c3bd807bff
commit 2088b12242
9 changed files with 41 additions and 46 deletions

View File

@@ -24,35 +24,26 @@ const handleClick = (fn: (...args: any[]) => any) => {
</script>
<template>
<OnClickOutside>
<div class="search-active-hide dropdown-end dropdown">
<label tabindex="0" class="btn-outline btn-sm btn py-1 text-white">
<i class="fa-fw fa-solid fa-user-gear" />
</label>
<ul
tabindex="0"
class="dropdown-content menu rounded-box menu-compact mt-1 w-52 bg-base-100 p-2 text-base-content shadow"
>
<li
class="text-base"
v-for="source in availableNotesSources.filter(
(source) => source !== activeNotesSource
)"
<UIDropdown class="search-active-hide">
<template #activator>
<UIButton size="sm" variant="outline" tabindex="0" class="py-1 text-white">
<i class="fa-fw fa-solid fa-user-gear" />
</UIButton>
</template>
<template #items>
<UIDropdownItem
v-for="source in availableNotesSources.filter((source) => source !== activeNotesSource)"
:key="source"
@click="handleClick(() => (preferredNotesSource = source))"
>
<a>
<i class="fa-fw fa-solid fa-database" />
{{ sourceLabels[source] }}
</a>
</li>
<i class="fa-fw fa-solid fa-database" />
{{ sourceLabels[source] }}
</UIDropdownItem>
<UIModal>
<template #activator="{ open }">
<li @click="open" class="text-base">
<a>
<i class="fa-fw fa-solid fa-right-from-bracket" />
Sign out
</a>
</li>
<UIDropdownItem @click="open">
<i class="fa-fw fa-solid fa-right-from-bracket" />
Sign out
</UIDropdownItem>
</template>
<template #title>Sign out</template>
<template #default>
@@ -60,11 +51,11 @@ const handleClick = (fn: (...args: any[]) => any) => {
<p>Your synchronized notes can't be accessed until you sign-in again.</p>
</template>
<template #actions="{ close }">
<button class="btn-sm btn" @click="close">Cancel</button>
<button class="btn-primary btn-sm btn" @click="signOut(close)">Sign out</button>
<UIButton size="sm" @click="close">Cancel</UIButton>
<UIButton size="sm" color="primary" @click="signOut(close)">Sign out</UIButton>
</template>
</UIModal>
</ul>
</div>
</template>
</UIDropdown>
</OnClickOutside>
</template>