Skip to content

Commit

Permalink
Fix login menu not visible when set to the right. (#2605)
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria authored Oct 28, 2024
1 parent 9389338 commit 7251eac
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions resources/js/components/headers/AlbumsHeader.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<LoginModal v-if="user.id === null" v-model:visible="is_login_open" @logged-in="refresh" @open-webauthn="isWebAuthnOpen = true" />
<WebauthnModal v-if="user.id === null && !isWebAuthnUnavailable" v-model:visible="isWebAuthnOpen" @logged-in="refresh" />
<LoginModal v-if="props.user.id === null" v-model:visible="is_login_open" @logged-in="refresh" @open-webauthn="isWebAuthnOpen = true" />
<WebauthnModal v-if="props.user.id === null && !isWebAuthnUnavailable" v-model:visible="isWebAuthnOpen" @logged-in="refresh" />
<UploadPanel v-if="canUpload" @refresh="refresh" />
<ImportFromServer v-if="canUpload" v-model:visible="isImportFromServerOpen" />
<ImportFromLink v-if="canUpload" v-model:visible="isImportFromLinkOpen" :parent-id="null" />
Expand All @@ -14,9 +14,9 @@
>
<template #start>
<!-- Not logged in. -->
<BackLinkButton v-if="user.id === null && !isLoginLeft" :config="props.config" />
<BackLinkButton v-if="props.user.id === null && !isLoginLeft" :config="props.config" />
<Button
v-if="user.id === null && isLoginLeft"
v-if="props.user.id === null && isLoginLeft"
icon="pi pi-sign-in"
class="border-none"
severity="secondary"
Expand Down Expand Up @@ -46,7 +46,7 @@
</template>
</template>
<!-- Not logged in. -->
<BackLinkButton v-if="user.id === null && isLoginLeft" :config="props.config" />
<BackLinkButton v-if="props.user.id === null && isLoginLeft" :config="props.config" />
</div>
<SpeedDial
:model="menu"
Expand Down Expand Up @@ -138,10 +138,9 @@ const emits = defineEmits<{
// 'UPLOAD_TRACK' => 'Upload track',
// 'DELETE_TRACK' => 'Delete track',
const lycheeStore = useLycheeStateStore();
const { left_menu_open, is_login_open, dropbox_api_key, is_upload_visible } = storeToRefs(lycheeStore);
const { is_login_open, dropbox_api_key, is_upload_visible } = storeToRefs(lycheeStore);
const isWebAuthnOpen = ref(false);
const router = useRouter();
const openLeftMenu = () => (left_menu_open.value = !left_menu_open.value);
const {
isCreateAlbumOpen,
Expand Down Expand Up @@ -271,7 +270,7 @@ const menu = computed(() =>
icon: "pi pi-sign-in",
type: "fn",
callback: lycheeStore.toggleLogin,
if: props.user.id === null && !isLoginLeft,
if: props.user.id === null && !isLoginLeft.value,
},
{
icon: "pi pi-question-circle",
Expand Down

0 comments on commit 7251eac

Please sign in to comment.