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
79d4c893
Commit
79d4c893
authored
14 minutes ago
by
Juan Manuel Solaro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(feat) add custom time when posting, creating and editing blog and when editing activity
parent
3d3b9987
epic/post-scheduler
1 merge request
!494
WIP: epic/post-scheduler
Pipeline
#76358592
pending with stages
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
12 deletions
+23
-12
edit.html
src/app/modules/blogs/edit/edit.html
+1
-1
edit.ts
src/app/modules/blogs/edit/edit.ts
+8
-3
activity.html
...pp/modules/legacy/components/cards/activity/activity.html
+1
-1
activity.ts
src/app/modules/legacy/components/cards/activity/activity.ts
+6
-3
poster.component.html
src/app/modules/newsfeed/poster/poster.component.html
+1
-1
poster.component.ts
src/app/modules/newsfeed/poster/poster.component.ts
+6
-3
No files found.
src/app/modules/blogs/edit/edit.html
View file @
79d4c893
...
...
@@ -112,7 +112,7 @@
(validThreshold)=
"validThreshold = $event"
#thresholdInput
></m-wire-threshold-input>
<m-poster-date-selector
[date]=
"publi
shDate"
(dateChange)=
"onPublish
DateChange($event)"
></m-poster-date-selector>
<m-poster-date-selector
[date]=
"publi
cation_date"
(dateChange)=
"onPublication
DateChange($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.ts
View file @
79d4c893
...
...
@@ -68,7 +68,7 @@ export class BlogEdit {
@
ViewChild
(
'
thresholdInput
'
,
{
static
:
false
})
thresholdInput
:
WireThresholdInputComponent
;
@
ViewChild
(
'
hashtagsSelector
'
,
{
static
:
false
})
hashtagsSelector
:
HashtagsSelectorComponent
;
protected
publi
shD
ate
:
any
;
protected
publi
cation_d
ate
:
any
;
constructor
(
public
session
:
Session
,
...
...
@@ -201,6 +201,8 @@ export class BlogEdit {
if
(
!
this
.
blog
.
license
)
this
.
blog
.
license
=
''
;
this
.
publication_date
=
response
.
blog
.
publication_date
||
null
;
}
});
}
...
...
@@ -246,6 +248,8 @@ export class BlogEdit {
blog
.
mature
=
blog
.
mature
?
1
:
0
;
blog
.
monetization
=
blog
.
monetization
?
1
:
0
;
blog
.
monetized
=
blog
.
monetized
?
1
:
0
;
blog
.
publication_date
=
this
.
publication_date
||
null
;
this
.
editing
=
false
;
this
.
inProgress
=
true
;
this
.
canSave
=
false
;
...
...
@@ -254,6 +258,7 @@ export class BlogEdit {
.
then
((
response
:
any
)
=>
{
this
.
inProgress
=
false
;
this
.
canSave
=
true
;
this
.
publication_date
=
null
;
if
(
response
.
status
!==
'
success
'
)
{
this
.
error
=
response
.
message
;
...
...
@@ -326,7 +331,7 @@ export class BlogEdit {
}
}
onPubli
sh
DateChange
(
newDate
){
this
.
publi
shD
ate
=
newDate
;
onPubli
cation
DateChange
(
newDate
){
this
.
publi
cation_d
ate
=
newDate
;
}
}
This diff is collapsed.
Click to expand it.
src/app/modules/legacy/components/cards/activity/activity.html
View file @
79d4c893
...
...
@@ -119,7 +119,7 @@
</ng-container>
<m-wire-threshold-input
[(threshold)]=
"activity.wire_threshold"
[(enabled)]=
"activity.paywall"
></m-wire-threshold-input>
<m-poster-date-selector
[date]=
"publi
shDate"
(dateChange)=
"onPublish
DateChange($event)"
></m-poster-date-selector>
<m-poster-date-selector
[date]=
"publi
cation_date"
(dateChange)=
"onPublication
DateChange($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 @
79d4c893
...
...
@@ -101,7 +101,7 @@ export class Activity implements OnInit {
@
ViewChild
(
'
player
'
,
{
static
:
false
})
player
:
MindsVideoComponent
;
protected
publi
shD
ate
:
any
;
protected
publi
cation_d
ate
:
any
;
constructor
(
public
session
:
Session
,
...
...
@@ -172,6 +172,8 @@ export class Activity implements OnInit {
this
.
translationService
.
isTranslatable
(
this
.
activity
)
||
(
this
.
activity
.
remind_object
&&
this
.
translationService
.
isTranslatable
(
this
.
activity
.
remind_object
))
);
this
.
publication_date
=
this
.
activity
.
publication_date
||
null
;
}
getOwnerIconTime
()
{
...
...
@@ -193,6 +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
.
publication_date
=
this
.
publication_date
||
null
;
let
data
=
this
.
activity
;
if
(
this
.
attachment
.
has
())
{
...
...
@@ -439,7 +442,7 @@ export class Activity implements OnInit {
this
.
cd
.
detectChanges
();
}
onPubli
sh
DateChange
(
newDate
){
this
.
publi
shD
ate
=
newDate
;
onPubli
cation
DateChange
(
newDate
){
this
.
publi
cation_d
ate
=
newDate
;
}
}
This diff is collapsed.
Click to expand it.
src/app/modules/newsfeed/poster/poster.component.html
View file @
79d4c893
...
...
@@ -84,7 +84,7 @@
(validThreshold)=
"validThreshold = $event"
></m-wire-threshold-input>
<m-poster-date-selector
[date]=
"publi
shDate"
(dateChange)=
"onPublish
DateChange($event)"
></m-poster-date-selector>
<m-poster-date-selector
[date]=
"publi
cation_date"
(dateChange)=
"onPublication
DateChange($event)"
></m-poster-date-selector>
<button
type=
"submit"
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/newsfeed/poster/poster.component.ts
View file @
79d4c893
...
...
@@ -50,7 +50,7 @@ export class PosterComponent {
protected
resizeSubject
:
Subject
<
number
>
=
new
Subject
<
number
>
();
protected
publi
shD
ate
:
any
;
protected
publi
cation_d
ate
:
any
;
constructor
(
public
session
:
Session
,
...
...
@@ -171,6 +171,8 @@ export class PosterComponent {
return
;
}
this
.
meta
.
publication_date
=
this
.
publication_date
||
null
;
this
.
errorMessage
=
""
;
let
data
=
Object
.
assign
(
this
.
meta
,
this
.
attachment
.
exportMeta
());
...
...
@@ -185,6 +187,7 @@ export class PosterComponent {
this
.
attachment
.
reset
();
this
.
meta
=
{
wire_threshold
:
null
};
this
.
inProgress
=
false
;
this
.
publication_date
=
null
;
})
.
catch
((
e
)
=>
{
this
.
inProgress
=
false
;
...
...
@@ -275,7 +278,7 @@ export class PosterComponent {
this
.
attachment
.
setNSFW
(
reasons
);
}
onPubli
sh
DateChange
(
newDate
){
this
.
publi
shD
ate
=
newDate
;
onPubli
cation
DateChange
(
newDate
){
this
.
publi
cation_d
ate
=
newDate
;
}
}
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