diff --git a/src/components/ScrollerManager.vue b/src/components/ScrollerManager.vue index 0f76baf6..6a59407f 100644 --- a/src/components/ScrollerManager.vue +++ b/src/components/ScrollerManager.vue @@ -281,18 +281,16 @@ export default defineComponent({ let prevMonth = 0; // Get a new tick - const getTick = (dayId: number, isMonth = false, text?: string | number): ITick => { - return { - dayId, - isMonth, - text, - y: 0, - count: 0, - topF: 0, - top: 0, - s: false, - }; - }; + const getTick = (dayId: number, isMonth = false, text?: string | number): ITick => ({ + dayId, + isMonth, + text, + y: 0, + count: 0, + topF: 0, + top: 0, + s: false, + }); // Iterate over rows for (const row of this.rows) { diff --git a/src/components/SelectionManager.vue b/src/components/SelectionManager.vue index 3f006546..3e864b5d 100644 --- a/src/components/SelectionManager.vue +++ b/src/components/SelectionManager.vue @@ -660,9 +660,7 @@ export default defineComponent({ // Clear everything else in front Array.from(this.selection.values()) - .filter((p: IPhoto) => { - return this.isreverse ? p.dayid > photo.dayid : p.dayid < photo.dayid; - }) + .filter((p: IPhoto) => (this.isreverse ? p.dayid > photo.dayid : p.dayid < photo.dayid)) .forEach((photo: IPhoto) => { this.selectPhoto(photo, false, true); updateDaySet.add(photo.dayid); diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index c4af6413..3aabb9b6 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -38,14 +38,12 @@ export default defineComponent({ CloseIcon, }, - data: () => { - return { - nativeOpen: false, - reducedOpen: false, - basename: '', - lastKnownWidth: 0, - }; - }, + data: () => ({ + nativeOpen: false, + reducedOpen: false, + basename: '', + lastKnownWidth: 0, + }), computed: { refs() { diff --git a/src/components/Timeline.vue b/src/components/Timeline.vue index fd976192..eeb42b3c 100644 --- a/src/components/Timeline.vue +++ b/src/components/Timeline.vue @@ -1049,13 +1049,11 @@ export default defineComponent({ // Create justified layout with correct params const justify = getLayout( - day.detail.map((p) => { - return { - width: p.w || this.rowHeight, - height: p.h || this.rowHeight, - forceSquare: false, - }; - }), + day.detail.map((p) => ({ + width: p.w || this.rowHeight, + height: p.h || this.rowHeight, + forceSquare: false, + })), { rowWidth: this.rowWidth, rowHeight: this.rowHeight, diff --git a/src/components/frame/XImg.vue b/src/components/frame/XImg.vue index 95d8ee53..bdac278e 100644 --- a/src/components/frame/XImg.vue +++ b/src/components/frame/XImg.vue @@ -34,13 +34,11 @@ export default defineComponent({ error: (error: Error) => true, }, - data: () => { - return { - dataSrc: BLANK_IMG, - _blobLocked: false, - _state: 0, - }; - }, + data: () => ({ + dataSrc: BLANK_IMG, + _blobLocked: false, + _state: 0, + }), watch: { src() { diff --git a/src/components/modal/EditLocation.vue b/src/components/modal/EditLocation.vue index a32fd60e..b804cb31 100644 --- a/src/components/modal/EditLocation.vue +++ b/src/components/modal/EditLocation.vue @@ -182,12 +182,10 @@ export default defineComponent({ this.loading = true; const q = window.encodeURIComponent(this.searchBar); axios - .get(`https://nominatim.openstreetmap.org/search.php?q=${q}&format=jsonv2`) + .get(`https://nominatim.openstreetmap.org/search.php?q=${q}&format=jsonv2`) .then((response) => { this.loading = false; - this.options = response.data.filter((x: NLocation) => { - return x.lat && x.lon && x.display_name; - }); + this.options = response.data.filter((x) => x.lat && x.lon && x.display_name); }) .catch((error) => { this.loading = false; diff --git a/src/components/modal/ShareModal.vue b/src/components/modal/ShareModal.vue index e57f9e6c..1d618759 100644 --- a/src/components/modal/ShareModal.vue +++ b/src/components/modal/ShareModal.vue @@ -109,12 +109,10 @@ export default defineComponent({ mixins: [UserConfig, ModalMixin], - data: () => { - return { - photo: null as IPhoto | null, - loading: 0, - }; - }, + data: () => ({ + photo: null as IPhoto | null, + loading: 0, + }), created() { console.assert(!_m.modals.sharePhoto, 'ShareModal created twice');