forked from MapComplete/MapComplete
Fix runaway link, small issues
This commit is contained in:
parent
7d02ed0af6
commit
65fc2c5de4
2 changed files with 3 additions and 10 deletions
|
@ -19,7 +19,7 @@ export default class ExtraLinkButton extends UIElement {
|
|||
featureSwitchWelcomeMessage: UIEventSource<boolean>, locationControl: UIEventSource<Loc>
|
||||
};
|
||||
|
||||
constructor(state: { featureSwitchWelcomeMessage: UIEventSource<boolean>, locationControl: UIEventSource<Loc>, layoutToUse: { id: string, title: Translations } },
|
||||
constructor(state: { featureSwitchWelcomeMessage: UIEventSource<boolean>, locationControl: UIEventSource<Loc>, layoutToUse: { id: string, title: Translation } },
|
||||
config: ExtraLinkConfig) {
|
||||
super();
|
||||
this.state = state;
|
||||
|
|
|
@ -25,7 +25,6 @@ import Combine from "./Base/Combine";
|
|||
import AddNewMarker from "./BigComponents/AddNewMarker";
|
||||
import FilteredLayer from "../Models/FilteredLayer";
|
||||
import ExtraLinkButton from "./BigComponents/ExtraLinkButton";
|
||||
import {SubtleButton} from "./Base/SubtleButton";
|
||||
|
||||
|
||||
/**
|
||||
|
@ -164,19 +163,13 @@ export default class DefaultGUI {
|
|||
() => new UserBadge(state)
|
||||
),
|
||||
Toggle.If(state.featureSwitchExtraLinkEnabled,
|
||||
() => {
|
||||
if (state.layoutToUse.extraLink.text === undefined) {
|
||||
return Translations.t.general.screenToSmall
|
||||
}
|
||||
return new ExtraLinkButton(state, state.layoutToUse.extraLink);
|
||||
}
|
||||
() => new ExtraLinkButton(state, state.layoutToUse.extraLink)
|
||||
)
|
||||
]).SetClass("flex flex-col")
|
||||
.AttachTo("userbadge")
|
||||
|
||||
const el = state.layoutToUse.extraLink
|
||||
new Combine([
|
||||
new ExtraLinkButton(state, {...state.layoutToUse.extraLink, newTab: true})
|
||||
new ExtraLinkButton(state, {...state.layoutToUse.extraLink, newTab: true, requirements: new Set<"iframe" | "no-iframe" | "welcome-message" | "no-welcome-message">( ) })
|
||||
]).SetClass("flex items-center justify-center normal-background h-full")
|
||||
.AttachTo("on-small-screen")
|
||||
|
||||
|
|
Loading…
Reference in a new issue