diff --git a/.env.development b/.env.development index f328914..d5ee466 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,12 @@ # This file is committed to git and should not contain any secrets. -# +# # Vite recommends using .env.local or .env.[mode].local if you need to manage secrets # SEE: https://vite.dev/guide/env-and-mode.html#env-files for more information. # Default NODE_ENV with vite build --mode=test is production NODE_ENV=development + +# OpenStreetMap OAuth +VITE_OSM_CLIENT_ID=jIn8l5mT8FZOGYiIYXG1Yvj_2FZKB9TJ1edZwOJPsRU +VITE_OSM_OAUTH_URL=https://www.openstreetmap.org diff --git a/app/components/user-menu.gjs b/app/components/user-menu.gjs index db689ad..7abacd9 100644 --- a/app/components/user-menu.gjs +++ b/app/components/user-menu.gjs @@ -1,9 +1,13 @@ import Component from '@glimmer/component'; import { action } from '@ember/object'; +import { service } from '@ember/service'; import Icon from '#components/icon'; import { on } from '@ember/modifier'; export default class UserMenuComponent extends Component { + @service storage; + @service osmAuth; + @action connectRS() { this.args.onClose(); @@ -15,6 +19,17 @@ export default class UserMenuComponent extends Component { this.args.storage.disconnect(); } + @action + connectOsm() { + this.args.onClose(); + this.osmAuth.login(); + } + + @action + disconnectOsm() { + this.osmAuth.logout(); + } +