forked from MapComplete/MapComplete
Changesets are now kept open and reused to avoid tons of changesets to be created
This commit is contained in:
parent
0051c37494
commit
82f3525907
16 changed files with 162 additions and 270 deletions
|
@ -1,14 +1,11 @@
|
|||
import {UIElement} from "./UIElement";
|
||||
import {UIEventSource} from "./UIEventSource";
|
||||
import L from "leaflet";
|
||||
import {FixedUiElement} from "./Base/FixedUiElement";
|
||||
import {VariableUiElement} from "./Base/VariableUIElement";
|
||||
import Translations from "./i18n/Translations";
|
||||
import {UserDetails} from "../Logic/Osm/OsmConnection";
|
||||
import {State} from "../State";
|
||||
import {PendingChanges} from "./PendingChanges";
|
||||
import {Utils} from "../Utils";
|
||||
// @ts-ignore
|
||||
import {UIEventSource} from "../Logic/UIEventSource";
|
||||
|
||||
/**
|
||||
|
@ -16,7 +13,6 @@ import {UIEventSource} from "../Logic/UIEventSource";
|
|||
*/
|
||||
export class UserBadge extends UIElement {
|
||||
private _userDetails: UIEventSource<UserDetails>;
|
||||
private _pendingChanges: UIElement;
|
||||
private _logout: UIElement;
|
||||
private _homeButton: UIElement;
|
||||
private _languagePicker: UIElement;
|
||||
|
@ -26,7 +22,6 @@ export class UserBadge extends UIElement {
|
|||
constructor() {
|
||||
super(State.state.osmConnection.userDetails);
|
||||
this._userDetails = State.state.osmConnection.userDetails;
|
||||
this._pendingChanges = new PendingChanges();
|
||||
this._languagePicker = Utils.CreateLanguagePicker();
|
||||
this._loginButton = Translations.t.general.loginWithOpenStreetMap.Clone().onClick(() => State.state.osmConnection.AttemptLogin());
|
||||
this._logout = new FixedUiElement("<img src='assets/logout.svg' class='small-userbadge-icon' alt='logout'>")
|
||||
|
@ -116,7 +111,6 @@ export class UserBadge extends UIElement {
|
|||
messageSpan +
|
||||
csCount +
|
||||
this._logout.Render() +
|
||||
this._pendingChanges.Render() +
|
||||
this._languagePicker.Render() +
|
||||
"</div>";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue