From db5edb8e4d1f830b2d8cdbb4ed299b2239b1dc3f Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Wed, 15 Jul 2020 20:59:33 +0200 Subject: [PATCH] =?UTF-8?q?Add=20flag=20for=20360=C2=B0=20panoramas=20#352?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Mayer --- frontend/src/dialog/photo/info.vue | 15 ++++++++++++++- frontend/src/locales/translations.pot | 2 +- frontend/src/model/photo.js | 1 + internal/entity/photo.go | 1 + internal/form/photo.go | 1 + internal/query/photo_results.go | 1 + 6 files changed, 19 insertions(+), 2 deletions(-) diff --git a/frontend/src/dialog/photo/info.vue b/frontend/src/dialog/photo/info.vue index d3546d8cf..c96a6b87b 100644 --- a/frontend/src/dialog/photo/info.vue +++ b/frontend/src/dialog/photo/info.vue @@ -113,7 +113,7 @@ - Scan + Scan + + + 360° + + + + + Place check diff --git a/frontend/src/locales/translations.pot b/frontend/src/locales/translations.pot index f8ff3de97..a3ef24835 100644 --- a/frontend/src/locales/translations.pot +++ b/frontend/src/locales/translations.pot @@ -1470,7 +1470,7 @@ msgstr "" msgid "Reload" msgstr "" -#: src/dialog/reload.vue:57 +#: src/dialog/reload.vue:58 #: src/pages/settings/general.vue:377 msgid "Reloading…" msgstr "" diff --git a/frontend/src/model/photo.js b/frontend/src/model/photo.js index 4664e25eb..da4d685f2 100644 --- a/frontend/src/model/photo.js +++ b/frontend/src/model/photo.js @@ -56,6 +56,7 @@ export class Photo extends RestModel { Favorite: false, Private: false, Scan: false, + P360: false, TakenAt: "", TakenAtLocal: "", TakenSrc: "", diff --git a/internal/entity/photo.go b/internal/entity/photo.go index 87d9cdb5c..0e252f645 100644 --- a/internal/entity/photo.go +++ b/internal/entity/photo.go @@ -50,6 +50,7 @@ type Photo struct { PhotoFavorite bool `json:"Favorite" yaml:"Favorite,omitempty"` PhotoPrivate bool `json:"Private" yaml:"Private,omitempty"` PhotoScan bool `json:"Scan" yaml:"Scan,omitempty"` + PhotoP360 bool `gorm:"column:photo_P360" json:"P360" yaml:"P360,omitempty"` TimeZone string `gorm:"type:varbinary(64);" json:"TimeZone" yaml:"-"` PlaceID string `gorm:"type:varbinary(42);index;default:'zz'" json:"PlaceID" yaml:"-"` PlaceSrc string `gorm:"type:varbinary(8);" json:"PlaceSrc" yaml:"PlaceSrc,omitempty"` diff --git a/internal/form/photo.go b/internal/form/photo.go index 9aa27dfe0..2e6b94dcb 100644 --- a/internal/form/photo.go +++ b/internal/form/photo.go @@ -36,6 +36,7 @@ type Photo struct { PhotoPrivate bool `json:"Private"` PhotoReview bool `json:"Review"` PhotoScan bool `json:"Scan"` + PhotoP360 bool `json:"P360"` PhotoAltitude int `json:"Altitude"` PhotoLat float32 `json:"Lat"` PhotoLng float32 `json:"Lng"` diff --git a/internal/query/photo_results.go b/internal/query/photo_results.go index a5c81574f..543c3c6d8 100644 --- a/internal/query/photo_results.go +++ b/internal/query/photo_results.go @@ -40,6 +40,7 @@ type PhotoResult struct { PhotoQuality int `json:"Quality"` PhotoResolution int `json:"Resolution"` PhotoScan bool `json:"Scan"` + PhotoP360 bool `json:"P360"` CameraID uint `json:"CameraID"` // Camera CameraSerial string `json:"CameraSerial,omitempty"` CameraSrc string `json:"CameraSrc,omitempty"`