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
896
Issues
896
List
Boards
Labels
Service Desk
Milestones
Merge Requests
50
Merge Requests
50
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
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
15fec4f5f60178dfbef0461cc9f472f93089a2ab...334fac5df44ad4367ca16d4ee21a83229d693f28
Source
334fac5df44ad4367ca16d4ee21a83229d693f28
Select Git revision
...
Target
15fec4f5f60178dfbef0461cc9f472f93089a2ab
Select Git revision
Compare
Commits (2)
(fix) minor fixes and ability of persisting date for datetimepicker.directive
· 7a585236
Juan Manuel Solaro
authored
17 minutes ago
7a585236
(fix) apply prettier changes
· 334fac5d
Juan Manuel Solaro
authored
16 minutes ago
334fac5d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
12 deletions
+21
-12
selector.component.html
...n/components/poster-date-selector/selector.component.html
+2
-2
selector.component.scss
...n/components/poster-date-selector/selector.component.scss
+1
-0
selector.component.ts
...mon/components/poster-date-selector/selector.component.ts
+10
-4
datetimepicker.directive.ts
...pp/common/directives/material/datetimepicker.directive.ts
+5
-1
activity.html
...pp/modules/legacy/components/cards/activity/activity.html
+2
-1
poster.component.ts
src/app/modules/newsfeed/poster/poster.component.ts
+1
-4
No files found.
src/app/common/components/poster-date-selector/selector.component.html
View file @
334fac5d
...
...
@@ -2,7 +2,7 @@
class=
"m-poster-date-selector--input"
[class.selected]=
"hasDateSelected()"
mdl-datetime-picker
[date]=
"
date
"
[date]=
"
getDate()
"
(dateChange)=
"onDateChange($event)"
>
<input
...
...
@@ -12,7 +12,7 @@
[hidden]=
"true"
/>
<m-tooltip
icon=
"date_range"
>
{{
tooltipDate || 'now
' }}
{{
getDate() || 'Post Immediately
' }}
</m-tooltip>
<span></span>
</div>
This diff is collapsed.
Click to expand it.
src/app/common/components/poster-date-selector/selector.component.scss
View file @
334fac5d
...
...
@@ -8,6 +8,7 @@ m-poster-date-selector {
.m-poster-date-selector--input
{
align-items
:
center
;
margin-right
:
-4px
;
input
{
font-size
:
12px
;
...
...
This diff is collapsed.
Click to expand it.
src/app/common/components/poster-date-selector/selector.component.ts
View file @
334fac5d
...
...
@@ -14,8 +14,6 @@ export class PosterDateSelectorComponent {
@
Input
()
dateFormat
:
string
=
'
short
'
;
tooltipDate
:
string
;
onDateChange
(
newDate
)
{
const
validation
=
this
.
validate
(
newDate
);
if
(
validation
!==
true
)
{
...
...
@@ -23,14 +21,14 @@ export class PosterDateSelectorComponent {
return
;
}
this
.
date
=
this
.
tooltipDate
=
newDate
;
this
.
date
=
newDate
;
newDate
=
new
Date
(
newDate
).
getTime
();
newDate
=
Math
.
floor
(
+
newDate
/
1000
);
this
.
dateChange
.
emit
(
newDate
);
}
hasDateSelected
()
{
return
this
.
tooltipDate
&&
this
.
tooltipD
ate
!==
''
;
return
this
.
date
&&
this
.
d
ate
!==
''
;
}
validate
(
newDate
)
{
...
...
@@ -50,4 +48,12 @@ export class PosterDateSelectorComponent {
return
true
;
}
getDate
()
{
const
tempDate
=
parseInt
(
this
.
date
);
if
(
tempDate
)
{
this
.
date
=
new
Date
(
tempDate
*
1000
).
toString
();
}
return
this
.
date
;
}
}
This diff is collapsed.
Click to expand it.
src/app/common/directives/material/datetimepicker.directive.ts
View file @
334fac5d
...
...
@@ -23,7 +23,11 @@ export class MaterialDateTimePickerDirective {
@
HostListener
(
'
click
'
)
onHostClick
()
{
if
(
!
this
.
open
)
{
this
.
picker
=
new
DateTimePicker
()
let
options
=
{};
if
(
this
.
date
)
{
options
=
{
default
:
new
Date
(
this
.
date
).
toString
()
};
}
this
.
picker
=
new
DateTimePicker
(
options
)
.
on
(
'
submit
'
,
this
.
submitCallback
.
bind
(
this
))
.
on
(
'
close
'
,
this
.
close
.
bind
(
this
));
this
.
open
=
true
;
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/legacy/components/cards/activity/activity.html
View file @
334fac5d
...
...
@@ -522,5 +522,6 @@
class=
"mdl-card__supporting-text m-activity--pending"
*ngIf=
"isScheduled(activity.time_created)"
>
This is a scheduled post.
This activity is scheduled to be shown on {{activity.time_created * 1000 |
date:'medium'}}.
</div>
This diff is collapsed.
Click to expand it.
src/app/modules/newsfeed/poster/poster.component.ts
View file @
334fac5d
...
...
@@ -32,7 +32,7 @@ export class PosterComponent {
meta
:
any
=
{
message
:
''
,
wire_threshold
:
null
,
time_created
:
Math
.
floor
(
Date
.
now
()
/
1000
)
,
time_created
:
null
,
};
tags
=
[];
minds
=
window
.
Minds
;
...
...
@@ -56,8 +56,6 @@ export class PosterComponent {
protected
resizeSubject
:
Subject
<
number
>
=
new
Subject
<
number
>
();
protected
time_created
:
any
;
constructor
(
public
session
:
Session
,
public
client
:
Client
,
...
...
@@ -195,7 +193,6 @@ export class PosterComponent {
this
.
attachment
.
reset
();
this
.
meta
=
{
wire_threshold
:
null
};
this
.
inProgress
=
false
;
this
.
time_created
=
null
;
})
.
catch
(
e
=>
{
this
.
inProgress
=
false
;
...
...
This diff is collapsed.
Click to expand it.