Various small fixes to translations, login flow, docs, ...

This commit is contained in:
Pieter Vander Vennet 2020-08-25 00:10:48 +02:00
parent 1805f644ea
commit e320f1af0c
9 changed files with 69 additions and 46 deletions

View file

@ -1,6 +1,9 @@
import {LayerDefinition} from "./LayerDefinition";
import {UIElement} from "../UI/UIElement";
import Translations from "../UI/i18n/Translations";
import Combine from "../UI/Base/Combine";
import {FixedUiElement} from "../UI/Base/FixedUiElement";
import {State} from "../State";
/**
* A layout is a collection of settings of the global view (thus: welcome text, title, selection of layers).
@ -66,7 +69,12 @@ export class Layout {
startLat: number,
startLon: number,
welcomeMessage: UIElement | string,
gettingStartedPlzLogin: UIElement | string = Translations.t.general.getStarted,
gettingStartedPlzLogin: UIElement | string = new Combine([
Translations.t.general.getStartedLogin
.SetClass("soft")
.onClick(() => {State.state.osmConnection.AttemptLogin()}),
Translations.t.general.getStartedNewAccount
]),
welcomeBackMessage: UIElement | string = Translations.t.general.welcomeBack,
welcomeTail: UIElement | string = ""
) {

View file

@ -16,6 +16,7 @@ import {State} from "../State";
import {TagRenderingOptions} from "./TagRenderingOptions";
import Translation from "../UI/i18n/Translation";
import {SubtleButton} from "../UI/Base/SubtleButton";
import Combine from "../UI/Base/Combine";
export class TagRendering extends UIElement implements TagDependantUIElement {
@ -393,12 +394,14 @@ export class TagRendering extends UIElement implements TagDependantUIElement {
if (this.IsQuestioning() && !State.state?.osmConnection?.userDetails?.data?.loggedIn) {
const question =
this.ApplyTemplate(this._question).Render();
this.ApplyTemplate(this._question).SetClass('question-text');
return "<div class='question'>" +
"<span class='question-text'>" + question + "</span>" +
"<br/>" +
"<span class='login-button-friendly'>" + this._friendlyLogin.Render() + "</span>" +
"</div>"
new Combine([
question,
"<br/>",
this._questionElement.Render(),
"<span class='login-button-friendly'>" + this._friendlyLogin.Render() + "</span>",
]).Render() + "</div>";
}
if (this.IsQuestioning() || this._editMode.data) {