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
867
Issues
867
List
Boards
Labels
Service Desk
Milestones
Merge Requests
54
Merge Requests
54
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
e1c35377
Commit
e1c35377
authored
5 minutes ago
by
Marcelo Rivera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(feat): generic hashtags comp
parent
738fa536
epic/minds-pro
1 merge request
!486
WIP: (feat): Minds Pro (development branch) - Release 2
Pipeline
#76195854
running with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
0 deletions
+75
-0
categories.component.scss
.../modules/pro/channel/categories/categories.component.scss
+18
-0
categories.component.ts
...pp/modules/pro/channel/categories/categories.component.ts
+57
-0
No files found.
src/app/modules/pro/channel/categories/categories.component.scss
0 → 100644
View file @
e1c35377
m-pro--channel--categories
{
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
flex-end
;
.m-proChannel__category
{
cursor
:
pointer
;
color
:
var
(
--
text-color
);
padding
:
16px
16px
0
;
text-transform
:
uppercase
;
letter-spacing
:
0
.1em
;
&
.m-proChannel__selectedCategory
{
color
:
var
(
--
primary-color
);
}
}
}
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/categories/categories.component.ts
0 → 100644
View file @
e1c35377
import
{
ChangeDetectionStrategy
,
ChangeDetectorRef
,
Component
,
Input
,
OnInit
}
from
'
@angular/core
'
;
import
{
ProChannelService
}
from
"
../channel.service
"
;
import
{
Router
}
from
"
@angular/router
"
;
@
Component
({
selector
:
'
m-pro--channel--categories
'
,
template
:
`
<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>
`
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
,
})
export
class
ProCategoriesComponent
implements
OnInit
{
@
Input
()
type
:
string
;
@
Input
()
params
:
any
=
{};
get
channel
()
{
return
this
.
channelService
.
currentChannel
;
}
get
currentURL
()
{
return
`pro/
${
this
.
channel
.
username
}
/
${
this
.
type
}
`
}
constructor
(
protected
channelService
:
ProChannelService
,
protected
router
:
Router
,
protected
cd
:
ChangeDetectorRef
,
)
{
}
ngOnInit
()
{
}
selectTag
(
clickedTag
:
any
)
{
for
(
let
tag
of
this
.
channel
.
pro_settings
.
tag_list
)
{
tag
.
selected
=
tag
.
tag
==
clickedTag
.
tag
;
}
this
.
router
.
navigate
([
this
.
currentURL
,
{
...
this
.
params
,
hashtag
:
clickedTag
.
tag
}]);
this
.
detectChanges
();
}
detectChanges
()
{
this
.
cd
.
markForCheck
();
this
.
cd
.
detectChanges
();
}
}
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