nimiq / crypto-map

The Crypto Map by Nimiq. Explore the world and find places to spend your crypto.
https://map.nimiq.com
6 stars 3 forks source link

New "Compact" layout for Nimiq Pay. UI updates. Bug fixes. #9

Closed onmax closed 6 months ago

onmax commented 6 months ago

Changelog

New layout for Nimiq Pay

Using the query param ?layout=compact, we can activate the new UI for the Nimiq Pay application: https://deploy-preview-9--nimiq-map.netlify.app/?layout=compact

New FAQ modal

Since last month we have added almost 30K locations. The locations have been fetched automatically, but we have not verified them. Therefore, I think it is our responsibility to add a notice/warning. I thought we could do it in the form of a "FAQ" so we can add more content. https://deploy-preview-9--nimiq-map.netlify.app/?modal=faq

Moved Modals

The 'Add new location' and 'Report location' pages have been moved to their own modal instead of their own page.

See diff

| Page | Before | After | |--------|--------|--------| | [New location](https://deploy-preview-9--nimiq-map.netlify.app/?modal=crypto-map&nested=candidate) | ![image](https://github.com/nimiq/crypto-map/assets/22072217/a5843fc4-fa2c-4e83-a9fb-a2bac2a6ed67) | ![image](https://github.com/nimiq/crypto-map/assets/22072217/78598a56-9782-4f35-8b8c-6f7a4dfe2e05) | | [Report Location](http://localhost:5173/@49.48782422002133,8.46794567281281,17z?cryptocity=Kryptostadt+Mannheim&uuid=468520fc-2b42-4e39-a477-8dcfbe33754b&modal=report) | ![image](https://github.com/nimiq/crypto-map/assets/22072217/1a809fe6-1fc4-4978-b8a8-8fcf12ece936) | ![image](https://github.com/nimiq/crypto-map/assets/22072217/93127f7f-0200-4f06-9ba4-d569a7287998) |

Query params everywhere

Everything dynamic can be stored in query parameters: modal, language, location... This allows everything in the application to be copied and shared while maintaining the same state.

See all query params | Parameter | Description | Example | Comments | | ------------ | -------------------- | ------------------------------------------- | ---------------------------------------------------------------------------------- | | Map position | Position of the map | `https://map.nimiq.com/@{lat},{lng},{zoom}` | | uuid | UUID of the location | `https://map.nimiq.com/?uuid={uuid}` | Don't use it with Map position if you don't know the coordinates of the location | | Language | Language of the app | `https://map.nimiq.com/?lang={language}` | Check [supported languages`](./apps/web/src/i18n/i18n-setup.ts) | | Layout | Layout of the app | `https://map.nimiq.com/?layout={layout}` | Check [supported layouts](./apps/web/src/composables/useUI.ts) | | Modal | Modal to show | `https://map.nimiq.com/?modal={modal}` | Check [supported modals](./apps/web/src/components/Modal.vue) | | Nested Modal | Nest modal to show | `https://map.nimiq.com/?nested={nested}` | Check [supported modals](./apps/web/src/components/Modal.vue). Use it with `modal` | | Search | Search to show | `https://map.nimiq.com/?search={search}` | | | Question | Question to show | `https://map.nimiq.com/?q=q-1` | Use it with `faq` modal |

New Cryptocities design

When the user explores the map and is in a Cryptocity, we will display a new banner.

Expand to see details

### Zoom out ![image](https://github.com/nimiq/crypto-map/assets/22072217/f2a3605a-a317-48bd-a65e-b8892aa54e01) ### Zoom in ![image](https://github.com/nimiq/crypto-map/assets/22072217/ebffbb93-abef-43b5-b40d-db9d5f7cf27e)

New icons and Nimiq CSS library

Bug fixes

PS: You can open the settings modal (gear icon top left) and click on the logo with the shift key pressed 🤌

netlify[bot] commented 6 months ago

Deploy Preview for nimiq-map canceled.

Name Link
Latest commit 7d0ad34f2a74e61470b1e22159b78c89141b7ce1
Latest deploy log https://app.netlify.com/sites/nimiq-map/deploys/6641d9828358c70009ada201
sisou commented 6 months ago

Preview doesn't work for me. Stuck on the flash screen. Console says something about TypeError: Cannot read properties of undefined (reading 'slice'), linking to code line

console.log(JSON.stringify({ captchaToken: `${captchaToken.slice(0, 10)}...`, uuid: `${data.captcha_uuid.slice(0, 10)}...` }));

specifically, data.captcha_uuid is undefined

onmax commented 6 months ago

Preview doesn't work for me. Stuck on the flash screen. Console says something about TypeError: Cannot read properties of undefined (reading 'slice'), linking to code line

console.log(JSON.stringify({ captchaToken: `${captchaToken.slice(0, 10)}...`, uuid: `${data.captcha_uuid.slice(0, 10)}...` }));

specifically, data.captcha_uuid is undefined

Should be ok now: deploy-preview-9--nimiq-map.netlify.app/