Commit 3f754e90 authored by anton's avatar anton
Browse files

Update from release_2_1

parents d8b7a474 94042cf1
Pipeline #63769 passed with stage
in 3 minutes and 40 seconds
......@@ -15,6 +15,10 @@ and this project adheres to
- Add media screen uses `publishedAt` field from YouTube metadata as initial
reference date, if available (e.g. live streams)
### Changed
- Add media screen explicitly shows option for overriding or auto-detecting media start times
### Fixed
- Exception on edit media screen when media duration is unknown
......
......@@ -482,7 +482,9 @@ export default {
},
create: {
title: 'Add Media',
caption: 'Add a new media to your timeline.'
caption: 'Add a new media to your timeline.',
default_selector_notice: 'Now using the video publishing date (if available), or the current date. Use the calendar to set a custom date and time for the video.',
override_selector_notice: 'You have set a custom date for the video.'
},
sync: {
title: 'Sync Media',
......
......@@ -4,8 +4,12 @@
content-block(:position="'first'")
headline(:content="$t('routes.piecemaker.media.create.title')")
.q-mb-lg
q-alert(color="info" v-if="!selectorValue") {{ $t('routes.piecemaker.media.create.default_selector_notice') }}
q-alert(color="info" :actions="actions" v-else) {{ $t('routes.piecemaker.media.create.override_selector_notice') }}
content-paragraph(:position="'first'")
calendar-time-main(v-if="mayAdd", :datetime="selectorValue", @update="onCalendarUpdate")
calendar-time-main(v-if="mayAdd", @update="onCalendarUpdate")
content-paragraph(:position="'last'")
form-main(v-if="mayAdd", v-model="payload", :schema="schema", ref="mediaForm")
......@@ -43,6 +47,14 @@
data () {
const _this = this
return {
actions: [
{
label: this.$t('buttons.reset'),
handler () {
_this.selectorValue = undefined
}
}
],
timeline: undefined,
mayAdd: undefined,
// FIXME: i know this is bullshit!!! (but i hope it works for now)
......@@ -71,11 +83,10 @@
}
})
let
start = _this.selectorValue || DateTime.local().toString(),
start = _this.selectorValue,
end
if (metadata && metadata.publishedAt) {
_this.selectorValue = DateTime.fromISO(metadata.publishedAt, { setZone: true }).toISO()
start = _this.selectorValue
if (!_this.selectorValue && metadata && metadata.publishedAt) {
start = DateTime.fromISO(metadata.publishedAt, { setZone: true }).toISO()
}
else start = DateTime.local().toString()
if (metadata && metadata.duration) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment