Skip to content
Next
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Frontend
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
803
Merge Requests
52
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Compare Revisions
50f69651a7fbcb109b47d34de47d4ef3138f6002...32fb20e0485461826381df2988d2cde0a6af12c0
Source
32fb20e0485461826381df2988d2cde0a6af12c0
...
Target
50f69651a7fbcb109b47d34de47d4ef3138f6002
Compare
Commits (2)
scheduler-groups and boost fix
· 5a9ef90b
Juan Manuel Solaro
authored
8 minutes ago
5a9ef90b
Merge branch 'feat/scheduler-groups' into 'master'
· 32fb20e0
Mark Harding
authored
8 minutes ago
scheduler-groups and boost fix Closes
#2042
See merge request
!582
32fb20e0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
82 additions
and
15 deletions
+82
-15
src/app/modules/blogs/view/view.html
View file @
32fb20e0
...
...
@@ -133,7 +133,7 @@
</div>
<minds-button-boost
[object]=
"blog"
*ngIf=
"session.isLoggedIn()"
*ngIf=
"session.isLoggedIn()
&& !isScheduled(blog.time_created)
"
></minds-button-boost>
</div>
</div>
...
...
This diff is collapsed.
src/app/modules/blogs/view/view.ts
View file @
32fb20e0
...
...
@@ -222,6 +222,10 @@ export class BlogView implements OnInit, OnDestroy {
.
present
();
}
isScheduled
(
time_created
)
{
return
time_created
&&
time_created
*
1000
>
Date
.
now
();
}
/**
* called when the window resizes
* @param {Event} event
...
...
This diff is collapsed.
src/app/modules/groups/profile/feed/sorted.component.html
View file @
32fb20e0
...
...
@@ -8,15 +8,25 @@
<div
class=
"minds-list"
>
<div>
<m-sort-selector
class=
"m-group--sorted__SortSelector m-border"
[allowedAlgorithms]=
"false"
[allowedPeriods]=
"false"
[allowedCustomTypes]=
"['activities', 'images', 'videos']"
[customType]=
"type"
(onChange)=
"setFilter($event.customType)"
></m-sort-selector>
<div
class=
"m-mindsList__tools m-border"
>
<div
*ngIf=
"isMember()"
class=
"m-mindsListTools__scheduled"
(click)=
"toggleScheduled()"
[class.selected]=
"viewScheduled"
>
<m-tooltip
icon=
"date_range"
>
See Scheduled Activities
</m-tooltip>
<span>
scheduled: {{ scheduledCount }}
</span>
</div>
<m-sort-selector
class=
"m-group--sorted__SortSelector"
[allowedAlgorithms]=
"false"
[allowedPeriods]=
"false"
[allowedCustomTypes]=
"['activities', 'images', 'videos']"
[customType]=
"type"
(onChange)=
"setFilter($event.customType)"
></m-sort-selector>
</div>
<ng-container
*ngIf=
"
isActivityFeed() &&
...
...
This diff is collapsed.
src/app/modules/groups/profile/feed/sorted.component.scss
View file @
32fb20e0
.m-
group--sorted__SortSelector
{
.m-
mindsList__tools
{
@include
m-theme
()
{
background-color
:
themed
(
$m-white
);
}
display
:
flex
;
position
:
relative
;
padding
:
8px
;
margin-bottom
:
16px
;
flex-direction
:
row
;
align-items
:
center
;
.m-mindsListTools__scheduled
{
cursor
:
pointer
;
i
{
vertical-align
:
middle
;
font-size
:
18px
;
margin-right
:
4px
;
}
span
{
text-transform
:
uppercase
;
font-size
:
11px
;
letter-spacing
:
1
.25px
;
text-rendering
:
optimizeLegibility
;
}
}
.m-group--sorted__SortSelector
{
margin-left
:
auto
;
}
}
This diff is collapsed.
src/app/modules/groups/profile/feed/sorted.component.ts
View file @
32fb20e0
...
...
@@ -58,8 +58,12 @@ export class GroupProfileFeedSortedComponent {
kicking
:
any
;
viewScheduled
:
boolean
=
false
;
@
ViewChild
(
'
poster
'
,
{
static
:
false
})
protected
poster
:
PosterComponent
;
scheduledCount
:
number
=
0
;
constructor
(
protected
service
:
GroupsService
,
public
feedsService
:
FeedsService
,
...
...
@@ -86,11 +90,18 @@ export class GroupProfileFeedSortedComponent {
this
.
detectChanges
();
let
endpoint
=
'
api/v2/feeds/container
'
;
if
(
this
.
viewScheduled
)
{
endpoint
=
'
api/v2/feeds/scheduled
'
;
}
try
{
this
.
feedsService
.
setEndpoint
(
`
api/v2/feeds/container
/
${
this
.
group
.
guid
}
/
${
this
.
type
}
`
)
.
setEndpoint
(
`
${
endpoint
}
/
${
this
.
group
.
guid
}
/
${
this
.
type
}
`
)
.
setLimit
(
12
)
.
fetch
();
this
.
getScheduledCount
();
}
catch
(
e
)
{
console
.
error
(
'
GroupProfileFeedSortedComponent.loadFeed
'
,
e
);
}
...
...
@@ -193,4 +204,16 @@ export class GroupProfileFeedSortedComponent {
this
.
cd
.
markForCheck
();
this
.
cd
.
detectChanges
();
}
toggleScheduled
()
{
this
.
viewScheduled
=
!
this
.
viewScheduled
;
this
.
load
(
true
);
}
async
getScheduledCount
()
{
const
url
=
`api/v2/feeds/scheduled/
${
this
.
group
.
guid
}
/count`
;
const
response
:
any
=
await
this
.
client
.
get
(
url
);
this
.
scheduledCount
=
response
.
count
;
this
.
detectChanges
();
}
}
This diff is collapsed.
src/app/modules/legacy/components/cards/activity/activity.html
View file @
32fb20e0
...
...
@@ -409,7 +409,8 @@
></m-wire-button>
<button
class=
"m-btn m-btn--action m-btn--slim minds-boost-button"
*ngIf=
"session.getLoggedInUser().guid == activity.owner_guid"
*ngIf=
"session.getLoggedInUser().guid == activity.owner_guid
&& !isScheduled(activity.time_created)"
id=
"boost-actions"
(click)=
"showBoost()"
>
...
...
This diff is collapsed.
src/app/modules/media/view/view.component.html
View file @
32fb20e0
...
...
@@ -204,7 +204,9 @@
</div>
<minds-button-boost
*ngIf=
"entity.subtype != 'album'"
*ngIf=
"
entity.subtype != 'album' && !isScheduled(entity.time_created)
"
class=
"m-media-content--button-boost"
[object]=
"entity"
></minds-button-boost>
...
...
This diff is collapsed.
src/app/modules/media/view/view.component.ts
View file @
32fb20e0
...
...
@@ -239,4 +239,8 @@ export class MediaViewComponent implements OnInit, OnDestroy {
this
.
cd
.
markForCheck
();
this
.
cd
.
detectChanges
();
}
isScheduled
(
time_created
)
{
return
time_created
&&
time_created
*
1000
>
Date
.
now
();
}
}
This diff is collapsed.