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
843
Issues
843
List
Boards
Labels
Service Desk
Milestones
Merge Requests
46
Merge Requests
46
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
a9b78cd4965aa2e5cc9e787fe9be10814b3b7686...b543a03ef00005989188a02ba95e3045ed0e8799
Source
b543a03ef00005989188a02ba95e3045ed0e8799
Select Git revision
...
Target
a9b78cd4965aa2e5cc9e787fe9be10814b3b7686
Select Git revision
Compare
Commits (3)
(chore): Tweak Pro marketing error message container
· a1c5f1a3
Emiliano Balbuena
authored
1 day ago
a1c5f1a3
(chore): Hide "Become Pro" buttons
· d0dc3825
Emiliano Balbuena
authored
1 day ago
d0dc3825
(chore): Allow admins to toggle Pro for channels
· b543a03e
Emiliano Balbuena
authored
1 day ago
b543a03e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
2 deletions
+44
-2
sidebar.html
src/app/modules/channels/sidebar/sidebar.html
+12
-1
sidebar.ts
src/app/modules/channels/sidebar/sidebar.ts
+20
-0
newsfeed.component.html
src/app/modules/newsfeed/newsfeed.component.html
+3
-1
subscription.component.html
...ules/pro/channel/subscription/subscription.component.html
+1
-0
subscription.components.scss
...les/pro/channel/subscription/subscription.components.scss
+8
-0
No files found.
src/app/modules/channels/sidebar/sidebar.html
View file @
b543a03e
...
...
@@ -264,7 +264,7 @@
</div>
<a
*ngIf=
"showBecomeProButton"
*ngIf=
"
false &&
showBecomeProButton"
class=
"m-btn m-link-btn m-btn--with-icon m-btn--slim m-btn--action"
routerLink=
"/pro"
>
...
...
@@ -285,7 +285,18 @@
*ngIf=
"session.getLoggedInUser().guid == user.guid"
[object]=
"user"
></minds-button-boost>
<m-channel--badges
[user]=
"user"
></m-channel--badges>
<a
*ngIf=
"session.getLoggedInUser()?.is_admin"
(click)=
"proAdminToggle()"
>
<m-tooltip
icon=
"business_center"
[iconClass]=
"user.pro ? 'selected' : ''"
i18n
>
Pro
</m-tooltip>
</a>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/channels/sidebar/sidebar.ts
View file @
b543a03e
...
...
@@ -160,6 +160,26 @@ export class ChannelSidebar {
.
present
();
}
async
proAdminToggle
()
{
const
value
=
!
this
.
user
.
pro
;
const
method
=
value
?
'
put
'
:
'
delete
'
;
this
.
user
.
pro
=
value
;
try
{
const
response
=
(
await
this
.
client
[
method
](
`api/v2/admin/pro/
${
this
.
user
.
guid
}
`
))
as
any
;
if
(
!
response
||
response
.
status
!==
'
success
'
)
{
throw
new
Error
(
'
Invalid server response
'
);
}
}
catch
(
e
)
{
console
.
error
(
e
);
this
.
user
.
pro
=
!
value
;
}
}
get
showBecomeProButton
()
{
const
isOwner
=
this
.
session
.
isLoggedIn
()
&&
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/newsfeed/newsfeed.component.html
View file @
b543a03e
...
...
@@ -129,7 +129,9 @@
<a
class=
"m-page--sidebar--navigation--item"
routerLink=
"/pro"
*ngIf=
"session.isLoggedIn() && !session.getLoggedInUser().pro"
*ngIf=
"
false && (session.isLoggedIn() && !session.getLoggedInUser().pro)
"
>
<i
class=
"material-icons"
>
business_center
</i>
<span>
Become Pro
</span>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/subscription/subscription.component.html
View file @
b543a03e
<div
*ngIf=
"isLoggedIn"
>
<ng-container
*ngIf=
"!inProgress; else inProgressSpinner"
>
<button
[hidden]=
"true"
*ngIf=
"!active"
class=
"mdl-button mdl-button--colored mdl-color--green"
[disabled]=
"inProgress || criticalError"
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/subscription/subscription.components.scss
View file @
b543a03e
m-pro--subscription
{
.m-pro-subscription--error
{
display
:
block
;
font-weight
:
bold
;
color
:
#fff
;
margin
:
8px
0
0
5px
;
}
}
This diff is collapsed.
Click to expand it.