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 Toggle from "./Input/Toggle";
|
||||
import {SubtleButton} from "./Base/SubtleButton";
|
||||
import Title from "./Base/Title";
|
||||
|
||||
export default class AllThemesGui {
|
||||
constructor() {
|
||||
|
|
|
@ -110,6 +110,15 @@ export default class MoreScreen extends Combine {
|
|||
]), {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 {
|
||||
return new VariableUiElement(state.installedThemes.map(customThemes => {
|
||||
if (customThemes.length <= 0) {
|
||||
|
@ -128,20 +137,20 @@ export default class MoreScreen extends Combine {
|
|||
const prefix = "mapcomplete-hidden-theme-"
|
||||
const hiddenThemes = themeOverview["default"].filter(layout => layout.hideFromOverview)
|
||||
const hiddenTotal = hiddenThemes.length
|
||||
|
||||
|
||||
return new Toggle(
|
||||
new VariableUiElement(
|
||||
state.osmConnection.preferencesHandler.preferences.map(allPreferences => {
|
||||
const knownThemes: Set<string> = new Set(Utils.NoNull(Object.keys(allPreferences)
|
||||
.filter(key => key.startsWith(prefix))
|
||||
.map(key => key.substring(prefix.length, key.length - "-enabled".length))));
|
||||
|
||||
if(knownThemes.size === 0){
|
||||
|
||||
if (knownThemes.size === 0) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
const knownThemeDescriptions = hiddenThemes.filter(theme => knownThemes.has(theme.id))
|
||||
.map(theme => MoreScreen.createLinkButton(state, theme)?.SetClass(buttonClass));
|
||||
|
||||
const knownThemeDescriptions = hiddenThemes.filter(theme => knownThemes.has(theme.id))
|
||||
.map(theme => MoreScreen.createLinkButton(state, theme)?.SetClass(buttonClass));
|
||||
|
||||
const knownLayouts = new Combine(knownThemeDescriptions).SetClass(themeListStyle)
|
||||
|
||||
|
@ -189,9 +198,10 @@ export default class MoreScreen extends Combine {
|
|||
}
|
||||
return button;
|
||||
})
|
||||
|
||||
let customGeneratorLink = MoreScreen.createCustomGeneratorButton(state)
|
||||
buttons.splice(0, 0, customGeneratorLink);
|
||||
|
||||
const professional = MoreScreen.CreateProffessionalSerivesButton();
|
||||
const customGeneratorLink = MoreScreen.createCustomGeneratorButton(state)
|
||||
buttons.splice(0, 0, customGeneratorLink, professional);
|
||||
|
||||
return new Combine(buttons)
|
||||
}
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
"it",
|
||||
"id",
|
||||
"nl",
|
||||
"zh_Hant",
|
||||
"hu",
|
||||
"ru"
|
||||
],
|
||||
"maintainer": "Pieter Vander Vennet, Rob Nickerson, Russ Garrett",
|
||||
|
@ -90,7 +92,10 @@
|
|||
"source": {
|
||||
"geoJson": "https://osm-uk-addresses.russss.dev/addresses/{z}/{x}/{y}.json",
|
||||
"osmTags": {
|
||||
"and": ["ref:GB:inspire~*","id!~node/.*"]
|
||||
"and": [
|
||||
"ref:GB:inspire~*",
|
||||
"id!~node/.*"
|
||||
]
|
||||
},
|
||||
"geoJsonZoomLevel": 16,
|
||||
"isOsmCache": false
|
||||
|
@ -311,13 +316,17 @@
|
|||
"freeform": {
|
||||
"key": "addr:unit"
|
||||
},
|
||||
"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>"
|
||||
}
|
||||
"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>"
|
||||
}
|
||||
],
|
||||
"condition": {
|
||||
"or": ["addr:housenumber~*","addr:housename~*"]
|
||||
"or": [
|
||||
"addr:housenumber~*",
|
||||
"addr:housename~*"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -350,7 +359,6 @@
|
|||
"hideInAnswer": "_closest_street:2:name="
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
"id": "uk_addresses_placename",
|
||||
|
@ -454,7 +462,7 @@
|
|||
]
|
||||
},
|
||||
"width": {
|
||||
"render": "8"
|
||||
"render": "3"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -333,6 +333,11 @@
|
|||
},
|
||||
"professional": {
|
||||
"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",
|
||||
"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?",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue