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
872
Issues
872
List
Boards
Labels
Service Desk
Milestones
Merge Requests
55
Merge Requests
55
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
653b8976
Commit
653b8976
authored
2 hours ago
by
Marcelo Rivera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fix): a couple of fixes regarding categories component
parent
e1c35377
epic/minds-pro
1 merge request
!486
WIP: (feat): Minds Pro (development branch) - Release 2
Pipeline
#76205540
passed with stages
in 27 minutes and 48 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
15 deletions
+12
-15
categories.component.ts
...pp/modules/pro/channel/categories/categories.component.ts
+3
-2
channel.component.html
src/app/modules/pro/channel/channel.component.html
+1
-11
channel.component.ts
src/app/modules/pro/channel/channel.component.ts
+8
-2
No files found.
src/app/modules/pro/channel/categories/categories.component.ts
View file @
653b8976
import
{
ChangeDetectionStrategy
,
ChangeDetectorRef
,
Component
,
Input
,
OnInit
}
from
'
@angular/core
'
;
import
{
ProChannelService
}
from
"
../channel.service
"
;
import
{
Router
}
from
"
@angular/router
"
;
import
{
MindsUser
}
from
"
../../../../interfaces/entities
"
;
@
Component
({
selector
:
'
m-pro--channel--categories
'
,
...
...
@@ -22,11 +23,11 @@ export class ProCategoriesComponent implements OnInit {
@
Input
()
type
:
string
;
@
Input
()
params
:
any
=
{};
get
channel
()
{
get
channel
()
:
MindsUser
{
return
this
.
channelService
.
currentChannel
;
}
get
currentURL
()
{
get
currentURL
()
:
string
{
return
`pro/
${
this
.
channel
.
username
}
/
${
this
.
type
}
`
}
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/channel.component.html
View file @
653b8976
...
...
@@ -123,17 +123,7 @@
<div
class=
"minds-bg-overlay"
(click)=
"closeMenu()"
[hidden]=
"!isMenuOpen"
></div>
</div>
<m-pro--channel--categories
*ngIf=
"showCategories"
></m-pro--channel--categories>
<div
class=
"m-proChannel__categories"
*ngIf=
"showCategories"
>
<div
class=
"m-proChannel__category"
[class.m-proChannel__selectedCategory]=
"!!tag.selected"
(click)=
"selectTag(tag)"
*ngFor=
"let tag of channel.pro_settings.tag_list"
>
{{tag.label}}
</div>
</div>
<m-pro--channel--categories
[type]=
"type"
*ngIf=
"showCategories"
></m-pro--channel--categories>
<div
class=
"m-proChannel__body"
>
<router-outlet></router-outlet>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/channel.component.ts
View file @
653b8976
...
...
@@ -60,6 +60,8 @@ export class ProChannelComponent implements OnInit, OnDestroy {
subscribers_count
:
number
;
type
:
string
=
'
articles
'
;
constructor
(
protected
element
:
ElementRef
,
protected
session
:
Session
,
...
...
@@ -84,6 +86,10 @@ export class ProChannelComponent implements OnInit, OnDestroy {
const
routes
=
[
'
images
'
,
'
videos
'
,
'
articles
'
,
'
feed
'
,
'
communities
'
];
this
.
showCategories
=
routes
.
indexOf
(
type
)
!==
-
1
;
if
(
this
.
showCategories
)
{
this
.
type
=
type
;
}
this
.
detectChanges
();
}
...
...
@@ -116,7 +122,7 @@ export class ProChannelComponent implements OnInit, OnDestroy {
this
.
childParams$
=
this
.
channelService
.
childParamsChange
.
subscribe
((
params
)
=>
{
this
.
shouldShowCategories
(
params
.
type
);
});
this
.
channelSubscription$
=
this
.
channelService
.
subscriptionChange
.
subscribe
((
subscribers_count
)
=>
{
this
.
subscribers_count
=
subscribers_count
;
this
.
load
();
...
...
@@ -178,7 +184,7 @@ export class ProChannelComponent implements OnInit, OnDestroy {
this
.
channelService
.
subscribe
();
}
unsubscribe
(
e
){
unsubscribe
(
e
)
{
this
.
modalService
.
create
(
ProUnsubscribeModalComponent
,
this
.
channel
,
{
...
...
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