refactor(ui): popovers

This commit is contained in:
Liyas Thomas
2021-07-05 16:52:15 +00:00
committed by GitHub
parent 256d4b3e07
commit ed91486d53
42 changed files with 828 additions and 866 deletions

View File

@@ -1,5 +1,5 @@
<template>
<TranslateFade appear>
<transition name="fade" appear>
<GithubButton
title="Star Hoppscotch"
href="https://github.com/hoppscotch/hoppscotch"
@@ -15,7 +15,7 @@
aria-label="Star Hoppscotch on GitHub"
data-size="large"
/>
</TranslateFade>
</transition>
</template>
<script>

View File

@@ -17,13 +17,20 @@
label="Get Started"
@click.native="showLogin = true"
/>
<tippy v-else tabindex="-1" trigger="click" theme="popover" arrow>
<tippy
v-else
ref="user"
tabindex="-1"
trigger="click"
theme="popover"
arrow
>
<template #trigger>
<ProfilePicture
v-if="currentUser.photoURL"
v-tippy="{ theme: 'tooltip' }"
:url="currentUser.photoURL"
class="mr-4"
:alt="currentUser.displayName"
:title="
(currentUser.displayName ||
'<label><i>Name not found</i></label>') +
@@ -38,8 +45,19 @@
icon="account_circle"
/>
</template>
<SmartItem to="/settings" icon="settings" :label="$t('settings')" />
<FirebaseLogout />
<SmartItem
to="/profile"
icon="person"
:label="$t('profile')"
@click.native="$refs.user.tippy().hide()"
/>
<SmartItem
to="/settings"
icon="settings"
:label="$t('settings')"
@click.native="$refs.user.tippy().hide()"
/>
<FirebaseLogout @confirm-logout="$refs.user.tippy().hide()" />
</tippy>
</span>
<span tabindex="-1">