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
864
Issues
864
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
e601de33
Commit
e601de33
authored
1 hour ago
by
Marcelo Rivera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(feat): only show categories underneath navbar if we're on a list view
parent
d51cd653
epic/minds-pro
1 merge request
!486
WIP: (feat): Minds Pro (development branch) - Release 2
Pipeline
#75284654
failed with stages
in 14 minutes and 2 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
channel.component.html
src/app/modules/pro/channel/channel.component.html
+1
-2
channel.component.ts
src/app/modules/pro/channel/channel.component.ts
+13
-0
pro-user-menu.component.html
...es/pro/channel/pro-user-menu/pro-user-menu.component.html
+2
-2
No files found.
src/app/modules/pro/channel/channel.component.html
View file @
e601de33
...
...
@@ -31,7 +31,6 @@
<a
class=
"m-proChannelTopbar__navItem"
[routerLink]=
"['/pro', channel.username, 'feed']"
[queryParams]=
"{algorithm: 'pro'}"
routerLinkActive=
"active"
i18n
>
Feed
</a>
...
...
@@ -113,7 +112,7 @@
<div
class=
"minds-bg-overlay"
(click)=
"closeMenu()"
[hidden]=
"!isMenuOpen"
></div>
</div>
<div
class=
"m-proChannel__categories"
>
<div
class=
"m-proChannel__categories"
*ngIf=
"showCategories"
>
<div
class=
"m-proChannel__category"
[class.m-proChannel__selectedCategory]=
"!!tag.selected"
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/channel.component.ts
View file @
e601de33
...
...
@@ -48,6 +48,8 @@ export class ProChannelComponent implements OnInit, OnDestroy {
isMenuOpen
:
boolean
=
false
;
showCategories
:
boolean
=
true
;
constructor
(
protected
element
:
ElementRef
,
protected
session
:
Session
,
...
...
@@ -65,6 +67,11 @@ export class ProChannelComponent implements OnInit, OnDestroy {
this
.
onResize
();
}
shouldShowCategories
(
type
:
string
)
{
const
routes
=
[
'
images
'
,
'
videos
'
,
'
articles
'
,
'
feed
'
,
'
groups
'
];
this
.
showCategories
=
routes
.
indexOf
(
type
)
!==
-
1
;
}
listen
()
{
this
.
routerSubscription
=
this
.
router
.
events
.
subscribe
((
navigationEvent
)
=>
{
try
{
...
...
@@ -74,6 +81,8 @@ export class ProChannelComponent implements OnInit, OnDestroy {
}
this
.
currentURL
=
navigationEvent
.
urlAfterRedirects
;
const
type
=
this
.
currentURL
.
split
(
'
/
'
);
this
.
shouldShowCategories
(
type
[
type
.
length
-
1
]);
this
.
setTitle
();
}
}
catch
(
e
)
{
...
...
@@ -86,6 +95,10 @@ export class ProChannelComponent implements OnInit, OnDestroy {
this
.
username
=
params
[
'
username
'
];
}
if
(
this
.
route
.
children
.
length
>
0
)
{
this
.
shouldShowCategories
(
this
.
route
.
children
[
0
].
snapshot
.
params
.
type
);
}
if
(
this
.
username
&&
(
!
this
.
channel
||
this
.
channel
.
username
!=
this
.
username
))
{
this
.
load
();
}
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/pro-user-menu/pro-user-menu.component.html
View file @
e601de33
...
...
@@ -2,12 +2,12 @@
<a
class=
"m-pro-user-menu__Anchor"
(click)=
"toggleMenu()"
><i
class=
"material-icons"
>
menu
</i></a>
<ul
class=
"m-dropdown__list m-pro-user-menu__dropdown mdl-shadow--3dp"
[hidden]=
"!isOpen"
>
<!--
<li
<li
class=
"m-dropdownList__item m-pro-user-menuDropdown__item"
(click)=
"closeMenu()"
>
<a
[routerLink]=
"['/pro', channel.username, 'feed']"
routerLinkActive=
"active"
i18n
>
Feed
</a>
</li>
-->
</li>
<li
class=
"m-dropdownList__item m-pro-user-menuDropdown__item"
...
...
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