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
45
Merge Requests
45
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
38bbcd33
Commit
38bbcd33
authored
43 minutes ago
by
Marcelo Rivera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(feat): added tags list
parent
07925b33
epic/minds-pro
No related merge requests found
Pipeline
#75242847
failed with stages
in 13 minutes and 56 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
4 deletions
+65
-4
entities.ts
src/app/interfaces/entities.ts
+16
-1
channel.component.html
src/app/modules/pro/channel/channel.component.html
+14
-2
channel.component.scss
src/app/modules/pro/channel/channel.component.scss
+20
-0
channel.component.ts
src/app/modules/pro/channel/channel.component.ts
+15
-1
No files found.
src/app/interfaces/entities.ts
View file @
38bbcd33
...
...
@@ -38,6 +38,12 @@ export interface KeyVal {
value
:
any
;
}
export
interface
Tag
{
tag
:
string
,
label
:
string
,
selected
?:
boolean
}
export
interface
MindsUser
{
guid
:
string
;
name
:
string
;
...
...
@@ -69,7 +75,16 @@ export interface MindsUser {
tags
?:
Array
<
string
>
;
toaster_notifications
?:
boolean
;
pro
?:
boolean
;
pro_settings
?:
{
styles
?:
{
[
key
:
string
]:
string
},
[
key
:
string
]:
string
|
{
[
key
:
string
]:
string
}
};
pro_settings
?:
{
tag_list
?:
Tag
[],
background_image
:
string
,
title
:
string
,
headline
:
string
,
footer_text
:
string
,
footer_links
:
{
href
:
string
,
title
:
string
}[],
styles
?:
{
[
key
:
string
]:
string
},
};
}
export
interface
MindsGroup
{
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/channel.component.html
View file @
38bbcd33
...
...
@@ -21,7 +21,7 @@
(keyup.enter)=
"search()"
>
<ng-container
*ngIf=
"searchedText"
>
<i
class=
"material-icons clear"
(click)=
"clearSearch()"
>
close
</i>
<i
class=
"material-icons clear"
(click)=
"clearSearch()"
>
close
</i>
</ng-container>
<label
class=
"mdl-textfield__label"
for=
"search"
></label>
</div>
...
...
@@ -67,7 +67,19 @@
>
Donate
</a>
</ng-container>
<m-pro-user-menu
[channelName]=
"channel.username"
[showNavItems]=
"collapseNavItems"
[query]=
"searchedText"
></m-pro-user-menu>
<m-pro-user-menu
[channelName]=
"channel.username"
[showNavItems]=
"collapseNavItems"
[query]=
"searchedText"
></m-pro-user-menu>
</div>
<div
class=
"m-proChannel__categories"
>
<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>
<div
class=
"m-proChannel__body"
>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/channel.component.scss
View file @
38bbcd33
...
...
@@ -105,6 +105,26 @@ m-pro--channel {
font-size
:
18px
;
}
.m-proChannel__categories
{
grid-row
:
2
/
span
1
;
grid-column
:
2
/
span
10
;
display
:
flex
;
align-items
:
center
;
flex-wrap
:
wrap
;
justify-content
:
space-around
;
.m-proChannel__category
{
cursor
:
pointer
;
color
:
var
(
--
text-color
);
padding
:
0
8px
;
&
.m-proChannel__selectedCategory
{
color
:
var
(
--
primary-color
);
}
}
}
.m-proChannel__body
{
grid-row
:
3
/
span
1
;
grid-column
:
1
/
span
12
;
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/channel.component.ts
View file @
38bbcd33
...
...
@@ -11,7 +11,7 @@ import {
import
{
ActivatedRoute
,
Router
,
NavigationEnd
,
NavigationStart
}
from
"
@angular/router
"
;
import
{
Session
}
from
"
../../../services/session
"
;
import
{
Subscription
}
from
"
rxjs
"
;
import
{
MindsUser
}
from
"
../../../interfaces/entities
"
;
import
{
MindsUser
,
Tag
}
from
"
../../../interfaces/entities
"
;
import
{
Client
}
from
"
../../../services/api/client
"
;
import
{
MindsTitle
}
from
'
../../../services/ux/title
'
;
import
{
ProChannelService
}
from
'
./channel.service
'
;
...
...
@@ -44,6 +44,10 @@ export class ProChannelComponent implements OnInit, OnDestroy {
currentURL
:
string
;
query
:
string
;
selectedTag
:
Tag
=
null
;
constructor
(
protected
element
:
ElementRef
,
protected
session
:
Session
,
...
...
@@ -206,4 +210,14 @@ export class ProChannelComponent implements OnInit, OnDestroy {
get
linkTo
()
{
return
this
.
channelService
.
linkTo
.
bind
(
this
.
channelService
);
}
selectTag
(
clickedTag
:
any
)
{
this
.
selectedTag
=
clickedTag
;
for
(
let
tag
of
this
.
channel
.
pro_settings
.
tag_list
)
{
tag
.
selected
=
tag
.
tag
==
clickedTag
.
tag
;
}
this
.
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