Compare commits

...

6 Commits

Author SHA1 Message Date
5c71523d90 1.19.1
All checks were successful
CI / Lint (push) Successful in 30s
CI / Test (push) Successful in 45s
2026-04-13 13:17:52 +04:00
bea1b97fb7 Update remotestorage-widget 2026-04-13 13:16:54 +04:00
6ba1cf31cf Show RS widget when Unauthorized error received
Allows the user to re-auth via the widget
2026-04-13 13:16:49 +04:00
9cdd021cda 1.19.0
All checks were successful
CI / Lint (push) Successful in 28s
CI / Test (push) Successful in 43s
2026-04-12 16:17:22 +04:00
ef53870b35 Merge pull request 'Add mobile numbers and WhatsApp links to place details' (#41) from feature/place_details into master
All checks were successful
CI / Lint (push) Successful in 28s
CI / Test (push) Successful in 44s
Reviewed-on: #41
2026-04-12 12:15:25 +00:00
918a794784 Fix lint errors
All checks were successful
CI / Lint (pull_request) Successful in 30s
CI / Test (pull_request) Successful in 43s
Release Drafter / Update release notes draft (pull_request) Successful in 8s
2026-04-12 16:10:05 +04:00
10 changed files with 42 additions and 28 deletions

View File

@@ -142,10 +142,12 @@ export default class PlaceDetails extends Component {
if (type === 'phone') {
return htmlSafe(
parts.map((p) => {
const safeTel = p.replace(/[\s-]+/g, '');
return `<a href="tel:${safeTel}">${p}</a>`;
}).join('<br>')
parts
.map((p) => {
const safeTel = p.replace(/[\s-]+/g, '');
return `<a href="tel:${safeTel}">${p}</a>`;
})
.join('<br>')
);
}
@@ -157,10 +159,12 @@ export default class PlaceDetails extends Component {
if (type === 'whatsapp') {
return htmlSafe(
parts.map((p) => {
const safeTel = p.replace(/[\s-]+/g, '');
return `<a href="https://wa.me/${safeTel}" target="_blank" rel="noopener noreferrer">${p}</a>`;
}).join('<br>')
parts
.map((p) => {
const safeTel = p.replace(/[\s-]+/g, '');
return `<a href="https://wa.me/${safeTel}" target="_blank" rel="noopener noreferrer">${p}</a>`;
})
.join('<br>')
);
}

View File

@@ -11,7 +11,7 @@ export default class UserMenuComponent extends Component {
@action
connectRS() {
this.args.onClose();
this.args.storage.connect();
this.args.storage.showConnectWidget();
}
@action

View File

@@ -46,6 +46,14 @@ export default class StorageService extends Service {
// console.debug('[rs] client ready');
});
this.rs.on('error', (error) => {
if (!error) return;
console.info('[rs] Error —', `${error.name}: ${error.message}`);
if (error.name === 'Unauthorized') {
this.showConnectWidget();
}
});
this.rs.on('connected', () => {
this.connected = true;
this.userAddress = this.rs.remote.userAddress;
@@ -445,7 +453,7 @@ export default class StorageService extends Service {
}
@action
connect() {
showConnectWidget() {
this.isWidgetOpen = true;
// Check if widget is already attached

View File

@@ -1,6 +1,6 @@
{
"name": "marco",
"version": "1.18.4",
"version": "1.19.1",
"private": true,
"description": "Unhosted maps app",
"repository": {
@@ -87,7 +87,7 @@
"prettier-plugin-ember-template-tag": "^2.1.2",
"qunit": "^2.25.0",
"qunit-dom": "^3.5.0",
"remotestorage-widget": "^1.8.0",
"remotestorage-widget": "^1.8.1",
"remotestoragejs": "2.0.0-beta.8",
"sinon": "^21.0.1",
"stylelint": "^16.26.1",

10
pnpm-lock.yaml generated
View File

@@ -166,8 +166,8 @@ importers:
specifier: ^3.5.0
version: 3.5.0
remotestorage-widget:
specifier: ^1.8.0
version: 1.8.0
specifier: ^1.8.1
version: 1.8.1
remotestoragejs:
specifier: 2.0.0-beta.8
version: 2.0.0-beta.8
@@ -4564,8 +4564,8 @@ packages:
resolution: {integrity: sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==}
hasBin: true
remotestorage-widget@1.8.0:
resolution: {integrity: sha512-l8AE2npC2nNkC8bAU6WhWO5Wl4exaXbE2yR82s5Oiqg6h0KN2mYwvLLTQGkp6mSmZTA86e7XaOcNp4lXS8CsBA==}
remotestorage-widget@1.8.1:
resolution: {integrity: sha512-HxNu2VvIRW3wzkf5fLEzs56ySQ7+YQbRqyp3CKvmw/G+zKhRsmj06HtFoAcm3B14/nJh2SOAv3LyfKuXfUsKPw==}
remotestoragejs@2.0.0-beta.8:
resolution: {integrity: sha512-rtyHTG2VbtiKTRmbwjponRf5VTPJMcHv/ijNid1zX48C0Z0F8ZCBBfkKD2QCxTQyQvCupkWNy3wuIu4HE+AEng==}
@@ -10648,7 +10648,7 @@ snapshots:
dependencies:
jsesc: 3.1.0
remotestorage-widget@1.8.0: {}
remotestorage-widget@1.8.1: {}
remotestoragejs@2.0.0-beta.8:
dependencies:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -39,7 +39,7 @@
<meta name="msapplication-TileColor" content="#F6E9A6">
<meta name="msapplication-TileImage" content="/icons/icon-144.png">
<script type="module" crossorigin src="/assets/main-0ky279gM.js"></script>
<script type="module" crossorigin src="/assets/main-BVEi_-zb.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-BF2Ls-fG.css">
</head>
<body>

View File

@@ -318,15 +318,17 @@ module('Integration | Component | place-details', function (hooks) {
assert.ok(whatsappBlock, 'WhatsApp block is rendered');
const links = whatsappBlock.querySelectorAll('a[href^="https://wa.me/"]');
assert.strictEqual(
links.length,
2,
'Rendered exactly 2 WhatsApp links'
);
assert.strictEqual(links.length, 2, 'Rendered exactly 2 WhatsApp links');
// Verify it stripped the dashes and spaces for the wa.me URL
assert.strictEqual(links[0].getAttribute('href'), 'https://wa.me/+44987654321');
assert.strictEqual(links[1].getAttribute('href'), 'https://wa.me/+12345678900');
assert.strictEqual(
links[0].getAttribute('href'),
'https://wa.me/+44987654321'
);
assert.strictEqual(
links[1].getAttribute('href'),
'https://wa.me/+12345678900'
);
// Verify it kept the dashes and spaces for the visible text
assert.dom(links[0]).hasText('+44 987 654 321');