Creation date on both themes

This commit is contained in:
Pablo Ferreiro 2022-06-12 13:17:56 +02:00
parent 9d37bc433d
commit 3b0ed28ad9
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
3 changed files with 11 additions and 3 deletions

View file

@ -2,6 +2,7 @@ var opened_video_id = null
const video = document.getElementById('video')
const item_title = document.getElementById('item_title')
const item_date = document.getElementById('item_date')
const audio = document.getElementById('audio')
const audio_title = document.getElementById('audio_title')
const modal = document.getElementById('modal')
@ -15,7 +16,7 @@ const getVideoDataById = id => {
opened_video_id = id
return el.dataset
}
return false
return null
}
const isModalActive = () => modal.classList.contains('is-active')
@ -23,9 +24,10 @@ const isModalActive = () => modal.classList.contains('is-active')
const toggleButton = (id, force) => document.getElementById(id).toggleAttribute('disabled', force)
// -- MODAL -- //
const swapData = ({ video_url, desc, video_download_watermark, video_download_nowatermark, video_share_url, music_title, music_url }) => {
const swapData = ({ video_url, desc, createtime, video_download_watermark, video_download_nowatermark, video_share_url, music_title, music_url }) => {
video.src = video_url
item_title.innerText = desc
item_date.innerText = new Date(createtime * 1000).toLocaleString()
download_watermark.href = video_download_watermark
download_nowatermark.href = video_download_nowatermark
share_input.value = video_share_url