From 15f2301d7e059ff2435d37cacabfc70c261c67eb Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Mon, 20 Feb 2023 17:04:34 +0100 Subject: [PATCH] Frontend: Add "animated" field to the Files tab in the edit dialog #3197 Signed-off-by: Michael Mayer --- frontend/src/dialog/photo/edit/files.vue | 8 ++++++++ frontend/src/model/file.js | 18 ++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/frontend/src/dialog/photo/edit/files.vue b/frontend/src/dialog/photo/edit/files.vue index b421d04dc..6769b284a 100644 --- a/frontend/src/dialog/photo/edit/files.vue +++ b/frontend/src/dialog/photo/edit/files.vue @@ -112,6 +112,14 @@ {{ file.typeInfo() }} + + + Animated + + + Yes + + Codec diff --git a/frontend/src/model/file.js b/frontend/src/model/file.js index 9db795662..5285c8ea0 100644 --- a/frontend/src/model/file.js +++ b/frontend/src/model/file.js @@ -197,18 +197,20 @@ export class File extends RestModel { } } - typeInfo() { - let info = []; - - if ( + isAnimated() { + return ( this.MediaType && this.Frames && this.MediaType === MediaImage && this.Frames && - this.Frames > 0 - ) { - info.push($gettext("Animated")); - } else if (this.Sidecar) { + this.Frames > 1 + ); + } + + typeInfo() { + let info = []; + + if (this.Sidecar) { info.push($gettext("Sidecar")); }