2 Commits

Author SHA1 Message Date
585837cae7 1.10.1 2026-01-27 13:47:09 +07:00
42c5282844 Don't show GMaps link for private bookmarks 2026-01-27 13:46:43 +07:00
5 changed files with 17 additions and 13 deletions

View File

@@ -140,6 +140,8 @@ export default class PlaceDetails extends Component {
} }
get gmapsUrl() { get gmapsUrl() {
const id = this.place.gmapsId || this.place.osmId;
if (!id) return null;
return `https://www.google.com/maps/search/?api=1&query=${this.name}&query=${this.place.lat},${this.place.lon}`; return `https://www.google.com/maps/search/?api=1&query=${this.name}&query=${this.place.lat},${this.place.lon}`;
} }
@@ -259,7 +261,7 @@ export default class PlaceDetails extends Component {
{{#if this.osmUrl}} {{#if this.osmUrl}}
<p class="content-with-icon"> <p class="content-with-icon">
<Icon @name="map" @title="OSM ID" /> <Icon @name="map" />
<span> <span>
<a href={{this.osmUrl}} target="_blank" rel="noopener noreferrer"> <a href={{this.osmUrl}} target="_blank" rel="noopener noreferrer">
OpenStreetMap OpenStreetMap
@@ -268,14 +270,16 @@ export default class PlaceDetails extends Component {
</p> </p>
{{/if}} {{/if}}
<p class="content-with-icon"> {{#if this.gmapsUrl}}
<Icon @name="map" @title="OSM ID" /> <p class="content-with-icon">
<span> <Icon @name="map" />
<a href={{this.gmapsUrl}} target="_blank" rel="noopener noreferrer"> <span>
Google Maps <a href={{this.gmapsUrl}} target="_blank" rel="noopener noreferrer">
</a> Google Maps
</span> </a>
</p> </span>
</p>
{{/if}}
</div> </div>
</div> </div>

View File

@@ -1,6 +1,6 @@
{ {
"name": "marco", "name": "marco",
"version": "1.10.0", "version": "1.10.1",
"private": true, "private": true,
"description": "Unhosted maps app", "description": "Unhosted maps app",
"repository": { "repository": {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -26,7 +26,7 @@
<meta name="msapplication-TileColor" content="#F6E9A6"> <meta name="msapplication-TileColor" content="#F6E9A6">
<meta name="msapplication-TileImage" content="/icons/icon-144.png"> <meta name="msapplication-TileImage" content="/icons/icon-144.png">
<script type="module" crossorigin src="/assets/main-BZ6SjjAk.js"></script> <script type="module" crossorigin src="/assets/main-Dep3TjPE.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-D53xPL_H.css"> <link rel="stylesheet" crossorigin href="/assets/main-D53xPL_H.css">
</head> </head>
<body> <body>