abmp-npm 2.0.19 → 2.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/pages/Home.js +9 -2
package/package.json
CHANGED
package/pages/Home.js
CHANGED
|
@@ -211,9 +211,16 @@ const homePageOnReady = async ({
|
|
|
211
211
|
// 5) Location text
|
|
212
212
|
const mainAddress = getMainAddress(itemData.addressDisplayOption, addresses);
|
|
213
213
|
$item('#location').text = mainAddress || '';
|
|
214
|
+
|
|
215
|
+
// 6) Miles away
|
|
216
|
+
const isNearbyEnabled = _$w('#nearBy').checked;
|
|
214
217
|
const miles = itemData.distance ?? 0;
|
|
215
|
-
|
|
216
|
-
if (
|
|
218
|
+
|
|
219
|
+
if (isNearbyEnabled && miles) {
|
|
220
|
+
$item('#differenceInMiles').text = miles.toFixed(1);
|
|
221
|
+
$item('#milesAwayText').text = 'miles away';
|
|
222
|
+
} else {
|
|
223
|
+
$item('#differenceInMiles').text = '';
|
|
217
224
|
$item('#milesAwayText').text = '';
|
|
218
225
|
}
|
|
219
226
|
|