Fix widths

This commit is contained in:
Pieter Vander Vennet 2020-10-10 14:09:12 +02:00
parent b8a1683191
commit 5e220ccead
6 changed files with 33 additions and 62 deletions

View file

@ -3,6 +3,7 @@ import {UIElement} from "../UI/UIElement";
import Translations from "../UI/i18n/Translations";
import Combine from "../UI/Base/Combine";
import State from "../State";
import Translation from "../UI/i18n/Translation";
/**
* A layout is a collection of settings of the global view (thus: welcome text, title, selection of layers).
@ -50,12 +51,12 @@ export class Layout {
constructor(
id: string,
supportedLanguages: string[],
title: UIElement | string,
title: Translation | string,
layers: (LayerDefinition | string)[],
startzoom: number,
startLat: number,
startLon: number,
welcomeMessage: UIElement | string,
welcomeMessage: Translation | string,
gettingStartedPlzLogin: UIElement | string = new Combine([
Translations.t.general.getStartedLogin
.SetClass("soft")
@ -66,7 +67,7 @@ export class Layout {
welcomeTail: UIElement | string = "",
) {
this.supportedLanguages = supportedLanguages;
this.title = Translations.W(title)
this.title = Translations.WT(title)
this.startLon = startLon;
this.startLat = startLat;
this.startzoom = startzoom;

View file

@ -200,7 +200,6 @@ export default class State {
);
this.installedThemes = this.osmConnection.preferencesHandler.preferences.map<{ layout: Layout, definition: string }[]>(allPreferences => {
const installedThemes: { layout: Layout, definition: string }[] = [];
if (allPreferences === undefined) {
@ -209,7 +208,7 @@ export default class State {
for (const allPreferencesKey in allPreferences) {
const themename = allPreferencesKey.match(/^mapcomplete-installed-theme-(.*)-combined-length$/);
if (themename && themename[1] !== "") {
const customLayout = State.state.osmConnection.GetLongPreference("installed-theme-" + themename[1]);
const customLayout = self.osmConnection.GetLongPreference("installed-theme-" + themename[1]);
if(customLayout.data === undefined){
console.log("No data defined for ", themename[1]);
continue;

View file

@ -48,7 +48,6 @@ export default class Translation extends UIElement {
for (const knownSpecial of knownSpecials) {
const combined = [];
const matched = template.match(`(.*){${knownSpecial.funcName}\\((.*)\\)}(.*)`);
if (matched === null) {
continue;

View file

@ -975,6 +975,7 @@ export default class Translations {
if (s instanceof Translation) {
return s;
}
console.error("Trying to Translation.WT, but got ",s)
throw "??? Not a valid translation"
}

View file

@ -5,36 +5,12 @@
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg69"
version="1.1"
fill="none"
viewBox="0 0 98 122"
height="122"
width="122"
sodipodi:docname="logo.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1680"
inkscape:window-height="1013"
id="namedview16"
showgrid="false"
inkscape:zoom="1.9344262"
inkscape:cx="61"
inkscape:cy="61"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg69" />
height="122"
viewBox="0 0 98 122"
fill="none"
version="1.1"
id="svg69">
<defs
id="defs17" />
<metadata
@ -45,57 +21,52 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer3"
transform="translate(0,3.1016949)">
transform="translate(0,3.1016949)"
id="layer3">
<g
id="g875">
<path
style="fill:#171615"
d="m 53.0445,112.094 c -1.7831,3.887 -7.3059,3.887 -9.089,0 L 13.2124,45.085 C 11.6928,41.7729 14.1129,38 17.7569,38 h 61.4862 c 3.644,0 6.0641,3.7729 4.5445,7.085 z"
id="path2"
inkscape:connector-curvature="0" />
d="m 53.0445,112.094 c -1.7831,3.887 -7.3059,3.887 -9.089,0 L 13.2124,45.085 C 11.6928,41.7729 14.1129,38 17.7569,38 h 61.4862 c 3.644,0 6.0641,3.7729 4.5445,7.085 z"
style="fill:#171615" />
<circle
style="fill:#171615"
cx="49"
cy="49"
id="circle4"
r="49"
id="circle4" />
cy="49"
cx="49"
style="fill:#171615" />
<path
style="stroke:#ffffff;stroke-width:2"
id="path10"
d="M 45.0763,63.8434 H 29.7114 l 8.3809,-18.5979 h 8.3808 6.0529 6.5184 m 0,0 L 56.7164,40 h 3.2592 3.2592 m -4.1904,5.2455 0.9312,2.3844 1.8624,3.8149 5.1216,12.3986 m -7.9152,-18.5979 -4.4232,7.153 -2.654,4.2918 m -1.7693,2.8613 1.7693,-2.8613 M 41.3515,50.4911 46.0075,60.9822 36.6955,40 l 2.7936,5.7224 m 9.312,16.2135 3.1661,-5.2456"
inkscape:connector-curvature="0" />
id="path10"
style="stroke:#ffffff;stroke-width:2" />
<path
style="stroke:#ffffff"
id="path12"
d="m 50.0922,63.032 c 0,1.5788 -1.2466,2.8381 -2.7593,2.8381 -1.5126,0 -2.7592,-1.2593 -2.7592,-2.8381 0,-1.5787 1.2466,-2.838 2.7592,-2.838 1.5127,0 2.7593,1.2593 2.7593,2.838 z"
inkscape:connector-curvature="0" />
id="path12"
style="stroke:#ffffff" />
<path
style="stroke:#ffffff;stroke-width:2"
id="path14"
d="M 40.2801,62.0784 C 40.2801,68.1329 35.494,73 29.6401,73 23.7861,73 19,68.1329 19,62.0784 c 0,-6.0546 4.7861,-10.9217 10.6401,-10.9217 5.8539,0 10.64,4.8671 10.64,10.9217 z"
inkscape:connector-curvature="0" />
id="path14"
style="stroke:#ffffff;stroke-width:2" />
<g
id="g20">
<circle
cx="66"
cy="63"
r="11"
style="stroke:#ffffff;stroke-width:2"
id="circle18"
style="stroke:#ffffff;stroke-width:2" />
r="11"
cy="63"
cx="66" />
</g>
<g
id="g8">
<path
d="M 56.4468,12.3002 H 49.8793 V 6.79007 C 49.8793,6.35374 49.5103,6 49.0552,6 H 47.2158 C 46.7606,6 46.3916,6.35374 46.3916,6.79007 V 12.3002 H 39.8242 C 39.369,12.3002 39,12.654 39,13.0903 v 1.7633 c 0,0.4364 0.369,0.7901 0.8242,0.7901 h 6.5674 v 16.5662 c 0,0.4364 0.369,0.7901 0.8242,0.7901 h 1.8394 c 0.4551,0 0.8241,-0.3537 0.8241,-0.7901 V 15.6437 h 6.5675 c 0.4552,0 0.8242,-0.3537 0.8242,-0.7901 v -1.7633 c 0,-0.4363 -0.369,-0.7901 -0.8242,-0.7901 z"
style="fill:#fffcfc"
id="path6"
inkscape:connector-curvature="0"
style="fill:#fffcfc" />
d="M 56.4468,12.3002 H 49.8793 V 6.79007 C 49.8793,6.35374 49.5103,6 49.0552,6 H 47.2158 C 46.7606,6 46.3916,6.35374 46.3916,6.79007 V 12.3002 H 39.8242 C 39.369,12.3002 39,12.654 39,13.0903 v 1.7633 c 0,0.4364 0.369,0.7901 0.8242,0.7901 h 6.5674 v 16.5662 c 0,0.4364 0.369,0.7901 0.8242,0.7901 h 1.8394 c 0.4551,0 0.8241,-0.3537 0.8241,-0.7901 V 15.6437 h 6.5675 c 0.4552,0 0.8242,-0.3537 0.8242,-0.7901 v -1.7633 c 0,-0.4363 -0.369,-0.7901 -0.8242,-0.7901 z" />
</g>
</g>
</g>

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -65,7 +65,7 @@
"tagRenderings": [
{
"render": {
"en": "This shop sellse {shop}"
"en": "This shop sells {shop}"
},
"question": {
"en": "What does this shop sell?"