Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
879
Issues
879
List
Boards
Labels
Service Desk
Milestones
Merge Requests
45
Merge Requests
45
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
7f7e1490
Commit
7f7e1490
authored
58 minutes ago
by
Emiliano Balbuena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(chore): Use pricing matrix on subscription components
parent
14be398f
epic/upgrades-page
1 merge request
!578
WIP: Marketing pages
Pipeline
#88081680
passed with stages
in 46 minutes and 58 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
14 deletions
+18
-14
src/app/modules/plus/subscription.component.html
src/app/modules/plus/subscription.component.html
+11
-11
src/app/modules/plus/subscription.component.ts
src/app/modules/plus/subscription.component.ts
+4
-3
src/app/modules/pro/subscription/subscription.component.ts
src/app/modules/pro/subscription/subscription.component.ts
+3
-0
No files found.
src/app/modules/plus/subscription.component.html
View file @
7f7e1490
<button
class=
"mdl-button mdl-button--colored mdl-color--green"
*ngIf=
"user && !isPlus()"
(click)=
"purchase(
20, 'month'
)"
(click)=
"purchase()"
[hidden]=
"active"
>
Upgrade - 20 Tokens/month
</button>
<button
class=
"mdl-button mdl-button--colored mdl-color--green"
*ngIf=
"user && !isPlus() && false"
(click)=
"purchase(200, 'year')"
[hidden]=
"active"
>
Upgrade - 200 Tokens/year
Upgrade - {{ minds.upgrades.plus['monthly']['tokens'] }} Tokens/month
</button>
<!--<button-->
<!-- class="mdl-button mdl-button--colored mdl-color--green"-->
<!-- *ngIf="user && !isPlus() && false"-->
<!-- (click)="purchase(200, 'year')"-->
<!-- [hidden]="active"-->
<!-->-->
<!-- Upgrade - 200 Tokens/year-->
<!--</button>-->
<button
class=
"mdl-button mdl-button--colored mdl-color--green"
*ngIf=
"user && isPlus()"
...
...
@@ -27,7 +27,7 @@
*ngIf=
"!user"
routerLink=
"/login"
>
Upgrade -
200 Tokens/year
Upgrade -
{{ minds.upgrades.plus['monthly']['tokens'] }} Tokens/month
</button>
<div
class=
"m-plus--subscription mdl-card mdl-shadow--4dp"
*ngIf=
"active"
>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/plus/subscription.component.ts
View file @
7f7e1490
...
...
@@ -33,7 +33,6 @@ export class PlusSubscriptionComponent {
active
:
boolean
=
false
;
@
Output
(
'
completed
'
)
completed$
:
EventEmitter
<
any
>
=
new
EventEmitter
();
@
Input
(
'
showSubscription
'
)
showSubscription
:
boolean
;
payment
:
any
=
{};
payload
:
any
;
minds
=
window
.
Minds
;
...
...
@@ -71,7 +70,7 @@ export class PlusSubscriptionComponent {
this
.
purchase
();
}
async
purchase
(
amount
:
number
=
20
,
period
:
'
month
'
|
'
year
'
=
'
month
'
)
{
async
purchase
(
/*amount: number = 20, period: 'month' | 'year' = 'month'*/
)
{
if
(
!
this
.
session
.
isLoggedIn
())
{
this
.
modal
.
open
();
return
;
...
...
@@ -81,7 +80,9 @@ export class PlusSubscriptionComponent {
WirePaymentsCreatorComponent
,
await
this
.
wirePaymentHandlers
.
get
(
'
plus
'
),
{
default
:
this
.
payment
,
interval
:
'
monthly
'
,
currency
:
'
tokens
'
,
amount
:
this
.
minds
.
upgrades
.
plus
[
'
monthly
'
][
'
tokens
'
],
onComplete
:
wire
=>
{
this
.
completed
=
true
;
this
.
user
.
plus
=
true
;
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/subscription/subscription.component.ts
View file @
7f7e1490
...
...
@@ -86,6 +86,9 @@ export class ProSubscriptionComponent implements OnInit {
WirePaymentsCreatorComponent
,
await
this
.
wirePaymentHandlers
.
get
(
'
pro
'
),
{
interval
:
this
.
interval
,
currency
:
this
.
currency
,
amount
:
this
.
minds
.
upgrades
.
pro
[
this
.
interval
][
this
.
currency
],
onComplete
:
()
=>
{
this
.
active
=
true
;
this
.
minds
.
user
.
pro
=
true
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment