Skip to content

Commit

Permalink
feat: Add the layer style edition action in globe activity (closes #404)
Browse files Browse the repository at this point in the history
  • Loading branch information
Floran05 committed Dec 13, 2024
1 parent 4310ffe commit 963bf4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ const globeLayerActions = [{
route: { name: 'globe-layer-chart', params: { layerId: ':_id', layerName: ':name' } } },
{ id: 'edit-layer', label: 'mixins.activity.EDIT_LABEL', icon: 'las la-file-alt', visible: ['isLayerEditable', { name: '$can', params: ['update', 'catalog'] }],
route: { name: 'edit-globe-layer', params: { layerId: ':_id', layerName: ':name' } } },
{ id: 'edit-layer-style', label: 'mixins.activity.EDIT_LAYER_STYLE_LABEL', icon: 'las la-border-style', visible: 'isLayerStyleEditable',
route: { name: 'edit-globe-layer-style', params: { layerId: ':_id', layerName: ':name' } } },
{ id: 'remove-layer', label: 'mixins.activity.REMOVE_LABEL', icon: 'las la-minus-circle', handler: 'onRemoveLayer',
visible: ['isLayerRemovable', { name: '$can', params: ['remove', 'catalog'] }] }
]
Expand Down Expand Up @@ -683,7 +685,7 @@ module.exports = {
},
fab: {
content: [
{ id: 'add-layer', icon: 'las la-plus', label: 'mixins.activity.ADD_LAYER', modes: ['import'], route: { name: 'add-globe-layer', query: { project: ':project' } } },
{ id: 'add-layer', icon: 'las la-plus', label: 'mixins.activity.ADD_LAYER', route: { name: 'add-globe-layer', query: { project: ':project' } } },
{ id: 'probe-location', icon: 'las la-eye-dropper', label: 'mixins.activity.PROBE', handler: 'probeAtLocation' }
]
},
Expand Down
5 changes: 5 additions & 0 deletions src/router/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ module.exports = [{
name: 'edit-globe-layer',
component: 'KLayerEditor',
props: true
},
'edit-layer-style/:layerId?': {
name: 'edit-globe-layer-style',
component: 'KLayerStyleEditor',
props: true
}
}
}
Expand Down

0 comments on commit 963bf4a

Please sign in to comment.