Compare commits

..

8 Commits

Author SHA1 Message Date
4c4a53ae42 1.21.2
All checks were successful
CI / Lint (push) Successful in 30s
CI / Test (push) Successful in 55s
2026-05-05 07:18:37 +02:00
a240a5d199 Serve dev on all IPs 2026-05-05 07:17:30 +02:00
0332cf4c3c Merge pull request 'Hide quick-search pills on low zoom levels' (#53) from ui/pills_on_zoom into master
All checks were successful
CI / Lint (push) Successful in 30s
CI / Test (push) Successful in 54s
Reviewed-on: #53
2026-05-05 05:14:54 +00:00
59c447fe1f Hide quick-search pills on low zoom levels
All checks were successful
CI / Lint (pull_request) Successful in 30s
CI / Test (pull_request) Successful in 56s
Release Drafter / Update release notes draft (pull_request) Successful in 7s
2026-05-05 07:10:28 +02:00
1140ecfe41 Add buttons for opening signer app, copying connect link
All checks were successful
CI / Lint (push) Successful in 49s
CI / Test (push) Successful in 59s
2026-05-05 07:02:08 +02:00
60936ed2f5 1.21.1
All checks were successful
CI / Lint (push) Successful in 32s
CI / Test (push) Successful in 56s
2026-04-27 21:51:55 +01:00
ca82a029bc Fix app menu section layout 2026-04-27 21:50:47 +01:00
0630aed73d Fix modals 2026-04-27 21:50:36 +01:00
17 changed files with 94 additions and 17 deletions

View File

@@ -15,6 +15,7 @@ export default class AppHeaderComponent extends Component {
@service settings; @service settings;
@service nostrAuth; @service nostrAuth;
@service nostrData; @service nostrData;
@service mapUi;
@tracked isUserMenuOpen = false; @tracked isUserMenuOpen = false;
@tracked searchQuery = ''; @tracked searchQuery = '';
@@ -22,6 +23,11 @@ export default class AppHeaderComponent extends Component {
return !!this.searchQuery; return !!this.searchQuery;
} }
get showQuickSearch() {
const zoom = this.mapUi.currentZoom ?? 13;
return this.settings.showQuickSearchButtons && zoom >= 12;
}
@action @action
toggleUserMenu() { toggleUserMenu() {
this.isUserMenuOpen = !this.isUserMenuOpen; this.isUserMenuOpen = !this.isUserMenuOpen;
@@ -54,7 +60,7 @@ export default class AppHeaderComponent extends Component {
/> />
</div> </div>
{{#if this.settings.showQuickSearchButtons}} {{#if this.showQuickSearch}}
<div class="header-center {{if this.hasQuery 'searching'}}"> <div class="header-center {{if this.hasQuery 'searching'}}">
<CategoryChips @onSelect={{this.handleChipSelect}} /> <CategoryChips @onSelect={{this.handleChipSelect}} />
</div> </div>

View File

@@ -15,7 +15,7 @@ export default class AppMenuSettingsApis extends Component {
<Icon @name="server" @size={{20}} /> <Icon @name="server" @size={{20}} />
<span>API Providers</span> <span>API Providers</span>
</summary> </summary>
<div class="details-content"> <div class="details-content form-layout">
<div class="form-group"> <div class="form-group">
<label for="overpass-api">Overpass API Provider</label> <label for="overpass-api">Overpass API Provider</label>
<select <select

View File

@@ -14,7 +14,7 @@ export default class AppMenuSettingsMapUi extends Component {
<Icon @name="map" @size={{20}} /> <Icon @name="map" @size={{20}} />
<span>Map & UI</span> <span>Map & UI</span>
</summary> </summary>
<div class="details-content"> <div class="details-content form-layout">
<div class="form-group"> <div class="form-group">
<label for="show-quick-search">Quick search buttons visible</label> <label for="show-quick-search">Quick search buttons visible</label>
<select <select

View File

@@ -108,7 +108,7 @@ export default class AppMenuSettingsNostr extends Component {
<Icon @name="zap" @size={{20}} /> <Icon @name="zap" @size={{20}} />
<span>Nostr</span> <span>Nostr</span>
</summary> </summary>
<div class="details-content"> <div class="details-content form-layout">
<div class="form-group"> <div class="form-group">
<label for="nostr-photo-fallback-uploads">Upload photos to fallback <label for="nostr-photo-fallback-uploads">Upload photos to fallback
servers</label> servers</label>

View File

@@ -284,6 +284,7 @@ export default class MapComponent extends Component {
// Initialize the UI service with the map center // Initialize the UI service with the map center
const initialCenter = toLonLat(view.getCenter()); const initialCenter = toLonLat(view.getCenter());
this.mapUi.updateCenter(initialCenter[1], initialCenter[0]); this.mapUi.updateCenter(initialCenter[1], initialCenter[0]);
this.mapUi.updateZoom(view.getZoom());
apply(this.mapInstance, 'https://tiles.openfreemap.org/styles/liberty', { apply(this.mapInstance, 'https://tiles.openfreemap.org/styles/liberty', {
webfonts: 'data:text/css,', webfonts: 'data:text/css,',
@@ -1046,6 +1047,7 @@ export default class MapComponent extends Component {
const view = this.mapInstance.getView(); const view = this.mapInstance.getView();
const center = toLonLat(view.getCenter()); const center = toLonLat(view.getCenter());
this.mapUi.updateCenter(center[1], center[0]); this.mapUi.updateCenter(center[1], center[0]);
this.mapUi.updateZoom(view.getZoom());
// If in creation mode, update the coordinates in the service AND the URL // If in creation mode, update the coordinates in the service AND the URL
if (this.mapUi.isCreating) { if (this.mapUi.isCreating) {

View File

@@ -41,6 +41,40 @@ export default class NostrConnectComponent extends Component {
} }
} }
@action
async copyConnectUri() {
const text = this.nostrAuth.connectUri;
try {
if (navigator.clipboard && window.isSecureContext) {
await navigator.clipboard.writeText(text);
} else {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.top = '0';
textArea.style.left = '0';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.focus();
textArea.select();
const successful = document.execCommand('copy');
document.body.removeChild(textArea);
if (!successful) {
throw new Error('Fallback copy failed');
}
}
this.toast.show('Connection link copied to clipboard');
} catch (err) {
console.error('Failed to copy text: ', err);
alert('Failed to copy link');
}
}
<template> <template>
<div class="nostr-connect-modal"> <div class="nostr-connect-modal">
<h2>Connect with Nostr</h2> <h2>Connect with Nostr</h2>
@@ -59,7 +93,7 @@ export default class NostrConnectComponent extends Component {
class="btn btn-outline" class="btn btn-outline"
type="button" type="button"
disabled disabled
title="No Nostr extension found in your browser." title="No Nostr extension found in your browser"
> >
Browser Extension (Not Found) Browser Extension (Not Found)
</button> </button>
@@ -79,9 +113,20 @@ export default class NostrConnectComponent extends Component {
{{#if this.nostrAuth.isMobile}} {{#if this.nostrAuth.isMobile}}
<p>Waiting for you to approve the connection in your mobile signer <p>Waiting for you to approve the connection in your mobile signer
app...</p> app...</p>
<div class="mobile-connect-actions">
<a href={{this.nostrAuth.connectUri}} class="btn btn-primary">
Open Signer App
</a>
<button
class="btn btn-outline"
type="button"
{{on "click" this.copyConnectUri}}
>
Copy Connection Link
</button>
</div>
{{else}} {{else}}
<p>Scan this QR code with a compatible Nostr signer app (like <p>Scan this QR code with a Nostr signer app (like Amber):</p>
Amber):</p>
<div class="qr-code-container"> <div class="qr-code-container">
<canvas {{qrCode this.nostrAuth.connectUri}}></canvas> <canvas {{qrCode this.nostrAuth.connectUri}}></canvas>
</div> </div>

View File

@@ -29,6 +29,14 @@ export default class PlaceDetails extends Component {
@tracked isConnectingNostr = false; @tracked isConnectingNostr = false;
@tracked isGalleryOpen = false; @tracked isGalleryOpen = false;
@tracked selectedGalleryPhoto = null; @tracked selectedGalleryPhoto = null;
@tracked isPhotoUploadModalOpen = false;
@tracked isNostrConnectModalOpen = false;
@tracked newlyUploadedPhotoId = null;
@action
handleUploadStateChange(isActive) {
this.isPhotoUploadActive = isActive;
}
@action @action
openPhotoUploadModal(e) { openPhotoUploadModal(e) {

View File

@@ -11,6 +11,7 @@ export default class MapUiService extends Service {
@tracked returnToSearch = false; @tracked returnToSearch = false;
@tracked currentCenter = null; @tracked currentCenter = null;
@tracked currentBounds = null; @tracked currentBounds = null;
@tracked currentZoom = null;
@tracked searchBoxHasFocus = false; @tracked searchBoxHasFocus = false;
@tracked selectionOptions = {}; @tracked selectionOptions = {};
@tracked preventNextZoom = false; @tracked preventNextZoom = false;
@@ -81,6 +82,10 @@ export default class MapUiService extends Service {
this.currentCenter = { lat, lon }; this.currentCenter = { lat, lon };
} }
updateZoom(zoom) {
this.currentZoom = zoom;
}
updateBounds(bounds) { updateBounds(bounds) {
this.currentBounds = bounds; this.currentBounds = bounds;
} }

View File

@@ -594,6 +594,9 @@ body {
padding: 0 1.4rem 1rem; padding: 0 1.4rem 1rem;
animation: details-slide-down 0.2s ease-out; animation: details-slide-down 0.2s ease-out;
font-size: 0.9rem; font-size: 0.9rem;
}
.sidebar-content details .details-content.form-layout {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 16px; gap: 16px;
@@ -1081,6 +1084,7 @@ abbr[title] {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 0.5rem; gap: 0.5rem;
text-decoration: none;
} }
.btn:disabled { .btn:disabled {
@@ -1777,6 +1781,13 @@ button.create-place {
margin-top: 1.5rem; margin-top: 1.5rem;
} }
.mobile-connect-actions {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin-top: 1rem;
}
.nostr-connect-status { .nostr-connect-status {
margin-top: 1.5rem; margin-top: 1.5rem;
text-align: center; text-align: center;

View File

@@ -1,6 +1,6 @@
{ {
"name": "marco", "name": "marco",
"version": "1.21.0", "version": "1.21.2",
"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

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,8 +39,8 @@
<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-B30qTale.js"></script> <script type="module" crossorigin src="/assets/main-CjxGWim8.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-48yHGHPo.css"> <link rel="stylesheet" crossorigin href="/assets/main-M5C-HUrg.css">
</head> </head>
<body> <body>
</body> </body>

View File

@@ -4,7 +4,7 @@ import { babel } from '@rollup/plugin-babel';
export default defineConfig({ export default defineConfig({
server: { server: {
host: '127.0.0.1', host: '0.0.0.0',
}, },
plugins: [ plugins: [
ember(), ember(),