diff --git a/internal/db/bundb/migrations/20250314120945_add_gallery_web_layout.go b/internal/db/bundb/migrations/20250314120945_add_gallery_web_layout.go index b5aeeca3f..68ad488b8 100644 --- a/internal/db/bundb/migrations/20250314120945_add_gallery_web_layout.go +++ b/internal/db/bundb/migrations/20250314120945_add_gallery_web_layout.go @@ -70,7 +70,7 @@ func init() { if _, err := tx. NewCreateIndex(). Table("statuses"). - Index("statuses_profile_web_view_sorting_idx"). + Index("statuses_profile_web_view_order_by_idx"). Column("account_id", "federated"). ColumnExpr("? DESC", bun.Ident("id")). IfNotExists(). diff --git a/web/source/frontend/index.js b/web/source/frontend/index.js index b7372aeb6..869d0dee5 100644 --- a/web/source/frontend/index.js +++ b/web/source/frontend/index.js @@ -183,15 +183,22 @@ Array.from(document.getElementsByClassName("plyr-video")).forEach((video) => { settings: ["loop"], disableContextMenu: false, hideControls: false, - tooltips: { contrors: true, seek: true }, + tooltips: { controls: true, seek: true }, iconUrl: "/assets/plyr.svg", listeners: { fullscreen: () => { - if (player.playing) { - setTimeout(() => { - player.play(); - }, 1); + + if (lightbox.pswp !== undefined) { + console.log(lightbox.pswp.currSlide); } + + // Continue playing the video + // after it's been fullscreened. + if (player.playing) { + setTimeout(() => player.play(), 1); + } + + // Open the video as a photoswipe slide. lightbox.loadAndOpen(parseInt(video.dataset.pswpIndex), { gallery: video.closest(".photoswipe-gallery") }); diff --git a/web/template/status_attachment.tmpl b/web/template/status_attachment.tmpl index 042ed2863..efe30c37f 100644 --- a/web/template/status_attachment.tmpl +++ b/web/template/status_attachment.tmpl @@ -100,8 +100,8 @@ data-pswp-index="{{- .Index -}}" data-pswp-parent-status="{{- .Item.ParentStatusLink -}}" poster="{{- .Item.PreviewURL -}}" - data-pswp-width="{{- .Item.Meta.Small.Width -}}px" - data-pswp-height="{{- .Item.Meta.Small.Height -}}px" + data-pswp-width="{{- .Item.Meta.Original.Width -}}px" + data-pswp-height="{{- .Item.Meta.Original.Height -}}px" {{- if .Item.Description }} alt="{{- .Item.Description -}}" title="{{- .Item.Description -}}"