[feature] Update attachment format, receive + send focalPoint prop + use it on the frontend (#4052)

* [feature] Update attachment format, receive + send `focalPoint` prop + use it on the frontend

* whoops

* boop

* restore function signature of ExtractAttachments
This commit is contained in:
tobi
2025-04-26 15:03:05 +02:00
committed by GitHub
parent 6a6a499333
commit f7323c065a
18 changed files with 617 additions and 72 deletions

View File

@@ -29,6 +29,10 @@
height="{{- .Meta.Small.Height -}}"
data-blurhash-hash="{{- .Blurhash -}}"
data-sensitive="{{- .Sensitive -}}"
{{- if or (ne .Meta.Focus.X 0.0) (ne .Meta.Focus.Y 0.0) }}
data-object-position="{{ objectPosition .Meta.Focus.X .Meta.Focus.Y }}"
{{- else }}
{{- end }}
/>
{{- else }}
<img
@@ -69,6 +73,10 @@
data-blurhash-height="{{- .Item.Meta.Small.Height -}}"
data-blurhash-hash="{{- .Item.Blurhash -}}"
data-blurhash-aspect="{{- .Item.Meta.Small.Aspect -}}"
{{- if or (ne .Item.Meta.Focus.X 0.0) (ne .Item.Meta.Focus.Y 0.0) }}
data-blurhash-object-position="{{ objectPosition .Item.Meta.Focus.X .Item.Meta.Focus.Y }}"
{{- else }}
{{- end }}
></div>
{{- end }}
</summary>