UX: put text next to QR-code, regenerate all translations

This commit is contained in:
Pieter Vander Vennet 2025-05-30 00:19:02 +02:00
parent a90387c4f3
commit e48fed8d34
21 changed files with 139 additions and 57 deletions

View file

@ -151,15 +151,23 @@ export class SettingsVisualisations {
},
{
funcName: "qr_login",
args: [],
args: [{
name: "text",
doc: "Extra text on the side of the QR-code"
}, {
name: "textClass",
doc: "CSS class of the the side text"
}],
docs: "A QR-code which shares the current URL and adds the login token. Anyone with this login token will have the same permissions as you currently have. Logging out from this session will also log them out",
group: "settings",
constr(state: SpecialVisualizationState, tags: UIEventSource<Record<string, string>>, argument: string[], feature: Feature, layer: LayerConfig): SvelteUIElement {
const shared_oauth_cookie = state.osmConnection.getToken()
const sideText = argument[0]
const sideTextClass = argument[1] ?? ""
return new SvelteUIElement(QrCode, {
state,
tags,
feature,
sideText, sideTextClass,
extraUrlParams: { shared_oauth_cookie }
})
}