Commit 4885b30d authored by Olivia Madrid's avatar Olivia Madrid

(feat): add subscribe button to channel dropdown, make dropdown meatballs larger

1 merge request!463[Sprint/JollyJellyfish](feat): Add subscribe button to channel dropdown
Pipeline #73230255 failed with stages
in 30 minutes and 17 seconds
......@@ -262,9 +262,14 @@ m-channel{
font-size: 28px;
margin: 0;
}
.minds-button-edit > button {
font-size:16px;
}
minds-user-dropdown > button {
font-size:24px;
}
button{
border:0;
font-size:16px;
margin-right:-26px;
}
}
......
......@@ -18,6 +18,7 @@ import { BlockListService } from "../../../../common/services/block-list.service
<ul class="minds-dropdown-menu" [hidden]="!showMenu" >
<li class="mdl-menu__item" [hidden]="user.blocked" (click)="block()" i18n="@@MINDS__BUTTONS__USER_DROPDOWN__BLOCK">Block @{{user.username}}</li>
<li class="mdl-menu__item" [hidden]="!user.blocked" (click)="unBlock()" i18n="@@MINDS__BUTTONS__USER_DROPDOWN__UNBLOCK">Un-Block @{{user.username}}</li>
<li class="mdl-menu__item" [hidden]="user.subscribed" (click)="subscribe()" i18n="@@MINDS__BUTTONS__USER_DROPDOWN__SUBSCRIBE">Subscribe</li>
<li class="mdl-menu__item" [hidden]="!user.subscribed" (click)="unSubscribe()" i18n="@@MINDS__BUTTONS__USER_DROPDOWN__UNSUBSCRIBE">Unsubscribe</li>
<li class="mdl-menu__item" *ngIf="session.isAdmin()" [hidden]="user.banned !== 'yes'" (click)="unBan()" i18n="@@MINDS__BUTTONS__USER_DROPDOWN__UNBAN_GLOBALLY">Un-ban globally</li>
<li class="mdl-menu__item"
......@@ -185,6 +186,17 @@ export class UserDropdownButton {
this.showMenu = false;
}
subscribe() {
this.user.subscribed = true;
this.client.post('api/v1/subscribe/' + this.user.guid, {})
.then((response: any) => {
this.user.subscribed = true;
})
.catch((e) => {
this.user.subscribed = false;
});
}
unSubscribe() {
this.user.subscribed = false;
this.client.delete('api/v1/subscribe/' + this.user.guid, {})
......@@ -247,7 +259,6 @@ export class UserDropdownButton {
e.stopPropagation();
if (this.showMenu) {
this.showMenu = false;
return;
}
this.showMenu = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment