Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Framasoft
PeerTube
PeerTube
Commits
471ee394
Verified
Commit
471ee394
authored
Apr 14, 2020
by
Rigel Kent
☕
Browse files
Fix lint
parent
d6af8146
Changes
2
Hide whitespace changes
Inline
Side-by-side
client/src/app/+admin/users/user-edit/user-edit.ts
View file @
471ee394
...
...
@@ -94,10 +94,18 @@ export abstract class UserEdit extends FormReactive implements OnInit {
protected
buildQuotaOptions
()
{
// These are used by a HTML select, so convert key into strings
this
.
videoQuotaOptions
=
this
.
configService
.
videoQuotaOptions
.
map
(
q
=>
({
value
:
q
.
value
?.
toString
(),
label
:
q
.
label
,
disabled
:
q
.
disabled
}))
.
videoQuotaOptions
.
map
(
q
=>
({
value
:
q
.
value
?.
toString
(),
label
:
q
.
label
,
disabled
:
q
.
disabled
}))
this
.
videoQuotaDailyOptions
=
this
.
configService
.
videoQuotaDailyOptions
.
map
(
q
=>
({
value
:
q
.
value
?.
toString
(),
label
:
q
.
label
,
disabled
:
q
.
disabled
}))
.
videoQuotaDailyOptions
.
map
(
q
=>
({
value
:
q
.
value
?.
toString
(),
label
:
q
.
label
,
disabled
:
q
.
disabled
}))
console
.
log
(
this
.
videoQuotaOptions
,
...
...
client/src/app/shared/angular/from-now.pipe.ts
View file @
471ee394
...
...
@@ -10,7 +10,7 @@ export class FromNowPipe implements PipeTransform {
transform
(
arg
:
number
|
Date
|
string
)
{
const
argDate
=
new
Date
(
arg
)
const
seconds
=
Math
.
floor
((
Date
.
now
()
-
argDate
.
getTime
())
/
1000
)
let
interval
=
Math
.
floor
(
seconds
/
31536000
)
if
(
interval
>
1
)
return
this
.
i18n
(
'
{{interval}} years ago
'
,
{
interval
})
if
(
interval
===
1
)
return
this
.
i18n
(
'
{{interval}} year ago
'
,
{
interval
})
...
...
Write
Preview
Supports
Markdown
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