forked from MapComplete/MapComplete
Add import from notes functionality
This commit is contained in:
parent
2697feebe0
commit
6999a73d44
41 changed files with 545 additions and 1043 deletions
|
@ -4,46 +4,33 @@ import LanguagePicker from "../LanguagePicker";
|
|||
import Translations from "../i18n/Translations";
|
||||
import Toggle from "../Input/Toggle";
|
||||
import {SubtleButton} from "../Base/SubtleButton";
|
||||
import Svg from "../../Svg";
|
||||
import {UIEventSource} from "../../Logic/UIEventSource";
|
||||
import {LoginToggle} from "../Popup/LoginButton";
|
||||
|
||||
export default class ThemeIntroductionPanel extends Combine {
|
||||
|
||||
constructor(isShown: UIEventSource<boolean>) {
|
||||
const t = Translations.t.general
|
||||
const layout = State.state.layoutToUse
|
||||
|
||||
const languagePicker = LanguagePicker.CreateLanguagePicker(layout.language, Translations.t.general.pickLanguage.Clone())
|
||||
const languagePicker = LanguagePicker.CreateLanguagePicker(layout.language, t.pickLanguage.Clone())
|
||||
|
||||
const toTheMap = new SubtleButton(
|
||||
undefined,
|
||||
Translations.t.general.openTheMap.Clone().SetClass("text-xl font-bold w-full text-center")
|
||||
t.openTheMap.Clone().SetClass("text-xl font-bold w-full text-center")
|
||||
).onClick(() => {
|
||||
isShown.setData(false)
|
||||
}).SetClass("only-on-mobile")
|
||||
|
||||
const plzLogIn =
|
||||
new SubtleButton(
|
||||
Svg.osm_logo_ui(),
|
||||
|
||||
new Combine([Translations.t.general.loginWithOpenStreetMap
|
||||
.Clone().SetClass("text-xl font-bold"),
|
||||
Translations.t.general.loginOnlyNeededToEdit.Clone().SetClass("font-bold")]
|
||||
).SetClass("flex flex-col text-center w-full")
|
||||
)
|
||||
.onClick(() => {
|
||||
State.state.osmConnection.AttemptLogin()
|
||||
});
|
||||
|
||||
|
||||
const welcomeBack = Translations.t.general.welcomeBack.Clone();
|
||||
|
||||
|
||||
const loginStatus =
|
||||
new Toggle(
|
||||
new Toggle(
|
||||
welcomeBack,
|
||||
plzLogIn,
|
||||
State.state.osmConnection.isLoggedIn
|
||||
new LoginToggle(
|
||||
t.welcomeBack,
|
||||
new Combine([Translations.t.general.loginWithOpenStreetMap.SetClass("text-xl font-bold"),
|
||||
Translations.t.general.loginOnlyNeededToEdit.Clone().SetClass("font-bold")]
|
||||
).SetClass("flex flex-col"),
|
||||
State.state
|
||||
),
|
||||
undefined,
|
||||
State.state.featureSwitchUserbadge
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue