forked from MapComplete/MapComplete
Feature(grb): add popup feature to validate e.g. a user profile
This commit is contained in:
parent
c3d905b26a
commit
ecd8f5e1da
11 changed files with 247 additions and 64 deletions
|
@ -111,12 +111,27 @@ export class SettingsVisualisations {
|
|||
},
|
||||
{
|
||||
funcName: "login_button",
|
||||
args: [],
|
||||
args: [{
|
||||
name: "force",
|
||||
doc: "Always show this button, even if logged in"
|
||||
}, {
|
||||
name: "message",
|
||||
doc: "Message to display on the button"
|
||||
}],
|
||||
docs: "Show a login button",
|
||||
needsUrls: [],
|
||||
group: "settings",
|
||||
constr(state: SpecialVisualizationState): SvelteUIElement {
|
||||
return new SvelteUIElement(LoginButton, { osmConnection: state.osmConnection })
|
||||
constr(state: SpecialVisualizationState, _, args): SvelteUIElement {
|
||||
const force = args[0].toLowerCase()
|
||||
let msg = args[1]
|
||||
if (msg === "") {
|
||||
msg = undefined
|
||||
}
|
||||
return new SvelteUIElement(LoginButton, {
|
||||
osmConnection: state.osmConnection,
|
||||
msg,
|
||||
forceShow: force === "yes" || force === "true"
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue