forked from MapComplete/MapComplete
Move importViewerLinks into separate class, also show them in the user profile
This commit is contained in:
parent
bf4dc57194
commit
c9f6b93add
2 changed files with 28 additions and 18 deletions
|
@ -12,6 +12,7 @@ import Toggle from "./Input/Toggle"
|
|||
import { SubtleButton } from "./Base/SubtleButton"
|
||||
import { VariableUiElement } from "./Base/VariableUIElement"
|
||||
import Svg from "../Svg"
|
||||
import {ImportViewerLinks} from "./BigComponents/UserInformation";
|
||||
|
||||
export default class AllThemesGui {
|
||||
setup() {
|
||||
|
@ -35,21 +36,7 @@ export default class AllThemesGui {
|
|||
.onClick(() => state.osmConnection.AttemptLogin()),
|
||||
state.osmConnection.isLoggedIn
|
||||
),
|
||||
new VariableUiElement(
|
||||
state.osmConnection.userDetails.map((ud) => {
|
||||
if (ud.csCount < Constants.userJourney.importHelperUnlock) {
|
||||
return undefined
|
||||
}
|
||||
return new Combine([
|
||||
new SubtleButton(undefined, Translations.t.importHelper.title, {
|
||||
url: "import_helper.html",
|
||||
}),
|
||||
new SubtleButton(Svg.note_svg(), Translations.t.importInspector.title, {
|
||||
url: "import_viewer.html",
|
||||
}),
|
||||
]).SetClass("p-4 border-2 border-gray-500 m-4 block")
|
||||
})
|
||||
),
|
||||
new ImportViewerLinks(state.osmConnection).SetClass("p-4 border-2 border-gray-500 m-4 block"),
|
||||
Translations.t.general.aboutMapcomplete
|
||||
.Subs({ osmcha_link: Utils.OsmChaLinkFor(7) })
|
||||
.SetClass("link-underline"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue