mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-26 23:19:54 +03:00
fix(riot-mui): creation date from tag list was not updating on page change
This commit is contained in:
parent
d13f81c9af
commit
696aa39012
1 changed files with 14 additions and 6 deletions
|
@ -20,6 +20,13 @@
|
|||
import { dateFormat } from '../../scripts/utils';
|
||||
export default {
|
||||
onMounted(props) {
|
||||
this.loadCreationDate(props);
|
||||
},
|
||||
onUpdated(props) {
|
||||
this.loadCreationDate(props);
|
||||
},
|
||||
loadCreationDate(props) {
|
||||
if (!props.image.creationDate && !props.image.ociImage) {
|
||||
props.image.one('creation-date', (date) => {
|
||||
this.update({
|
||||
date: date,
|
||||
|
@ -27,6 +34,7 @@
|
|||
});
|
||||
});
|
||||
props.image.trigger('get-date');
|
||||
}
|
||||
},
|
||||
getDate(image) {
|
||||
return !image.ociImage ? `${dateFormat(image.creationDate)} ago` : 'Not Available';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue