Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix login menu not visible when set to the right. #2605

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reason why it was not showing...

},
{
icon: "pi pi-question-circle",
Expand Down
Loading