...
 
Commits (2)
<ng-container *ngIf="error || channel; else loader">
<ng-container
*ngIf="
error || !proEnabled || !channel.pro_published || isOwner || isAdmin;
error ||
!proEnabled ||
!showPro ||
!channel.pro_published ||
isOwner ||
isAdmin;
else isProChannel
"
>
......
......@@ -28,6 +28,7 @@ export class ChannelContainerComponent implements OnInit, OnDestroy {
channel: MindsUser;
protected username: string;
protected showPro: boolean;
protected param$: Subscription;
......@@ -50,10 +51,11 @@ export class ChannelContainerComponent implements OnInit, OnDestroy {
this.param$ = this.route.params.subscribe(params => {
if (params['username']) {
this.username = params['username'];
this.showPro = !params['pro'] || params['pro'] !== '0';
if (
this.username &&
(!this.channel || this.channel.username != this.username)
(!this.channel || this.channel.username !== this.username)
) {
this.load();
}
......@@ -74,7 +76,7 @@ export class ChannelContainerComponent implements OnInit, OnDestroy {
}
async load() {
if (!this.username) {
if (!this.username || this.showPro === undefined) {
return;
}
......@@ -88,6 +90,7 @@ export class ChannelContainerComponent implements OnInit, OnDestroy {
this.channel = response.channel;
const shouldRedirectToProHandler =
this.showPro &&
!this.site.isProDomain &&
this.channel.pro_published &&
!this.isOwner &&
......
......@@ -37,6 +37,12 @@
</div>
<div class="m-proChannelFooter__items m-proChannelFooter__socialItems">
<a [routerLink]="['/' + user.username + '/feed', { pro: '0' }]">
<img
alt="Minds"
src="https://cdn-assets.minds.com/front/dist/en/assets/logos/bulb.svg"
/>
</a>
<span *ngFor="let profile of footerSocialProfiles">
<a
*ngIf="profile.key && profile.value"
......
......@@ -3,10 +3,17 @@
margin-bottom: 24px;
color: var(--m-pro--text-color);
.m-proChannelFooter__items > * {
display: inline-block;
margin: 8px 16px;
vertical-align: middle;
.m-proChannelFooter__items {
> * {
display: inline-block;
margin: 8px 16px;
vertical-align: middle;
}
img {
height: 24px;
filter: grayscale(100%);
}
}
.m-proChannelFooter__socialItems {
......@@ -14,9 +21,13 @@
font-size: 1.5em;
}
.m-proChannelFooter__text {
text-transform: uppercase;
letter-spacing: 0.1em;
.m-proChannelFooter__static {
margin-bottom: 16px;
.m-proChannelFooter__text {
text-transform: uppercase;
letter-spacing: 0.1em;
}
}
a {
......