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
857
Issues
857
List
Boards
Labels
Service Desk
Milestones
Merge Requests
53
Merge Requests
53
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
1a8b1ef8
Commit
1a8b1ef8
authored
6 minutes ago
by
Juan Manuel Solaro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fix) adapt and fix code to mark's review
parent
8741ca7a
epic/post-scheduler
1 merge request
!494
WIP: epic/post-scheduler
Pipeline
#77849124
running with stages
Changes
14
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
65 additions
and
30 deletions
+65
-30
poster-date-selector.component.html
.../poster-date-selector/poster-date-selector.component.html
+17
-0
poster-date-selector.component.ts
...ts/poster-date-selector/poster-date-selector.component.ts
+1
-8
edit.html
src/app/modules/blogs/edit/edit.html
+4
-1
edit.spec.ts
src/app/modules/blogs/edit/edit.spec.ts
+5
-1
edit.ts
src/app/modules/blogs/edit/edit.ts
+3
-3
sorted.component.html
src/app/modules/channels/sorted/sorted.component.html
+2
-2
sorted.component.scss
src/app/modules/channels/sorted/sorted.component.scss
+2
-2
sorted.component.ts
src/app/modules/channels/sorted/sorted.component.ts
+3
-3
activity.component.spec.ts
...gacy/components/cards/activity/activity.component.spec.ts
+4
-1
activity.html
...pp/modules/legacy/components/cards/activity/activity.html
+4
-1
activity.ts
src/app/modules/legacy/components/cards/activity/activity.ts
+2
-2
poster.component.html
src/app/modules/newsfeed/poster/poster.component.html
+4
-1
poster.component.spec.ts
src/app/modules/newsfeed/poster/poster.component.spec.ts
+12
-3
poster.component.ts
src/app/modules/newsfeed/poster/poster.component.ts
+2
-2
No files found.
src/app/common/components/poster-date-selector/poster-date-selector.component.html
0 → 100644
View file @
1a8b1ef8
<div
class=
"m-poster-date-selector--input"
[class.selected]=
"hasDateSelected()"
mdl-datetime-picker
[date]=
"date"
(dateChange)=
"onDateChange($event)"
>
<input
type=
"text"
[ngModel]=
"date | date:dateFormat"
(ngModelChange)=
"onDateChange($event)"
[hidden]=
"true"
>
<m-tooltip
icon=
"date_range"
>
{{tooltipDate || 'now'}}
</m-tooltip>
<span></span>
</div>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/app/common/components/poster-date-selector/poster-date-selector.component.ts
View file @
1a8b1ef8
...
...
@@ -4,14 +4,7 @@ import { DatePipe } from '@angular/common';
@
Component
({
moduleId
:
module
.
id
,
selector
:
'
m-poster-date-selector
'
,
template
:
`
<div class="m-poster-date-selector--input" [class.selected]="hasDateSelected()" mdl-datetime-picker [date]="date" (dateChange)="onDateChange($event)">
<input type="text" [ngModel]="date | date:dateFormat" (ngModelChange)="onDateChange($event)" [hidden]="true">
<m-tooltip icon="date_range"> {{tooltipDate || 'now'}} </m-tooltip>
<span></span>
</div>
`
,
templateUrl
:
'
poster-date-selector.component.html
'
,
providers
:
[
DatePipe
]
})
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/blogs/edit/edit.html
View file @
1a8b1ef8
...
...
@@ -112,7 +112,10 @@
(validThreshold)=
"validThreshold = $event"
#thresholdInput
></m-wire-threshold-input>
<m-poster-date-selector
[date]=
"blog.time_created"
(dateChange)=
"onTimeCreatedChange($event)"
></m-poster-date-selector>
<m-poster-date-selector
[date]=
"blog.time_created"
(dateChange)=
"onTimeCreatedChange($event)"
></m-poster-date-selector>
</div>
<div
class=
"mdl-cell mdl-cell--12-col m-blog-edit--metadata mdl-color-text--blue-grey-200"
*ngIf=
"blog.custom_meta"
>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/blogs/edit/edit.spec.ts
View file @
1a8b1ef8
...
...
@@ -238,7 +238,11 @@ describe('BlogEdit', () => {
inputs
:
[
'
tags
'
,
'
alignLeft
'
],
outputs
:
[
'
tagsChange
'
,
'
tagsAdded
'
,
'
tagsRemoved
'
],
}),
MockComponent
({
selector
:
'
m-poster-date-selector
'
,
inputs
:
[
'
date
'
,
'
dateFormat
'
],
outputs
:
[
'
dateChange
'
]
}),
MockComponent
({
selector
:
'
m-poster-date-selector
'
,
inputs
:
[
'
date
'
,
'
dateFormat
'
],
outputs
:
[
'
dateChange
'
]
}),
BlogEdit
,
MDLMock
],
// declare the test component
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/blogs/edit/edit.ts
View file @
1a8b1ef8
...
...
@@ -32,7 +32,7 @@ export class BlogEdit {
guid
:
'
new
'
,
title
:
''
,
description
:
'
<p><br></p>
'
,
time_created
:
Math
.
floor
(
+
Date
.
now
()
/
1000
),
time_created
:
Math
.
floor
(
Date
.
now
()
/
1000
),
access_id
:
2
,
tags
:
[],
license
:
'
attribution-sharealike-cc
'
,
...
...
@@ -202,7 +202,7 @@ export class BlogEdit {
if
(
!
this
.
blog
.
license
)
this
.
blog
.
license
=
''
;
this
.
blog
.
time_created
=
response
.
blog
.
time_created
||
Math
.
floor
(
+
Date
.
now
()
/
1000
);
this
.
blog
.
time_created
=
response
.
blog
.
time_created
||
Math
.
floor
(
Date
.
now
()
/
1000
);
}
});
}
...
...
@@ -248,7 +248,7 @@ export class BlogEdit {
blog
.
mature
=
blog
.
mature
?
1
:
0
;
blog
.
monetization
=
blog
.
monetization
?
1
:
0
;
blog
.
monetized
=
blog
.
monetized
?
1
:
0
;
blog
.
time_created
=
blog
.
time_created
||
Math
.
floor
(
+
Date
.
now
()
/
1000
);
blog
.
time_created
=
blog
.
time_created
||
Math
.
floor
(
Date
.
now
()
/
1000
);
this
.
editing
=
false
;
this
.
inProgress
=
true
;
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/channels/sorted/sorted.component.html
View file @
1a8b1ef8
...
...
@@ -6,8 +6,8 @@
<div
class=
"minds-list"
>
<div>
<div
class=
"mindsList__tools m-border"
>
<div
class=
"m
indsListTools__scheduled"
(click)=
"toggleScheduled()"
[class.selected]=
"see
Scheduled"
>
<div
class=
"m
-m
indsList__tools m-border"
>
<div
class=
"m
-mindsListTools__scheduled"
(click)=
"toggleScheduled()"
[class.selected]=
"view
Scheduled"
>
<m-tooltip
icon=
"date_range"
>
See Scheduled Activities
</m-tooltip>
<span>
scheduled: {{scheduledCount}}
</span>
</div>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/channels/sorted/sorted.component.scss
View file @
1a8b1ef8
.mindsList__tools
{
.m
-m
indsList__tools
{
@include
m-theme
()
{
background-color
:
themed
(
$m-white
);
}
...
...
@@ -9,7 +9,7 @@
flex-direction
:
row
;
align-items
:
center
;
.mindsListTools__scheduled
{
.m
-m
indsListTools__scheduled
{
cursor
:
pointer
;
i
{
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/channels/sorted/sorted.component.ts
View file @
1a8b1ef8
...
...
@@ -65,7 +65,7 @@ export class ChannelSortedComponent implements OnInit {
initialized
:
boolean
=
false
;
see
Scheduled
:
boolean
=
false
;
view
Scheduled
:
boolean
=
false
;
@
ViewChild
(
'
poster
'
,
{
static
:
false
})
protected
poster
:
PosterComponent
;
...
...
@@ -103,7 +103,7 @@ export class ChannelSortedComponent implements OnInit {
this
.
detectChanges
();
let
endpoint
=
'
api/v2/feeds/container
'
;
if
(
this
.
see
Scheduled
)
{
if
(
this
.
view
Scheduled
)
{
endpoint
=
'
api/v2/channel/scheduled
'
;
}
...
...
@@ -188,7 +188,7 @@ export class ChannelSortedComponent implements OnInit {
}
toggleScheduled
()
{
this
.
seeScheduled
=
!
this
.
see
Scheduled
;
this
.
viewScheduled
=
!
this
.
view
Scheduled
;
this
.
load
(
true
);
}
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/legacy/components/cards/activity/activity.component.spec.ts
View file @
1a8b1ef8
...
...
@@ -465,7 +465,10 @@ describe('Activity', () => {
inputs
:
[
'
selected
'
],
outputs
:
[
'
selected
'
],
}),
MockComponent
({
selector
:
'
m-poster-date-selector
'
,
inputs
:
[
'
date
'
,
'
dateFormat
'
],
outputs
:
[
'
dateChange
'
]
}),
MockComponent
({
selector
:
'
m-poster-date-selector
'
,
inputs
:
[
'
date
'
,
'
dateFormat
'
],
outputs
:
[
'
dateChange
'
]
}),
MockDirective
({
selector
:
'
[mIfFeature]
'
,
inputs
:
[
'
mIfFeature
'
],
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/legacy/components/cards/activity/activity.html
View file @
1a8b1ef8
...
...
@@ -119,7 +119,10 @@
</ng-container>
<m-wire-threshold-input
[(threshold)]=
"activity.wire_threshold"
[(enabled)]=
"activity.paywall"
></m-wire-threshold-input>
<m-poster-date-selector
[date]=
"activity.time_created"
(dateChange)=
"onTimeCreatedChange($event)"
></m-poster-date-selector>
<m-poster-date-selector
[date]=
"activity.time_created"
(dateChange)=
"onTimeCreatedChange($event)"
></m-poster-date-selector>
<button
class=
"mdl-button mdl-button--raised mdl-color--blue-grey-100"
(click)=
"messageEdit.value = activity.message; editing=false;"
i18n=
"@@M__ACTION__CANCEL"
>
Cancel
</button>
<button
class=
"mdl-button mdl-button--colored mdl-button--raised"
(click)=
"activity.message = messageEdit.value; save();"
i18n=
"@@M__ACTION__SAVE"
>
Save
</button>
</div>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/legacy/components/cards/activity/activity.ts
View file @
1a8b1ef8
...
...
@@ -173,7 +173,7 @@ export class Activity implements OnInit {
(
this
.
activity
.
remind_object
&&
this
.
translationService
.
isTranslatable
(
this
.
activity
.
remind_object
))
);
this
.
activity
.
time_created
=
this
.
activity
.
time_created
||
Math
.
floor
(
+
Date
.
now
()
/
1000
);
this
.
activity
.
time_created
=
this
.
activity
.
time_created
||
Math
.
floor
(
Date
.
now
()
/
1000
);
}
getOwnerIconTime
()
{
...
...
@@ -195,7 +195,7 @@ export class Activity implements OnInit {
console
.
log
(
'
trying to save your changes to the server
'
,
this
.
activity
);
this
.
editing
=
false
;
this
.
activity
.
edited
=
true
;
this
.
activity
.
time_created
=
this
.
activity
.
time_created
||
Math
.
floor
(
+
Date
.
now
()
/
1000
);
this
.
activity
.
time_created
=
this
.
activity
.
time_created
||
Math
.
floor
(
Date
.
now
()
/
1000
);
let
data
=
this
.
activity
;
if
(
this
.
attachment
.
has
())
{
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/newsfeed/poster/poster.component.html
View file @
1a8b1ef8
...
...
@@ -84,7 +84,10 @@
(validThreshold)=
"validThreshold = $event"
></m-wire-threshold-input>
<m-poster-date-selector
[date]=
"meta.time_created"
(dateChange)=
"onTimeCreatedChange($event)"
></m-poster-date-selector>
<m-poster-date-selector
[date]=
"meta.time_created"
(dateChange)=
"onTimeCreatedChange($event)"
></m-poster-date-selector>
<button
type=
"submit"
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/newsfeed/poster/poster.component.spec.ts
View file @
1a8b1ef8
...
...
@@ -70,9 +70,18 @@ describe('PosterComponent', () => {
inputs
:
[
'
threshold
'
,
'
disabled
'
,
'
enabled
'
],
outputs
:
[
'
thresholdChange
'
]
}),
MockComponent
({
selector
:
'
minds-rich-embed
'
,
inputs
:
[
'
src
'
,
'
preview
'
,
'
maxheight
'
,
'
cropimage
'
]
}),
MockComponent
({
selector
:
'
m-poster-date-selector
'
,
inputs
:
[
'
date
'
,
'
dateFormat
'
],
outputs
:
[
'
dateChange
'
]
}),
MockComponent
({
selector
:
'
m-tooltip
'
,
template
:
'
<ng-content></ng-content>
'
}),
MockComponent
({
selector
:
'
minds-rich-embed
'
,
inputs
:
[
'
src
'
,
'
preview
'
,
'
maxheight
'
,
'
cropimage
'
]
}),
MockComponent
({
selector
:
'
m-poster-date-selector
'
,
inputs
:
[
'
date
'
,
'
dateFormat
'
],
outputs
:
[
'
dateChange
'
]
}),
MockComponent
({
selector
:
'
m-tooltip
'
,
template
:
'
<ng-content></ng-content>
'
}),
DropdownComponent
,
TagsInput
,
HashtagsSelectorComponent
,
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/newsfeed/poster/poster.component.ts
View file @
1a8b1ef8
...
...
@@ -28,7 +28,7 @@ export class PosterComponent {
meta
:
any
=
{
message
:
''
,
wire_threshold
:
null
,
time_created
:
Math
.
floor
(
+
Date
.
now
()
/
1000
)
time_created
:
Math
.
floor
(
Date
.
now
()
/
1000
)
};
tags
=
[];
minds
=
window
.
Minds
;
...
...
@@ -172,7 +172,7 @@ export class PosterComponent {
return
;
}
this
.
meta
.
time_created
=
this
.
meta
.
time_created
||
Math
.
floor
(
+
Date
.
now
()
/
1000
);
this
.
meta
.
time_created
=
this
.
meta
.
time_created
||
Math
.
floor
(
Date
.
now
()
/
1000
);
this
.
errorMessage
=
""
;
...
...
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