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
869
Issues
869
List
Boards
Labels
Service Desk
Milestones
Merge Requests
44
Merge Requests
44
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
Compare Revisions
03fa7147be3255500acf5eedb29d1a5d38e66330...829204c85d045345587b89574d328be000b1cfec
Source
829204c85d045345587b89574d328be000b1cfec
Select Git revision
...
Target
03fa7147be3255500acf5eedb29d1a5d38e66330
Select Git revision
Compare
Commits (2)
(wip): Pro payments
· 32fe4509
Emiliano Balbuena
authored
22 hours ago
32fe4509
(refactor): Support for theme-specific rules; (chore): /pro dark
· 829204c8
Emiliano Balbuena
authored
10 minutes ago
829204c8
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
83 additions
and
29 deletions
+83
-29
src/app/common/components/marketing/footer.component.scss
src/app/common/components/marketing/footer.component.scss
+1
-1
src/app/common/components/marketing/marketing-styles.scss
src/app/common/components/marketing/marketing-styles.scss
+21
-6
src/app/foundation/buttons.scss
src/app/foundation/buttons.scss
+8
-0
src/app/modules/pro/pro.module.ts
src/app/modules/pro/pro.module.ts
+1
-1
src/app/modules/pro/pro.service.ts
src/app/modules/pro/pro.service.ts
+0
-6
src/app/modules/pro/subscription/subscription.component.html
src/app/modules/pro/subscription/subscription.component.html
+2
-2
src/app/modules/pro/subscription/subscription.component.ts
src/app/modules/pro/subscription/subscription.component.ts
+27
-7
src/app/modules/pro/subscription/subscription.components.scss
...app/modules/pro/subscription/subscription.components.scss
+0
-0
src/stylesheets/themes.scss
src/stylesheets/themes.scss
+22
-6
src/typings/minds.d.ts
src/typings/minds.d.ts
+1
-0
No files found.
src/app/common/components/marketing/footer.component.scss
View file @
829204c8
...
...
@@ -11,7 +11,7 @@ m-marketing__footer {
@include
m-theme
()
{
background
:
linear-gradient
(
180deg
,
themed
(
$m-bg-gradient-start
)
0%
,
themed
(
$m-
marketing-
bg-gradient-start
)
0%
,
themed
(
$m-white
)
100%
);
}
...
...
This diff is collapsed.
Click to expand it.
src/app/common/components/marketing/marketing-styles.scss
View file @
829204c8
...
...
@@ -102,7 +102,7 @@
background
:
linear-gradient
(
180deg
,
themed
(
$m-white
)
0%
,
themed
(
$m-bg-gradient-start
)
100%
themed
(
$m-
marketing-
bg-gradient-start
)
100%
);
}
...
...
@@ -151,13 +151,16 @@
left
:
0
;
transform
:
translate
(
-86px
,
-56px
);
clip-path
:
polygon
(
0%
0%
,
0%
100%
,
100%
92%
,
100%
0%
);
background
:
linear-gradient
(
180deg
,
#f6eded
0%
,
#f5f5fe
99
.99%
);
// TODO: Theme
z-index
:
-1
;
@include
m-theme
()
{
background
:
linear-gradient
(
180deg
,
themed
(
$m-marketing-bg-colored-gradient-start
)
0%
,
themed
(
$m-marketing-bg-colored-gradient-end
)
99
.99%
);
}
@media
screen
and
(
max-width
:
$m-grid-min-vp
)
{
right
:
0
;
bottom
:
-3vw
;
...
...
@@ -167,6 +170,10 @@
}
h1
{
@include
m-on-theme
(
dark
)
{
color
:
#ffffff
;
}
@media
screen
and
(
max-width
:
$m-grid-min-vp
)
{
margin
:
15px
0
15px
;
text-align
:
center
;
...
...
@@ -174,6 +181,10 @@
}
h2
{
@include
m-on-theme
(
dark
)
{
color
:
#ffffff
;
}
@media
screen
and
(
max-width
:
$m-grid-min-vp
)
{
font-size
:
28px
;
line-height
:
32px
;
...
...
@@ -191,6 +202,10 @@
color
:
themed
(
$m-grey-300
);
}
@include
m-on-theme
(
dark
)
{
color
:
#ffffff
;
}
@media
screen
and
(
max-width
:
$m-grid-min-vp
)
{
padding-right
:
0
;
margin-bottom
:
30px
;
...
...
This diff is collapsed.
Click to expand it.
src/app/foundation/buttons.scss
View file @
829204c8
...
...
@@ -23,6 +23,14 @@
border-color
:
themed
(
$m-blue
);
}
&
.mf-button--alt
{
@include
m-theme
()
{
background
:
themed
(
$m-aqua
);
border-color
:
themed
(
$m-aqua
);
color
:
themed
(
$m-white-always
);
}
}
@media
screen
and
(
max-width
:
$m-grid-min-vp
)
{
display
:
block
;
font-size
:
15px
;
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/pro.module.ts
View file @
829204c8
...
...
@@ -5,7 +5,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import
{
CommonModule
}
from
'
../../common/common.module
'
;
import
{
ProService
}
from
'
./pro.service
'
;
import
{
ProMarketingComponent
}
from
'
./marketing.component
'
;
import
{
ProSubscriptionComponent
}
from
'
./
channel/
subscription/subscription.component
'
;
import
{
ProSubscriptionComponent
}
from
'
./subscription/subscription.component
'
;
import
{
ProChannelComponent
}
from
'
./channel/channel.component
'
;
import
{
ProChannelLoginComponent
}
from
'
./channel/login/login.component
'
;
import
{
MindsFormsModule
}
from
'
../forms/forms.module
'
;
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/pro.service.ts
View file @
829204c8
...
...
@@ -17,12 +17,6 @@ export class ProService {
return
Boolean
(
result
.
isActive
);
}
async
enable
():
Promise
<
boolean
>
{
// TODO: Payments
await
this
.
client
.
post
(
'
api/v2/pro
'
);
return
true
;
}
async
disable
():
Promise
<
boolean
>
{
await
this
.
client
.
delete
(
'
api/v2/pro
'
);
return
true
;
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/
channel/
subscription/subscription.component.html
→
src/app/modules/pro/subscription/subscription.component.html
View file @
829204c8
...
...
@@ -2,11 +2,11 @@
<ng-container
*ngIf=
"!inProgress; else inProgressSpinner"
>
<button
*ngIf=
"!active"
class=
"m
dl-button mdl-button--colored mdl-color--green
"
class=
"m
f-button mf-button--alt
"
[disabled]=
"inProgress || criticalError"
(click)=
"enable()"
>
Become
Pro
Upgrade to
Pro
</button>
<button
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/
channel/
subscription/subscription.component.ts
→
src/app/modules/pro/subscription/subscription.component.ts
View file @
829204c8
...
...
@@ -6,8 +6,11 @@ import {
OnInit
,
Output
,
}
from
'
@angular/core
'
;
import
{
Session
}
from
'
../../../../services/session
'
;
import
{
ProService
}
from
'
../../pro.service
'
;
import
{
Session
}
from
'
../../../services/session
'
;
import
{
ProService
}
from
'
../pro.service
'
;
import
{
WireCreatorComponent
}
from
'
../../wire/creator/creator.component
'
;
import
{
OverlayModalService
}
from
'
../../../services/ux/overlay-modal
'
;
import
{
EntitiesService
}
from
'
../../../common/services/entities.service
'
;
@
Component
({
selector
:
'
m-pro--subscription
'
,
...
...
@@ -34,6 +37,8 @@ export class ProSubscriptionComponent implements OnInit {
constructor
(
protected
service
:
ProService
,
protected
session
:
Session
,
protected
overlayModal
:
OverlayModalService
,
protected
entities
:
EntitiesService
,
protected
cd
:
ChangeDetectorRef
)
{}
...
...
@@ -67,17 +72,32 @@ export class ProSubscriptionComponent implements OnInit {
this
.
detectChanges
();
try
{
await
this
.
service
.
enable
();
this
.
active
=
true
;
this
.
minds
.
user
.
pro
=
true
;
this
.
onEnable
.
emit
(
Date
.
now
());
const
proHandler
=
((
await
this
.
entities
.
setCastToActivities
(
false
)
.
fetch
([
`urn:user:
${
this
.
minds
.
handlers
.
pro
}
`
]))
as
any
).
entities
[
0
];
this
.
overlayModal
.
create
(
WireCreatorComponent
,
proHandler
,
{
onComplete
:
()
=>
{
this
.
active
=
true
;
this
.
minds
.
user
.
pro
=
true
;
this
.
onEnable
.
emit
(
Date
.
now
());
this
.
inProgress
=
false
;
this
.
detectChanges
();
},
})
.
onDidDismiss
(()
=>
{
this
.
inProgress
=
false
;
this
.
detectChanges
();
})
.
present
();
}
catch
(
e
)
{
this
.
active
=
false
;
this
.
minds
.
user
.
pro
=
false
;
this
.
error
=
(
e
&&
e
.
message
)
||
'
Unknown error
'
;
this
.
inProgress
=
false
;
}
this
.
inProgress
=
false
;
this
.
detectChanges
();
}
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/
channel/
subscription/subscription.components.scss
→
src/app/modules/pro/subscription/subscription.components.scss
View file @
829204c8
File moved
This diff is collapsed.
Click to expand it.
src/stylesheets/themes.scss
View file @
829204c8
// General rules for themes
@mixin
m-on-theme
(
$theme
)
{
body
.m-theme__
#{
$theme
}
&
,
body
.m-theme--wrapper.m-theme--wrapper__
#{
$theme
}
&
{
@content
;
}
}
// Create css selectors for themes
// Colors change when .theme__light/.theme__dark classes are toggled on body tag
@mixin
m-theme
()
{
@each
$theme
,
$colors
in
$themes
{
body
.m-theme__
#{
$theme
}
&
,
body
.m-theme--wrapper.m-theme--wrapper__
#{
$theme
}
&
{
@include
m-on-theme
(
$theme
)
{
$theme-map
:
()
!
global
;
@each
$color-name
,
$color
in
$colors
{
$value
:
map-get
(
map-get
(
$themes
,
$theme
)
,
'
#{
$color-name
}
'
);
...
...
@@ -60,6 +67,7 @@ $blue-light: #71aae7;
$green-dark
:
#388e3c
;
$green
:
#4caf50
;
$green-light
:
#8bc34a
;
$aqua
:
#4fc3a9
;
$amber-dark
:
#ffa000
;
$amber
:
#ffc108
;
$amber-light
:
#ffecb3
;
...
...
@@ -107,6 +115,7 @@ $themes: (
m-blue-dark
:
$blue-dark
,
m-blue
:
$blue
,
m-blue-light
:
$blue-light
,
m-aqua
:
$aqua
,
m-green-dark
:
$green-dark
,
m-green
:
$green
,
m-green-light
:
$green-light
,
...
...
@@ -121,7 +130,9 @@ $themes: (
m-white
:
$white
,
m-white-always
:
$white
,
m-body-bg
:
#f8f8f8
,
m-bg-gradient-start
:
#f9fafc
,
m-marketing-bg-gradient-start
:
#f9fafc
,
m-marketing-bg-colored-gradient-start
:
#f6eded
,
m-marketing-bg-colored-gradient-end
:
#f5f5fe
,
m-warn-bg
:
$amber-light
,
m-warn-fg
:
$black
,
m-facebook
:
$facebook
,
...
...
@@ -160,10 +171,13 @@ $themes: (
m-white
:
lighten
(
$grey-990
,
$percent
)
,
m-white-always
:
$white
,
m-body-bg
:
lighten
(
#080808
,
$percent
)
,
m-bg-gradient-start
:
#292827
,
m-marketing-bg-gradient-start
:
#292827
,
m-marketing-bg-colored-gradient-start
:
#4e5965
,
m-marketing-bg-colored-gradient-end
:
#58565c
,
m-blue-dark
:
lighten
(
$blue-bright
,
15%
)
,
m-blue
:
$blue-bright
,
m-blue-light
:
$blue-dark
,
m-aqua
:
$aqua
,
m-green-dark
:
lighten
(
$green-dark
,
$percent
)
,
m-green
:
lighten
(
$green
,
$percent
)
,
m-green-light
:
lighten
(
$green-light
,
$percent
)
,
...
...
@@ -217,11 +231,13 @@ $m-black-always: 'm-black-always';
$m-white
:
'm-white'
;
$m-white-always
:
'm-white-always'
;
$m-body-bg
:
'm-body-bg'
;
$m-bg-gradient-start
:
'm-bg-gradient-start'
;
$m-marketing-bg-gradient-start
:
'm-marketing-bg-gradient-start'
;
$m-marketing-bg-colored-gradient-start
:
'm-marketing-bg-colored-gradient-start'
;
$m-marketing-bg-colored-gradient-end
:
'm-marketing-bg-colored-gradient-end'
;
$m-blue-dark
:
'm-blue-dark'
;
$m-blue
:
'm-blue'
;
$m-blue-light
:
'm-blue-light'
;
$m-aqua
:
'm-aqua'
;
$m-green-dark
:
'm-green-dark'
;
$m-green
:
'm-green'
;
$m-green-light
:
'm-green-light'
;
...
...
This diff is collapsed.
Click to expand it.
src/typings/minds.d.ts
View file @
829204c8
...
...
@@ -27,6 +27,7 @@ interface Minds {
last_tos_update
:
number
;
tags
:
string
[];
pro
?:
any
;
handlers
?:
{
pro
:
string
;
plus
:
string
};
}
interface
MindsNavigation
{
...
...
This diff is collapsed.
Click to expand it.