Skip to content

Commit 3e82d8f

Browse files
authored
fix: small fixes for mobile (#580)
* fix(theme): show currency-switcher on mobile * fix(theme): only show login-modal when user isn't logged in
1 parent 2b1d8ad commit 3e82d8f

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

packages/theme/components/AppHeader.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
/>
3131
</template>
3232
<template #aside>
33-
<StoreSwitcher class="smartphone-only" />
33+
<div class="sf-header__switchers">
34+
<CurrencySelector class="smartphone-only" />
35+
<StoreSwitcher class="smartphone-only" />
36+
</div>
3437
</template>
3538
<template
3639
#header-icons="{activeIcon}"
@@ -197,10 +200,12 @@ import {
197200
useUiState,
198201
} from '~/composables';
199202
import StoreSwitcher from '~/components/StoreSwitcher.vue';
203+
import CurrencySelector from '~/components/CurrencySelector.vue';
200204
201205
export default defineComponent({
202206
components: {
203207
SfHeader,
208+
CurrencySelector,
204209
StoreSwitcher,
205210
SfIcon,
206211
SfButton,
@@ -360,6 +365,10 @@ export default defineComponent({
360365
--header-padding: 0 var(--spacer-sm);
361366
}
362367
368+
&__switchers {
369+
display: flex;
370+
}
371+
363372
&__logo-image {
364373
height: 100%;
365374
}

packages/theme/components/BottomNavigation.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ export default defineComponent({
7878
const handleAccountClick = async () => {
7979
if (isAuthenticated.value) {
8080
await router.push(`${app.localePath('/my-account')}`);
81+
} else {
82+
toggleLoginModal();
8183
}
82-
toggleLoginModal();
8384
};
8485
8586
return {

packages/theme/components/StoreSwitcher.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
>
77
<SfCharacteristic class="store-switcher">
88
<template #title>
9-
<span>{{ storeConfig.store_name }}</span>
9+
<span class="desktop-only">{{ storeConfig.store_name }}</span>
1010
</template>
1111
<template #icon>
1212
<nuxt-img

0 commit comments

Comments
 (0)