Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Frontend
Project
Project
Details
Activity
Releases
Dependency List
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
842
Issues
842
List
Boards
Labels
Service Desk
Milestones
Merge Requests
46
Merge Requests
46
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
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
4885b30d
Commit
4885b30d
authored
21 hours ago
by
Olivia Madrid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(feat): add subscribe button to channel dropdown, make dropdown meatballs larger
parent
bb8e6d9b
chore/channel-dropdown-subscribe-1564
1 merge request
!463
[Sprint/JollyJellyfish](feat): Add subscribe button to channel dropdown
Pipeline
#73230255
failed with stages
in 30 minutes and 17 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
channel.component.scss
src/app/modules/channels/channel.component.scss
+6
-1
user-dropdown.ts
src/app/modules/legacy/components/buttons/user-dropdown.ts
+12
-1
No files found.
src/app/modules/channels/channel.component.scss
View file @
4885b30d
...
...
@@ -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
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/legacy/components/buttons/user-dropdown.ts
View file @
4885b30d
...
...
@@ -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
;
...
...
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