forked from MapComplete/MapComplete
		
	First fixes for charging station theme
This commit is contained in:
		
							parent
							
								
									f55e5cf26c
								
							
						
					
					
						commit
						2742f03ebf
					
				
					 2 changed files with 747 additions and 380 deletions
				
			
		
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
				
			
			@ -72,13 +72,17 @@ function run(file, protojson) {
 | 
			
		|||
    for (let i = 0; i < entries.length; i++) {
 | 
			
		||||
        const e = entries[i];
 | 
			
		||||
        const txt = {
 | 
			
		||||
            en: `<div class='flex'><img class='w-12 mx-4' src='./assets/layers/charging_station/${e.image}'/> <span>${e.description.get("en")}</span></div>`,
 | 
			
		||||
            nl: `<div class='flex'><img class='w-12 mx-4' src='./assets/layers/charging_station/${e.image}'/> <span>${e.description.get("nl")}</span></div>`
 | 
			
		||||
            en: e.description.get("en"),
 | 
			
		||||
            nl: e.description.get("nl")
 | 
			
		||||
        }
 | 
			
		||||
        const json = {
 | 
			
		||||
            if: `${e.key}=1`,
 | 
			
		||||
            ifnot: `${e.key}=`,
 | 
			
		||||
            then: txt,
 | 
			
		||||
            icon:{
 | 
			
		||||
                path:"./assets/layers/charging_station/" + e.image,
 | 
			
		||||
                class:"medium"
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (e.countryWhiteList.length > 0 && e.countryBlackList.length > 0) {
 | 
			
		||||
| 
						 | 
				
			
			@ -125,7 +129,11 @@ function run(file, protojson) {
 | 
			
		|||
                and:Utils.NoEmpty( [`${e.key}~*`, `${e.key}!=1`, ...e.extraVisualisationCondition.split(";")])
 | 
			
		||||
            },
 | 
			
		||||
            then: txt,
 | 
			
		||||
            hideInAnswer: true
 | 
			
		||||
            hideInAnswer: true,
 | 
			
		||||
            icon:{
 | 
			
		||||
                path: e.image,
 | 
			
		||||
                class:"medium"
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        overview_question_answers.push(no_ask_json)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -170,8 +178,12 @@ function run(file, protojson) {
 | 
			
		|||
                return {
 | 
			
		||||
                    if: `socket:${e.key}:voltage=${voltage} V`,
 | 
			
		||||
                    then: {
 | 
			
		||||
                        en: `${descrWithImage_en} outputs ${voltage} volt`,
 | 
			
		||||
                        nl: `${descrWithImage_nl} heeft een spanning van ${voltage} volt`
 | 
			
		||||
                        en: `${e.description.get("en")} outputs ${voltage} volt`,
 | 
			
		||||
                        nl: `${e.description.get("nl")} heeft een spanning van ${voltage} volt`
 | 
			
		||||
                    },
 | 
			
		||||
                    icon: {
 | 
			
		||||
                        path: `./assets/layers/charging_station/${e.image}`,
 | 
			
		||||
                        class:"medium"
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }),
 | 
			
		||||
| 
						 | 
				
			
			@ -200,8 +212,12 @@ function run(file, protojson) {
 | 
			
		|||
                return {
 | 
			
		||||
                    if: `socket:${e.key}:current=${current} A`,
 | 
			
		||||
                    then: {
 | 
			
		||||
                        en: `${descrWithImage_en} outputs at most ${current} A`,
 | 
			
		||||
                        nl: `${descrWithImage_nl} levert een stroom van maximaal ${current} A`
 | 
			
		||||
                        en: `${e.description.get("en")} outputs at most ${current} A`,
 | 
			
		||||
                        nl: `${e.description.get("nl")} levert een stroom van maximaal ${current} A`
 | 
			
		||||
                    },
 | 
			
		||||
                    icon: {
 | 
			
		||||
                        path: `./assets/layers/charging_station/${e.image}`,
 | 
			
		||||
                        class:"medium"
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }),
 | 
			
		||||
| 
						 | 
				
			
			@ -230,8 +246,12 @@ function run(file, protojson) {
 | 
			
		|||
                return {
 | 
			
		||||
                    if: `socket:${e.key}:output=${output}`,
 | 
			
		||||
                    then: {
 | 
			
		||||
                        en: `${descrWithImage_en} outputs at most ${output}`,
 | 
			
		||||
                        nl: `${descrWithImage_nl} levert een vermogen van maximaal ${output}`
 | 
			
		||||
                        en: `${e.description.get("en")} outputs at most ${output} A`,
 | 
			
		||||
                        nl: `${e.description.get("nl")} levert een vermogen van maximaal ${output} A`
 | 
			
		||||
                    },
 | 
			
		||||
                    icon: {
 | 
			
		||||
                        path: `./assets/layers/charging_station/${e.image}`,
 | 
			
		||||
                        class:"medium"
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue