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:
parent
5dd72307e0
commit
15f2301d7e
2 changed files with 18 additions and 8 deletions
|
@ -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>
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue