Frontend: Add "animated" field to the Files tab in the edit dialog #3197

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2023-02-20 17:04:34 +01:00
parent 5dd72307e0
commit 15f2301d7e
2 changed files with 18 additions and 8 deletions

View file

@ -112,6 +112,14 @@
</td>
<td>{{ file.typeInfo() }}</td>
</tr>
<tr v-if="file.isAnimated()">
<td>
<translate>Animated</translate>
</td>
<td>
<translate>Yes</translate>
</td>
</tr>
<tr v-if="file.Codec && file.Codec !== file.FileType">
<td>
<translate>Codec</translate>

View file

@ -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"));
}