refactor: remove return from small lambdas
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/900/head
parent
f7de4fe492
commit
1b378334f5
|
@ -281,8 +281,7 @@ export default defineComponent({
|
|||
let prevMonth = 0;
|
||||
|
||||
// Get a new tick
|
||||
const getTick = (dayId: number, isMonth = false, text?: string | number): ITick => {
|
||||
return {
|
||||
const getTick = (dayId: number, isMonth = false, text?: string | number): ITick => ({
|
||||
dayId,
|
||||
isMonth,
|
||||
text,
|
||||
|
@ -291,8 +290,7 @@ export default defineComponent({
|
|||
topF: 0,
|
||||
top: 0,
|
||||
s: false,
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
// Iterate over rows
|
||||
for (const row of this.rows) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -38,14 +38,12 @@ export default defineComponent({
|
|||
CloseIcon,
|
||||
},
|
||||
|
||||
data: () => {
|
||||
return {
|
||||
data: () => ({
|
||||
nativeOpen: false,
|
||||
reducedOpen: false,
|
||||
basename: '',
|
||||
lastKnownWidth: 0,
|
||||
};
|
||||
},
|
||||
}),
|
||||
|
||||
computed: {
|
||||
refs() {
|
||||
|
|
|
@ -1049,13 +1049,11 @@ export default defineComponent({
|
|||
|
||||
// Create justified layout with correct params
|
||||
const justify = getLayout(
|
||||
day.detail.map((p) => {
|
||||
return {
|
||||
day.detail.map((p) => ({
|
||||
width: p.w || this.rowHeight,
|
||||
height: p.h || this.rowHeight,
|
||||
forceSquare: false,
|
||||
};
|
||||
}),
|
||||
})),
|
||||
{
|
||||
rowWidth: this.rowWidth,
|
||||
rowHeight: this.rowHeight,
|
||||
|
|
|
@ -34,13 +34,11 @@ export default defineComponent({
|
|||
error: (error: Error) => true,
|
||||
},
|
||||
|
||||
data: () => {
|
||||
return {
|
||||
data: () => ({
|
||||
dataSrc: BLANK_IMG,
|
||||
_blobLocked: false,
|
||||
_state: 0,
|
||||
};
|
||||
},
|
||||
}),
|
||||
|
||||
watch: {
|
||||
src() {
|
||||
|
|
|
@ -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<NLocation[]>(`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;
|
||||
|
|
|
@ -109,12 +109,10 @@ export default defineComponent({
|
|||
|
||||
mixins: [UserConfig, ModalMixin],
|
||||
|
||||
data: () => {
|
||||
return {
|
||||
data: () => ({
|
||||
photo: null as IPhoto | null,
|
||||
loading: 0,
|
||||
};
|
||||
},
|
||||
}),
|
||||
|
||||
created() {
|
||||
console.assert(!_m.modals.sharePhoto, 'ShareModal created twice');
|
||||
|
|
Loading…
Reference in New Issue