mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Add start at checkbox in share modal
This commit is contained in:
parent
c9d5c64f98
commit
11b8762f9c
8 changed files with 67 additions and 36 deletions
|
@ -51,6 +51,18 @@ function dateToHuman (date: string) {
|
|||
return datePipe.transform(date, 'medium')
|
||||
}
|
||||
|
||||
function durationToString (duration: number) {
|
||||
const hours = Math.floor(duration / 3600)
|
||||
const minutes = Math.floor((duration % 3600) / 60)
|
||||
const seconds = duration % 60
|
||||
|
||||
const minutesPadding = minutes >= 10 ? '' : '0'
|
||||
const secondsPadding = seconds >= 10 ? '' : '0'
|
||||
const displayedHours = hours > 0 ? hours.toString() + ':' : ''
|
||||
|
||||
return displayedHours + minutesPadding + minutes.toString() + ':' + secondsPadding + seconds.toString()
|
||||
}
|
||||
|
||||
function immutableAssign <A, B> (target: A, source: B) {
|
||||
return Object.assign({}, target, source)
|
||||
}
|
||||
|
@ -114,6 +126,7 @@ function sortBy (obj: any[], key1: string, key2?: string) {
|
|||
|
||||
export {
|
||||
sortBy,
|
||||
durationToString,
|
||||
objectToUrlEncoded,
|
||||
getParameterByName,
|
||||
populateAsyncUserVideoChannels,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue