Skip to content

Commit d5c4f9d

Browse files
committed
wip: Provide ready-made configuration snippets to help set up the app's configuration file #1140
1 parent a2b37cf commit d5c4f9d

File tree

6 files changed

+81
-50
lines changed

6 files changed

+81
-50
lines changed

core/client/i18n/core_en.json

+3-11
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
"ABOUT": "About",
3737
"ONLINE_HELP": "Online help",
3838
"CONTEXTUAL_HELP": "Contextual help",
39-
"LOGOUT": "Logout"
39+
"LOGOUT": "Logout",
40+
"ENTER_FULLSCREEN": "Enter full screen mode",
41+
"EXIT_FULLSCREEN": "Exit full screen mode"
4042
},
4143
"errors": {
4244
"400": "Operation cannot be performed: bad parameters",
@@ -720,15 +722,5 @@
720722
"FILE_TOO_LARGE": "File {file} is too large. The size must be less than {size}Mb",
721723
"UPLOAD_FILE_SUCCEEDED": "File {file} has been successfully uploaded",
722724
"UPLOAD_FILE_ERRORED": "Cannot upload file {file} !"
723-
},
724-
"KToggleWidgetVisibility": {
725-
"SHOW_LEGEND": "Show legend",
726-
"HIDE_LEGEND": "Hide legend"
727-
},
728-
"KToggleStickyVisibility": {
729-
"SHOW_POSITION": "Show geographical coordinates",
730-
"HIDE_POSITION": "Hide geographical coordinates",
731-
"SHOW_NORTH": "Show north arrow",
732-
"HIDE_NORTH": "Hide north arrow"
733725
}
734726
}

core/client/i18n/core_fr.json

+3-11
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
"ABOUT": "A propos",
3737
"ONLINE_HELP": "Aide en ligne",
3838
"CONTEXTUAL_HELP": "Aide contextuelle",
39-
"LOGOUT": "Se déconnecter"
39+
"LOGOUT": "Se déconnecter",
40+
"ENTER_FULLSCREEN": "Basculer en mode plein écran",
41+
"EXIT_FULLSCREEN": "Quitter le mode plein écran"
4042
},
4143
"errors": {
4244
"400": "Cette opération ne peut être réalisée: paramètres incorrects",
@@ -717,15 +719,5 @@
717719
"FILE_TOO_LARGE": "Le fichier {file} est trop volumineux. La taille doit être inférieure à {size}Mo",
718720
"UPLOAD_FILE_SUCCEEDED": "Le fichier {file} a été transféré avec succès",
719721
"UPLOAD_FILE_ERRORED": "Impossible de transférer le fichier {file} !"
720-
},
721-
"KToggleWidgetVisibility": {
722-
"SHOW_LEGEND": "Afficher la légende",
723-
"HIDE_LEGEND": "Masquer la légende"
724-
},
725-
"KToggleStickyVisibility": {
726-
"SHOW_POSITION": "Afficher les coordonnées géographiques",
727-
"HIDE_POSITION": "Masquer les coordonnées géographiques",
728-
"SHOW_NORTH": "Afficher la flèche d’orientation vers le nord",
729-
"HIDE_NORTH": "Masquer la flèche d’orientation vers le nord"
730722
}
731723
}

extras/configs/panes.top.js

+56-26
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,62 @@
11
module.exports = {
2-
TOGGLE_LEGEND_VISIBILITY: {
3-
id: 'toggle-legend',
4-
component: 'action/KToggleWidgetVisibility',
5-
widgetId: 'legend-widget',
6-
icon: 'las la-list',
7-
tooltip: 'KToggleWidgetVisibility.SHOW_LEGEND',
8-
toggle: { tooltip: 'KToggleWidgetVisibility.HIDE_LEGEND' }
2+
toggleFullscreen: (renderer = 'item') => {
3+
return {
4+
id: 'toggle-fullscreen',
5+
component: 'action/KToggleFullscreenAction',
6+
icon: 'las la-expand',
7+
label: renderer === 'item' ? 'layout.ENTER_FULLSCREEN' : null,
8+
tooltip: renderer === 'button' ? 'layout.ENTER_FULLSCREEN' : null,
9+
toggle: {
10+
icon: 'las la-compress',
11+
label: renderer === 'item' ? 'layout.EXIT_FULLSCREEN' : null,
12+
tooltip: renderer === 'button' ? 'layout.EXIT_FULLSCREEN' : null
13+
},
14+
renderer
15+
}
916
},
10-
TOGGLE_POSITION_VISIBILITY: {
11-
id: 'toggle-position-sticky',
12-
component: 'action/KToggleStickyVisibility',
13-
stickyId: 'position-sticky',
14-
icon: 'las la-plus',
15-
label: 'KToggleStickyVisibility.SHOW_POSITION',
16-
toggle: { label: 'KToggleStickyVisibility.HIDE_POSITION' }
17+
toggleLegendVisibility: (renderer = 'item') => {
18+
return {
19+
id: 'toggle-legend',
20+
component: 'action/KToggleWidgetVisibility',
21+
widgetId: 'legend-widget',
22+
icon: 'las la-list',
23+
label: renderer === 'item' ? 'layout.SHOW_LEGEND' : null,
24+
tooltip: renderer === 'button' ? 'layout.SHOW_LEGEND': null,
25+
toggle: {
26+
label: renderer === 'item' ? 'layout.HIDE_LEGEND' : null,
27+
tooltip: renderer === 'button' ? 'layout.HIDE_LEGEND': null,
28+
},
29+
renderer
30+
}
1731
},
18-
TOGGLE_NORTH_VISIBILITY: {
19-
id: 'toggle-north-sticky',
20-
component: 'action/KToggleStickyVisibility',
21-
stickyId: 'north-sticky',
22-
icon: 'las la-location-arrow',
23-
label: 'KToggleStickyVisibility.SHOW_NORTH',
24-
toggle: { label: 'KToggleStickyVisibility.HIDE_NORTH' }
32+
togglePositionVisibility: (renderer = 'item') => {
33+
return {
34+
id: 'toggle-position-sticky',
35+
component: 'action/KToggleStickyVisibility',
36+
stickyId: 'position-sticky',
37+
icon: 'las la-plus',
38+
label: renderer === 'item' ? 'layout.SHOW_POSITION' : null,
39+
tooltip: renderer === 'button' ? 'layout.SHOW_POSITION': null,
40+
toggle: {
41+
label: renderer === 'item' ? 'layout.HIDE_POSITION' : null,
42+
tooltip: renderer === 'button' ? 'layout.HIDE_POSITION': null,
43+
},
44+
renderer
45+
}
2546
},
26-
TOGGLE_FULLSCREEN: {
27-
id: 'toggle-fullscreen',
28-
icon: 'las la-expand', tooltip: 'mixins.activity.ENTER_FULLSCREEN',
29-
toggle: { icon: 'las la-compress', tooltip: 'mixins.activity.EXIT_FULLSCREEN' },
30-
component: 'action/KToggleFullscreenAction'
47+
toggleNorthArrowVisibility: (renderer = 'item') => {
48+
return {
49+
id: 'toggle-north-arrow-sticky',
50+
component: 'action/layout',
51+
stickyId: 'north-arrow-sticky',
52+
icon: 'las la-location-arrow',
53+
label: renderer === 'item' ? 'layout.SHOW_NORTH_ARROW' : null,
54+
tooltip: renderer === 'button' ? 'layout.SHOW_NORTH_ARROW': null,
55+
toggle: {
56+
label: renderer === 'item' ? 'layout.HIDE_NORTH_ARROW' : null,
57+
tooltip: renderer === 'button' ? 'layout.HIDE_NORTH_ARROW': null,
58+
},
59+
renderer
60+
}
3161
}
3262
}

extras/configs/stickies.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = {
1919
},
2020
northArrow: (visible = true) => {
2121
return {
22-
id: 'north-sticky',
22+
id: 'north-arrow-sticky',
2323
position: 'bottom-left',
2424
offset: [100, 2],
2525
component: 'stickies/KNorthArrow',
@@ -31,7 +31,8 @@ module.exports = {
3131
id: 'attribution-sticky',
3232
position: 'bottom-right',
3333
offset: [80, 24],
34-
component: 'stickies/KAttribution'
34+
component: 'stickies/KAttribution',
35+
visible
3536
}
3637
}
3738
}

map/client/i18n/map_en.json

+8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
"CATALOG_LABEL": "Catalog",
88
"PROJECT_LAYERS_LABEL": "Data",
99
"PROJECT_VIEWS_LABEL": "Views",
10+
"layout": {
11+
"SHOW_LEGEND": "Show legend",
12+
"HIDE_LEGEND": "Hide legend",
13+
"SHOW_POSITION": "Show geographical coordinates",
14+
"HIDE_POSITION": "Hide geographical coordinates",
15+
"SHOW_NORTH": "Show north arrow",
16+
"HIDE_NORTH": "Hide north arrow"
17+
},
1018
"errors": {
1119
"GEOLOCATION_NOT_SUPPORTED": "Geolocation does not seem to be supported on your device or browser.",
1220
"GEOLOCATION_ERROR": "We are not able to locate your position, this might affect some features of the application.",

map/client/i18n/map_fr.json

+8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
"CATALOG_LABEL": "Catalogue",
88
"PROJECT_LAYERS_LABEL": "Données",
99
"PROJECT_VIEWS_LABEL": "Vues",
10+
"layout": {
11+
"SHOW_LEGEND": "Afficher la légende",
12+
"HIDE_LEGEND": "Masquer la légende",
13+
"SHOW_POSITION": "Afficher les coordonnées géographiques",
14+
"HIDE_POSITION": "Masquer les coordonnées géographiques",
15+
"SHOW_NORTH": "Afficher la flèche d’orientation vers le nord",
16+
"HIDE_NORTH": "Masquer la flèche d’orientation vers le nord"
17+
},
1018
"errors": {
1119
"GEOLOCATION_NOT_SUPPORTED": "La géolocalisation ne semble pas disponible sur votre appareil ou navigateur.",
1220
"GEOLOCATION_ERROR": "Il nous est impossible de déterminer votre position, cela peut affecter certaines fonctionnalités de l'application.",

0 commit comments

Comments
 (0)