forked from MapComplete/MapComplete
Link to 'professional-services'-page
This commit is contained in:
parent
d4d7ab6f3a
commit
1ad3e8cc95
4 changed files with 41 additions and 17 deletions
|
@ -10,6 +10,7 @@ import IndexText from "./BigComponents/IndexText";
|
||||||
import FeaturedMessage from "./BigComponents/FeaturedMessage";
|
import FeaturedMessage from "./BigComponents/FeaturedMessage";
|
||||||
import Toggle from "./Input/Toggle";
|
import Toggle from "./Input/Toggle";
|
||||||
import {SubtleButton} from "./Base/SubtleButton";
|
import {SubtleButton} from "./Base/SubtleButton";
|
||||||
|
import Title from "./Base/Title";
|
||||||
|
|
||||||
export default class AllThemesGui {
|
export default class AllThemesGui {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
|
@ -110,6 +110,15 @@ export default class MoreScreen extends Combine {
|
||||||
]), {url: linkText, newTab: false});
|
]), {url: linkText, newTab: false});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static CreateProffessionalSerivesButton() {
|
||||||
|
const t = Translations.t.professional.indexPage;
|
||||||
|
return new Combine([
|
||||||
|
new Title(t.hook, 4),
|
||||||
|
t.hookMore,
|
||||||
|
new SubtleButton(undefined, t.button, {url: "./professional.html"}),
|
||||||
|
]).SetClass("flex flex-col border border-gray-300 p-2 rounded-lg")
|
||||||
|
}
|
||||||
|
|
||||||
private static createUnofficialThemeList(buttonClass: string, state: UserRelatedState, themeListClasses): BaseUIElement {
|
private static createUnofficialThemeList(buttonClass: string, state: UserRelatedState, themeListClasses): BaseUIElement {
|
||||||
return new VariableUiElement(state.installedThemes.map(customThemes => {
|
return new VariableUiElement(state.installedThemes.map(customThemes => {
|
||||||
if (customThemes.length <= 0) {
|
if (customThemes.length <= 0) {
|
||||||
|
@ -128,20 +137,20 @@ export default class MoreScreen extends Combine {
|
||||||
const prefix = "mapcomplete-hidden-theme-"
|
const prefix = "mapcomplete-hidden-theme-"
|
||||||
const hiddenThemes = themeOverview["default"].filter(layout => layout.hideFromOverview)
|
const hiddenThemes = themeOverview["default"].filter(layout => layout.hideFromOverview)
|
||||||
const hiddenTotal = hiddenThemes.length
|
const hiddenTotal = hiddenThemes.length
|
||||||
|
|
||||||
return new Toggle(
|
return new Toggle(
|
||||||
new VariableUiElement(
|
new VariableUiElement(
|
||||||
state.osmConnection.preferencesHandler.preferences.map(allPreferences => {
|
state.osmConnection.preferencesHandler.preferences.map(allPreferences => {
|
||||||
const knownThemes: Set<string> = new Set(Utils.NoNull(Object.keys(allPreferences)
|
const knownThemes: Set<string> = new Set(Utils.NoNull(Object.keys(allPreferences)
|
||||||
.filter(key => key.startsWith(prefix))
|
.filter(key => key.startsWith(prefix))
|
||||||
.map(key => key.substring(prefix.length, key.length - "-enabled".length))));
|
.map(key => key.substring(prefix.length, key.length - "-enabled".length))));
|
||||||
|
|
||||||
if(knownThemes.size === 0){
|
if (knownThemes.size === 0) {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
const knownThemeDescriptions = hiddenThemes.filter(theme => knownThemes.has(theme.id))
|
const knownThemeDescriptions = hiddenThemes.filter(theme => knownThemes.has(theme.id))
|
||||||
.map(theme => MoreScreen.createLinkButton(state, theme)?.SetClass(buttonClass));
|
.map(theme => MoreScreen.createLinkButton(state, theme)?.SetClass(buttonClass));
|
||||||
|
|
||||||
const knownLayouts = new Combine(knownThemeDescriptions).SetClass(themeListStyle)
|
const knownLayouts = new Combine(knownThemeDescriptions).SetClass(themeListStyle)
|
||||||
|
|
||||||
|
@ -189,9 +198,10 @@ export default class MoreScreen extends Combine {
|
||||||
}
|
}
|
||||||
return button;
|
return button;
|
||||||
})
|
})
|
||||||
|
|
||||||
let customGeneratorLink = MoreScreen.createCustomGeneratorButton(state)
|
const professional = MoreScreen.CreateProffessionalSerivesButton();
|
||||||
buttons.splice(0, 0, customGeneratorLink);
|
const customGeneratorLink = MoreScreen.createCustomGeneratorButton(state)
|
||||||
|
buttons.splice(0, 0, customGeneratorLink, professional);
|
||||||
|
|
||||||
return new Combine(buttons)
|
return new Combine(buttons)
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
"it",
|
"it",
|
||||||
"id",
|
"id",
|
||||||
"nl",
|
"nl",
|
||||||
|
"zh_Hant",
|
||||||
|
"hu",
|
||||||
"ru"
|
"ru"
|
||||||
],
|
],
|
||||||
"maintainer": "Pieter Vander Vennet, Rob Nickerson, Russ Garrett",
|
"maintainer": "Pieter Vander Vennet, Rob Nickerson, Russ Garrett",
|
||||||
|
@ -90,7 +92,10 @@
|
||||||
"source": {
|
"source": {
|
||||||
"geoJson": "https://osm-uk-addresses.russss.dev/addresses/{z}/{x}/{y}.json",
|
"geoJson": "https://osm-uk-addresses.russss.dev/addresses/{z}/{x}/{y}.json",
|
||||||
"osmTags": {
|
"osmTags": {
|
||||||
"and": ["ref:GB:inspire~*","id!~node/.*"]
|
"and": [
|
||||||
|
"ref:GB:inspire~*",
|
||||||
|
"id!~node/.*"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"geoJsonZoomLevel": 16,
|
"geoJsonZoomLevel": 16,
|
||||||
"isOsmCache": false
|
"isOsmCache": false
|
||||||
|
@ -311,13 +316,17 @@
|
||||||
"freeform": {
|
"freeform": {
|
||||||
"key": "addr:unit"
|
"key": "addr:unit"
|
||||||
},
|
},
|
||||||
"mappings": [{
|
"mappings": [
|
||||||
"if": "addr:unit=",
|
{
|
||||||
"then": "This address has no subparts. <div class='subtle'>Subparts are e.g. appartment numbers, extra letters or numbers if there are multiple letterboxes, ...</div>"
|
"if": "addr:unit=",
|
||||||
}
|
"then": "This address has no subparts. <div class='subtle'>Subparts are e.g. appartment numbers, extra letters or numbers if there are multiple letterboxes, ...</div>"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"condition": {
|
"condition": {
|
||||||
"or": ["addr:housenumber~*","addr:housename~*"]
|
"or": [
|
||||||
|
"addr:housenumber~*",
|
||||||
|
"addr:housename~*"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -350,7 +359,6 @@
|
||||||
"hideInAnswer": "_closest_street:2:name="
|
"hideInAnswer": "_closest_street:2:name="
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "uk_addresses_placename",
|
"id": "uk_addresses_placename",
|
||||||
|
@ -454,7 +462,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"width": {
|
"width": {
|
||||||
"render": "8"
|
"render": "3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -333,6 +333,11 @@
|
||||||
},
|
},
|
||||||
"professional": {
|
"professional": {
|
||||||
"backToMapcomplete": "Back to the theme overview",
|
"backToMapcomplete": "Back to the theme overview",
|
||||||
|
"indexPage": {
|
||||||
|
"hook": "Need professional support?",
|
||||||
|
"hookMore": "We can help with setting up surveys, data imports and OpenStreetMap-consultancy",
|
||||||
|
"button": "Discover our services"
|
||||||
|
},
|
||||||
"title": "Professional support with MapComplete",
|
"title": "Professional support with MapComplete",
|
||||||
"intro": "The developer of MapComplete offers professional support. This document outlines some of the possibilities, common questions and the boundaries of MapComplete",
|
"intro": "The developer of MapComplete offers professional support. This document outlines some of the possibilities, common questions and the boundaries of MapComplete",
|
||||||
"osmTitle": "What can OpenStreetMap and MapComplete do for your organisation?",
|
"osmTitle": "What can OpenStreetMap and MapComplete do for your organisation?",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue