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
825
Issues
825
List
Boards
Labels
Service Desk
Milestones
Merge Requests
43
Merge Requests
43
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
b53d53a9
Commit
b53d53a9
authored
1 hour ago
by
Emiliano Balbuena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(chore): Enable feature flag for Pro
parent
e3594ffc
epic/minds-pro
1 merge request
!528
WIP: (feat): Minds Pro
Pipeline
#82512560
failed with stages
in 4 minutes and 48 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
24 deletions
+37
-24
channel-container.component.html
...odules/channel-container/channel-container.component.html
+3
-1
channel-container.component.ts
.../modules/channel-container/channel-container.component.ts
+14
-5
sidebar.html
src/app/modules/channels/sidebar/sidebar.html
+10
-8
newsfeed.component.html
src/app/modules/newsfeed/newsfeed.component.html
+10
-10
No files found.
src/app/modules/channel-container/channel-container.component.html
View file @
b53d53a9
<ng-container
*ngIf=
"channel; else loader"
>
<ng-container
*ngIf=
"!channel.pro || isOwner || isAdmin; else isProChannel"
>
<ng-container
*ngIf=
"!proEnabled || !channel.pro || isOwner || isAdmin; else isProChannel"
>
<m-channel
#channelComponent
></m-channel>
</ng-container>
<ng-template
#isProChannel
>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/channel-container/channel-container.component.ts
View file @
b53d53a9
...
...
@@ -14,6 +14,7 @@ import { ChannelComponent } from '../channels/channel.component';
import
{
ProChannelComponent
}
from
'
../pro/channel/channel.component
'
;
import
{
Session
}
from
'
../../services/session
'
;
import
{
SiteService
}
from
'
../../services/site.service
'
;
import
{
FeaturesService
}
from
'
../../services/features.service
'
;
@
Component
({
selector
:
'
m-channel-container
'
,
...
...
@@ -40,7 +41,8 @@ export class ChannelContainerComponent implements OnInit, OnDestroy {
protected
router
:
Router
,
protected
client
:
Client
,
protected
session
:
Session
,
protected
site
:
SiteService
protected
site
:
SiteService
,
protected
features
:
FeaturesService
)
{}
ngOnInit
():
void
{
...
...
@@ -81,15 +83,18 @@ export class ChannelContainerComponent implements OnInit, OnDestroy {
const
response
:
MindsChannelResponse
=
(
await
this
.
client
.
get
(
`api/v1/channel/
${
this
.
username
}
`
))
as
MindsChannelResponse
;
this
.
channel
=
response
.
channel
;
// NOTE: Temporary workaround until channel component supports children routes
if
(
const
shouldRedirectToProHandler
=
!
this
.
site
.
isProDomain
&&
this
.
channel
.
pro
&&
!
this
.
isOwner
&&
!
this
.
isAdmin
)
{
!
this
.
isAdmin
&&
this
.
proEnabled
;
// NOTE: Temporary workaround until channel component supports children routes
if
(
shouldRedirectToProHandler
)
{
this
.
router
.
navigate
([
'
/pro
'
,
this
.
channel
.
username
],
{
replaceUrl
:
true
,
});
...
...
@@ -109,4 +114,8 @@ export class ChannelContainerComponent implements OnInit, OnDestroy {
get
isAdmin
()
{
return
this
.
site
.
isAdmin
;
}
get
proEnabled
()
{
return
this
.
features
.
has
(
'
pro
'
);
}
}
This diff is collapsed.
Click to expand it.
src/app/modules/channels/sidebar/sidebar.html
View file @
b53d53a9
...
...
@@ -263,14 +263,16 @@
</button>
</div>
<a
*ngIf=
"false && showBecomeProButton"
class=
"m-btn m-link-btn m-btn--with-icon m-btn--slim m-btn--action"
routerLink=
"/pro"
>
<i
class=
"material-icons"
>
business_center
</i>
<span
i18n
>
Become Pro
</span>
</a>
<ng-container
*mIfFeature=
"'pro'"
>
<a
*ngIf=
"showBecomeProButton"
class=
"m-btn m-link-btn m-btn--with-icon m-btn--slim m-btn--action"
routerLink=
"/pro"
>
<i
class=
"material-icons"
>
business_center
</i>
<span
i18n
>
Become Pro
</span>
</a>
</ng-container>
<a
*ngIf=
"showProSettings"
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/newsfeed/newsfeed.component.html
View file @
b53d53a9
...
...
@@ -126,16 +126,16 @@
<span>
Upgrade to Plus
</span>
</a>
<
a
class=
"m-page--sidebar--navigation--item"
routerLink=
"/pro
"
*ngIf=
"
false && (session.isLoggedIn() && !session.getLoggedInUser().pro)
"
>
<i
class=
"material-icons"
>
business_center
</i
>
<
span>
Become Pro
</span
>
</
a
>
<
ng-container
*mIfFeature=
"'pro'"
>
<a
class=
"m-page--sidebar--navigation--item
"
routerLink=
"/pro
"
*ngIf=
"session.isLoggedIn() && !session.getLoggedInUser().pro"
>
<i
class=
"material-icons"
>
business_center
</i
>
<span>
Become Pro
</span
>
<
/a
>
</
ng-container
>
<a
class=
"m-page--sidebar--navigation--item"
...
...
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