-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(payment): fix paddle setup + create subscription payment UI skel…
…eton
- Loading branch information
1 parent
9965a4c
commit ed2ffa9
Showing
14 changed files
with
321 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions
12
src/components/specific/payment/storage-preview/StoragePreview.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.storage-preview { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: calc(var(--spacing-unit) * 3); | ||
padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 4); | ||
|
||
&__actual, | ||
&__new { | ||
width: 100%; | ||
} | ||
} |
64 changes: 64 additions & 0 deletions
64
src/components/specific/payment/storage-preview/StoragePreview.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<template> | ||
<div class="storage-preview"> | ||
<div class="storage-preview__title"> | ||
<h1>{{ $t("StoragePreview.title") }}</h1> | ||
</div> | ||
<div class="storage-preview__logo"> | ||
<img | ||
src="/static/storage-preview-image.svg" | ||
alt="storage-preview-image" | ||
/> | ||
</div> | ||
<div class="storage-preview__actual"> | ||
<ProgressBar class="m-b-12" componentWidth="100%" :progressPercent="36"> | ||
<template #text-left-above> | ||
{{ $t("StoragePreview.actualStorage") }} | ||
</template> | ||
<template #text-left-below> | ||
<span>125MB</span> | ||
</template> | ||
<template #text-right-below> | ||
<span>500MB</span> | ||
</template> | ||
</ProgressBar> | ||
<BIMDataText color="color-tertiary-dark"> | ||
{{ $t("StoragePreview.actualStorageText") }} | ||
</BIMDataText> | ||
</div> | ||
<div class="storage-preview__new"> | ||
<ProgressBar class="m-b-12" componentWidth="100%" :progressPercent="15"> | ||
<template #text-left-above> | ||
{{ $t("StoragePreview.newStorage") }} | ||
</template> | ||
<template #text-left-below> | ||
<span>125MB</span> | ||
</template> | ||
<template #text-right-below> | ||
<span>10GB</span> | ||
</template> | ||
</ProgressBar> | ||
<BIMDataText color="color-tertiary-dark"> | ||
{{ $t("StoragePreview.newStorageText") }} | ||
</BIMDataText> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
// Components | ||
import ProgressBar from "@/components/generic/progress-bar/ProgressBar.vue"; | ||
export default { | ||
components: { | ||
ProgressBar | ||
}, | ||
props: { | ||
// TODO | ||
}, | ||
setup() { | ||
// TODO | ||
} | ||
}; | ||
</script> | ||
|
||
<style scoped lang="scss" src="./StoragePreview.scss"></style> |
3 changes: 3 additions & 0 deletions
3
src/components/specific/payment/subscription-form/SubscriptionForm.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.subscription-form { | ||
// TODO | ||
} |
51 changes: 51 additions & 0 deletions
51
src/components/specific/payment/subscription-form/SubscriptionForm.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<template> | ||
<div class="subscription-form paddle-checkout-container"> | ||
<!-- Paddle inline checkout will be loaded here --> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { onMounted } from "vue"; | ||
import { useUser } from "@/state/user.js"; | ||
export default { | ||
props: { | ||
organization: { | ||
type: Object, | ||
required: true | ||
}, | ||
space: { | ||
type: Object, | ||
required: true | ||
} | ||
}, | ||
setup() { | ||
const { user } = useUser(); | ||
onMounted(() => { | ||
Paddle.Checkout.open({ | ||
// Checkout params | ||
product: 12403, | ||
method: "inline", | ||
disableLogout: true, | ||
referring_domain: "platform self service", | ||
// User data | ||
email: user.value.email, | ||
// passthrough: { | ||
// organization_id: "1663", | ||
// cloud_id: "673" | ||
// }, | ||
// Checkout frame | ||
frameTarget: "paddle-checkout-container", | ||
frameInitialHeight: 416, | ||
frameStyle: | ||
"width:100%; min-width:312px; background-color: transparent; border: none;" | ||
}); | ||
}); | ||
} | ||
}; | ||
</script> | ||
|
||
<style scoped lang="scss" src="./SubscriptionForm.scss"></style> |
5 changes: 5 additions & 0 deletions
5
src/components/specific/payment/subscription-info/SubscriptionInfo.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div class="subscription-info"> | ||
<img src="/static/subscription-info.svg" alt="subscription-info" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,37 @@ | ||
.paddle-payment { | ||
&__header { | ||
h1 { | ||
width: calc(100% - 84px); | ||
} | ||
button { | ||
width: 84px; | ||
} | ||
.payment { | ||
&__title { | ||
margin: 0; | ||
} | ||
|
||
&__content { | ||
display: grid; | ||
grid-template-columns: 400px 400px; | ||
gap: calc(var(--spacing-unit) * 4); | ||
.create-select-orga, | ||
.create-space { | ||
position: relative; | ||
&::after { | ||
content: ""; | ||
width: 34px; | ||
height: 34px; | ||
position: absolute; | ||
top: calc(-34px / 2); | ||
background-color: var(--color-secondary); | ||
display: inline-flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
} | ||
.create-select-orga { | ||
&::after { | ||
content: "1"; | ||
} | ||
} | ||
.create-space { | ||
&::after { | ||
content: "2"; | ||
} | ||
} | ||
& > div { | ||
background: #ffffff; | ||
box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.05); | ||
} | ||
&::v-deep(.bimdata-card) { | ||
overflow: inherit; | ||
h3 { | ||
font-size: 24px; | ||
} | ||
.bimdata-radio > span { | ||
font-size: 13px; | ||
} | ||
.bimdata-card__content { | ||
padding: 12px 70px; | ||
height: 100%; | ||
display: flex; | ||
justify-content: space-between; | ||
flex-direction: column; | ||
} | ||
} | ||
} | ||
&__payment { | ||
display: grid; | ||
grid-template-columns: 0.5fr 1fr 1.5fr 1fr 0.5fr; | ||
gap: calc(var(--spacing-unit) * 4); | ||
grid-template-areas: ". left center right ."; | ||
& > div { | ||
background: #ffffff; | ||
box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.05); | ||
} | ||
margin-top: calc(var(--spacing-unit) * 2); | ||
|
||
display: flex; | ||
justify-content: center; | ||
gap: calc(var(--spacing-unit) * 3); | ||
|
||
&__left { | ||
grid-area: left; | ||
} | ||
width: 400px; | ||
box-shadow: var(--box-shadow); | ||
background-color: var(--color-white); | ||
|
||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
padding: calc(var(--spacing-unit) * 3); | ||
} | ||
|
||
&__center { | ||
grid-area: center; | ||
width: 600px; | ||
box-shadow: var(--box-shadow); | ||
background-color: var(--color-white); | ||
} | ||
|
||
&__right { | ||
grid-area: right; | ||
width: 400px; | ||
box-shadow: var(--box-shadow); | ||
background-color: var(--color-white); | ||
} | ||
} | ||
} |
Oops, something went wrong.