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
865
Issues
865
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
Compare Revisions
c4249f31ac9b0cc8ce219e6c28fb6df86c45a07a...3d87b567e6503e4ec121d5acfa7dad08617a0592
Source
3d87b567e6503e4ec121d5acfa7dad08617a0592
Select Git revision
...
Target
c4249f31ac9b0cc8ce219e6c28fb6df86c45a07a
Select Git revision
Compare
Commits (2)
(feat): click behaviour for list modal
· 7100b349
Marcelo Rivera
authored
4 hours ago
7100b349
(feat): style see more modal
· 3d87b567
Marcelo Rivera
authored
4 hours ago
3d87b567
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
12 deletions
+43
-12
channel.component.ts
src/app/modules/pro/channel/channel.component.ts
+8
-6
list-modal.component.scss
.../modules/pro/channel/list-modal/list-modal.component.scss
+14
-0
list-modal.component.ts
...pp/modules/pro/channel/list-modal/list-modal.component.ts
+13
-5
list.component.ts
src/app/modules/pro/channel/list/list.component.ts
+8
-1
No files found.
src/app/modules/pro/channel/channel.component.ts
View file @
3d87b567
...
...
@@ -7,7 +7,7 @@ import {
OnDestroy
,
OnInit
}
from
'
@angular/core
'
;
import
{
ActivatedRoute
,
Router
,
NavigationEnd
,
NavigationStart
}
from
"
@angular/router
"
;
import
{
ActivatedRoute
,
Router
,
NavigationEnd
,
NavigationStart
}
from
"
@angular/router
"
;
import
{
Session
}
from
"
../../../services/session
"
;
import
{
Subscription
}
from
"
rxjs
"
;
import
{
MindsUser
}
from
"
../../../interfaces/entities
"
;
...
...
@@ -67,7 +67,7 @@ export class ProChannelComponent implements OnInit, OnDestroy {
if
(
!
navigationEvent
.
urlAfterRedirects
)
{
return
;
}
this
.
currentURL
=
navigationEvent
.
urlAfterRedirects
;
this
.
setTitle
();
}
...
...
@@ -95,7 +95,7 @@ export class ProChannelComponent implements OnInit, OnDestroy {
if
(
this
.
channel
.
pro_settings
.
headline
)
{
title
+=
` -
${
this
.
channel
.
pro_settings
.
headline
}
`
;
}
if
(
urlFragments
[
fragmentIndex
])
{
title
+=
` -
${
urlFragments
[
fragmentIndex
]}
`
;
}
...
...
@@ -127,9 +127,10 @@ export class ProChannelComponent implements OnInit, OnDestroy {
this
.
detectChanges
();
}
bindCssVariables
()
{
const
styles
=
this
.
channel
.
pro_settings
.
styles
;
const
modal
:
HTMLElement
=
document
.
querySelector
(
'
m-app m-overlay-modal
'
);
for
(
const
style
in
styles
)
{
if
(
!
styles
.
hasOwnProperty
(
style
))
{
...
...
@@ -145,6 +146,7 @@ export class ProChannelComponent implements OnInit, OnDestroy {
const
styleAttr
=
style
.
replace
(
/_/g
,
"
-
"
);
this
.
element
.
nativeElement
.
style
.
setProperty
(
`--
${
styleAttr
}
`
,
styles
[
style
]);
modal
.
style
.
setProperty
(
`--
${
styleAttr
}
`
,
styles
[
style
]);
}
}
...
...
@@ -174,7 +176,7 @@ export class ProChannelComponent implements OnInit, OnDestroy {
}
search
()
{
if
(
!
this
.
currentURL
)
{
if
(
!
this
.
currentURL
)
{
this
.
currentURL
=
`/pro/
${
this
.
channel
.
username
}
/articles`
;
//TODO ADD /TOP when algorithm is enable
}
else
{
if
(
this
.
currentURL
.
includes
(
'
query
'
))
{
...
...
@@ -182,7 +184,7 @@ export class ProChannelComponent implements OnInit, OnDestroy {
}
}
this
.
router
.
navigate
([
this
.
currentURL
,{
query
:
this
.
searchedText
,
period
:
'
24h
'
}]);
this
.
router
.
navigate
([
this
.
currentURL
,
{
query
:
this
.
searchedText
,
period
:
'
24h
'
}]);
}
clearSearch
()
{
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/list-modal/list-modal.component.scss
View file @
3d87b567
...
...
@@ -7,3 +7,17 @@
grid-gap
:
16px
;
grid-template-columns
:
repeat
(
3
,
1fr
);
}
m-overlay-modal
{
.m-overlayModal--seeMore
{
background-color
:
var
(
--
plain-background-color
)
!
important
;
a
.m-overlay-modal--close
{
background-color
:
var
(
--
transparent-background-color
)
!
important
;
i
{
color
:
var
(
--
text-color
)
!
important
;
}
}
}
}
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/list-modal/list-modal.component.ts
View file @
3d87b567
...
...
@@ -78,13 +78,21 @@ export class ProChannelListModal {
}
async
expand
(
entity
)
{
if
(
entity
.
subtype
!==
'
video
'
&&
entity
.
subtype
!==
'
image
'
)
{
return
;
switch
(
this
.
getType
(
entity
))
{
case
'
object:blog
'
:
window
.
open
(
`
${
window
.
Minds
.
site_url
}${
entity
.
route
}
/`
,
'
_blank
'
);
break
;
case
'
object:image
'
:
case
'
object:video
'
:
this
.
modalService
.
create
(
ProContentModalComponent
,
entity
,
{
class
:
'
m-overlayModal--media
'
},
this
.
injector
).
present
();
break
;
}
}
this
.
modalService
.
create
(
ProContentModalComponent
,
entity
,
{
class
:
'
m-overlayModal--media
'
},
this
.
injector
).
present
();
private
getType
(
entity
:
any
)
{
return
entity
.
type
===
'
object
'
?
`
${
entity
.
type
}
:
${
entity
.
subtype
}
`
:
entity
.
type
;
}
detectChanges
()
{
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/channel/list/list.component.ts
View file @
3d87b567
...
...
@@ -136,7 +136,14 @@ export class ProChannelListComponent implements OnInit, OnDestroy {
seeMore
()
{
this
.
modalService
.
create
(
ProChannelListModal
,
{
type
:
this
.
type
,
algorithm
:
'
latest
'
,
query
:
this
.
query
},
void
0
,
this
.
injector
)
.
create
(
ProChannelListModal
,
{
type
:
this
.
type
,
algorithm
:
'
latest
'
,
query
:
this
.
query
,
},
{
class
:
'
m-overlayModal--seeMore
'
},
this
.
injector
)
.
present
();
}
...
...
This diff is collapsed.
Click to expand it.