@@ -20,6 +20,7 @@ import { showFormValidationErrors } from '@/helpers/form.validation.alert.js'
2020import { createAccountOptions } from ' @/helpers/account.options.js'
2121import { compareMediaInfo , createFileSizeSearchTokens , formatDuration , formatFileSize } from ' @/helpers/media.format.js'
2222import { itemsPerPageOptions } from ' @/helpers/items.per.page.js'
23+ import { formatRuDateTime } from ' @/helpers/date.format.js'
2324import { getVideoCategoryTitle } from ' @/helpers/video.scope.helpers.js'
2425import {
2526 duplicatePlaylistDescriptionFallbackMessage ,
@@ -59,7 +60,9 @@ const { videoPreview } = storeToRefs(videosStore)
5960const playlist = ref ({
6061 title: ' ' ,
6162 filename: ' ' ,
62- accountId: props .accountId ?? null
63+ accountId: props .accountId ?? null ,
64+ createdAt: null ,
65+ updatedAt: null
6366})
6467
6568function generatePlaylistFilename () {
@@ -256,6 +259,8 @@ const someVisiblePlaylistItemsSelected = computed(() => (
256259const playlistButtonText = computed (() => (props .register ? ' Создать' : ' Сохранить' ))
257260const playlistTitleText = computed (() => (props .register ? ' Новый плейлист' : ' Настройки плейлиста' ))
258261const formKey = computed (() => ` ${ props .register ? ' create' : ' edit' } -${ playlist .value .accountId ?? ' none' }` )
262+ const createdAtText = computed(() => formatRuDateTime(playlist.value.createdAt))
263+ const updatedAtText = computed(() => formatRuDateTime(playlist.value.updatedAt))
259264const faCheckDouble = 'fa-solid fa-check-double'
260265const faXmark = 'fa-solid fa-xmark'
261266
@@ -296,7 +301,9 @@ if (!props.register) {
296301 playlist.value = {
297302 title: loadedPlaylist.title || '',
298303 filename: loadedPlaylist.filename || '',
299- accountId: loadedPlaylist.accountId ?? null
304+ accountId: loadedPlaylist.accountId ?? null,
305+ createdAt: loadedPlaylist.createdAt ?? null,
306+ updatedAt: loadedPlaylist.updatedAt ?? null
300307 }
301308 playlistItems.value = normalizePlaylistItems(loadedPlaylist.items)
302309 } catch (err) {
@@ -728,6 +735,13 @@ function onInvalidSubmit(context) {
728735 />
729736 </div>
730737
738+ <div v-if="!props.register" class="form-group">
739+ <label class="label-1">Создан / изменён:</label>
740+ <div class="form-control input-1 playlist-readonly-value playlist-timestamps-inline" data-test="playlist-timestamps">
741+ <span data-test="playlist-created-updated-at">{{ createdAtText }} / {{ updatedAtText }}</span>
742+ </div>
743+ </div>
744+
731745 <div class="playlist-columns">
732746 <div class="playlist-column">
733747 <div class="playlist-column-header header-with-actions">
@@ -1121,6 +1135,18 @@ function onInvalidSubmit(context) {
11211135 color: var(--primary-color-dark);
11221136}
11231137
1138+ .playlist-readonly-value {
1139+ background-color: #f8f9fa;
1140+ }
1141+
1142+ .playlist-timestamps-inline {
1143+ display: flex;
1144+ gap: 16px;
1145+ flex-wrap: wrap;
1146+ align-items: center;
1147+ }
1148+
1149+
11241150@media (max-width: 1100px) {
11251151 .playlist-columns {
11261152 grid-template-columns: 1fr;
0 commit comments