Skip to content

Commit c55b6b9

Browse files
authored
Merge pull request #1884 from dev-protocol/feature/fix-checkout-modal
Feature/fix checkout modal
2 parents 681773a + 3f7f752 commit c55b6b9

File tree

3 files changed

+46
-24
lines changed

3 files changed

+46
-24
lines changed

src/ui/components/Checkout/ModalCheckout.vue

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,26 +140,46 @@ onMounted(async () => {
140140

141141
<template>
142142
<div
143-
class="m-auto w-full max-w-screen-lg rounded-xl bg-white p-4 text-black shadow @container/clb_result_modal"
143+
class="@container/clb_result_modal relative w-full max-w-screen-lg rounded-xl bg-white p-4 text-black shadow"
144144
>
145+
<a
146+
:href="props.base ?? '/'"
147+
class="absolute -right-10 -top-10 flex h-8 w-8 items-center justify-center hover:bg-none"
148+
>
149+
<svg
150+
xmlns="http://www.w3.org/2000/svg"
151+
class="h-6 w-6"
152+
fill="none"
153+
viewBox="0 0 24 24"
154+
stroke="white"
155+
>
156+
<path
157+
stroke-linecap="round"
158+
stroke-linejoin="round"
159+
stroke-width="2"
160+
d="M6 18L18 6M6 6l12 12"
161+
/>
162+
</svg>
163+
</a>
164+
145165
<div
146-
class="bg-color-navy relative mb-6 flex h-auto min-h-52 w-full flex-col items-center justify-center overflow-hidden rounded-md border border-black p-2 @xl/clb_result_modal:h-96 @xl/clb_result_modal:min-h-0 @xl/clb_result_modal:p-8"
166+
class="bg-color-navy @xl/clb_result_modal:h-96 @xl/clb_result_modal:min-h-0 @xl/clb_result_modal:p-8 relative mb-6 flex h-auto min-h-52 w-full flex-col items-center justify-center overflow-hidden rounded-md border border-black p-2"
147167
>
148168
<div
149169
class="w-h-screen bg-focus-lines origin-zero animate-spin-slow mask absolute inset-2/4 -translate-x-1/2 -translate-y-1/2 bg-center bg-no-repeat"
150170
></div>
151171
<h3 class="mb-1 text-white">
152172
<span
153173
v-if="name"
154-
class="text-xl italic @xl/clb_result_modal:text-3xl"
174+
class="@xl/clb_result_modal:text-3xl text-xl italic"
155175
>{{ name }}</span
156176
>
157177
</h3>
158178
<!-- image -->
159179
<img
160180
v-if="imageSrc"
161181
ref="imageRef"
162-
class="z-10 max-h-60 min-h-full max-w-60 object-contain @xl/clb_result_modal:max-h-none @xl/clb_result_modal:max-w-xl"
182+
class="@xl/clb_result_modal:max-h-none @xl/clb_result_modal:max-w-xl z-10 max-h-60 min-h-full max-w-60 object-contain"
163183
/>
164184
<!-- video -->
165185
<VideoFetch
@@ -171,7 +191,7 @@ onMounted(async () => {
171191
{{ i18n('PurchaseGreeting') }}
172192
</span>
173193
</div>
174-
<div class="flex flex-col gap-6 px-0 @4xl/clb_result_modal:px-52">
194+
<div class="@4xl/clb_result_modal:px-52 flex flex-col gap-6 px-0">
175195
<!-- description -->
176196
<aside
177197
v-if="description"
@@ -188,34 +208,34 @@ onMounted(async () => {
188208
<slot name="after:description" />
189209

190210
<div
191-
class="flex w-full flex-col gap-4 @4xl/clb_result_modal:flex-row @4xl/clb_result_modal:justify-between @4xl/clb_result_modal:gap-0"
211+
class="@4xl/clb_result_modal:flex-row @4xl/clb_result_modal:justify-between @4xl/clb_result_modal:gap-0 flex w-full flex-col gap-4"
192212
>
193213
<a
194214
v-if="cronFinished"
195215
:href="passportPageUrl"
196-
class="hs-button is-filled rounded-lg border px-0 py-4 text-base @4xl/clb_result_modal:px-12 @4xl/clb_result_modal:py-6"
216+
class="hs-button is-filled @4xl/clb_result_modal:px-12 @4xl/clb_result_modal:py-6 rounded-lg border px-0 py-4 text-base"
197217
>
198218
{{ i18n('Passport') }}
199219
</a>
200220
<button
201221
v-if="!cronFinished"
202222
@click="onClickPassport"
203223
:disabled="clicked"
204-
class="hs-button is-filled items-center justify-center gap-2 rounded-lg border px-0 py-4 text-base disabled:animate-pulse disabled:bg-blue-600 @4xl/clb_result_modal:px-12 @4xl/clb_result_modal:py-6"
224+
class="hs-button is-filled @4xl/clb_result_modal:px-12 @4xl/clb_result_modal:py-6 items-center justify-center gap-2 rounded-lg border px-0 py-4 text-base disabled:animate-pulse disabled:bg-blue-600"
205225
>
206226
{{ i18n('Passport') }}
207227
<Spinner v-if="clicked" />
208228
</button>
209229
<a
210230
:href="props.base ?? '/'"
211-
class="hs-button is-filled rounded-lg border px-12 py-4 text-base @4xl/clb_result_modal:py-6"
231+
class="hs-button is-filled @4xl/clb_result_modal:py-6 rounded-lg border px-12 py-4 text-base"
212232
>
213-
{{ i18n('Home') }}
233+
{{ i18n('ContinueShopping') }}
214234
</a>
215235
<button
216236
v-if="false /* HIDDEN FOR NOW */"
217237
@click="modalClose"
218-
class="hs-button is-filled rounded-lg border px-12 py-4 text-base @4xl/clb_result_modal:py-6"
238+
class="hs-button is-filled @4xl/clb_result_modal:py-6 rounded-lg border px-12 py-4 text-base"
219239
>
220240
{{ i18n('Close') }}
221241
</button>

src/ui/components/Checkout/i18n/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,8 @@ export const Strings = {
7979
en: `Signed in as:`,
8080
ja: `サインインしているユーザー:`,
8181
},
82+
ContinueShopping: {
83+
en: 'Continue Shopping',
84+
ja: 'Continue Shopping',
85+
},
8286
} satisfies ClubsI18nParts

src/ui/components/Modal.vue

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,17 @@ html:has(dialog[open]) {
4949
:class="{ hidden: !isVisible }"
5050
>
5151
<Transition>
52-
<div class="relative m-auto w-full py-4">
53-
<component
54-
:eoa="eoa"
55-
:modalClose="modalClose"
56-
v-show="isVisible"
57-
:is="modalContent"
58-
v-bind="attrs"
59-
>
60-
<template #after:description>
61-
<slot name="after:description" />
62-
</template>
63-
</component>
64-
</div>
52+
<component
53+
:eoa="eoa"
54+
:modalClose="modalClose"
55+
v-show="isVisible"
56+
:is="modalContent"
57+
v-bind="attrs"
58+
>
59+
<template #after:description>
60+
<slot name="after:description" />
61+
</template>
62+
</component>
6563
</Transition>
6664
</dialog>
6765
</template>

0 commit comments

Comments
 (0)