Hi all,
it’s Luca from DacSystem.
Is it possible to change via GUI (i.e. not programmatically) the app icon (attached figure)?
Regards
Luca
Hi all,
it’s Luca from DacSystem.
Is it possible to change via GUI (i.e. not programmatically) the app icon (attached figure)?
Regards
Luca
mm ok. So is it possible to change it programmatically?
regards,
Luca
This from KB 46467466
The icon can only be custom at version 10.5 onwards. At 10.4.6 it is not possible.
At 10.5 the applications package.json can have an icon option as follows (example from c8yicontest3 application)…
“c8y”: {
“application”: {
“name”: “c8yicontest3”,
“contextPath”: “c8yicontest3”,
“key”: “c8yicontest3-application-key”,
“icon”: { “url”: “url(/apps/c8yicontest3/icon3.jpg)”}
},
There’s no way I can find the article you mention.
In the knowledge center query im doing something like this:
What am I missing?
Luca
Search for ‘set custom application icon’
1799650 is perhaps most relevant.
I know this shuld be easy but I cannot make it work.
Steps I followed so far:
"c8y": {
"application": {
"name": "dac-dashboard",
"contextPath": "dac-dashboard",
"key": "dac-dashboard-application-key",
"tabsHorizontal": true,
"upgrade": true,
"rightDrawer": true,
"breadcrumbs": false,
"sensorAppOneLink": "http://onelink.to/pca6qe",
"sensorPhone": true,
"contentSecurityPolicy": "base-uri 'none'; default-src 'self' 'unsafe-inline' http: https: ws: wss:; connect-src 'self' http: https: ws: wss:; script-src 'self' open.mapquestapi.com *.twitter.com *.twimg.com *.aptrinsic.com 'unsafe-inline' 'unsafe-eval' data:; style-src * 'unsafe-inline' blob:; img-src * data:; font-src * data:; frame-src *; worker-src 'self' blob:;",
"dynamicOptionsUrl": "/apps/public/public-options/options.json",
"brandingEntry": "./src/branding.less",
"icon": { "url": "url(/apps/dac-dashboard/branding/cockpit.svg)"}
},
Result:
Actually I would like to use from here the c8y-icon-cockpit
icon. Is it possible?
Regards
Luca
When you build the app, in the resulting dist folder, is there dac-dashboard/branding/cockpit.svg?
I’ve only ever done this with png files, I don’t know about svg.
Hi Robert,
nope, no dac-dashboard/branding/cockpit.svg in dist
OK, manually put it there, zip the dist folder conttnts (make sure you don’t zip any previous zips) and upload it to the tenant.
Hi Luca,
if you want to use some of the default Cumulocity icons from the https://styleguide.cumulocity.com/#/icons/cumulocity you can use the class
attribute instead of url
(the interface is defined here: Web SDK documentation) e.g. like this:
"c8y":{
"application":{
"name":"dac-dashboard",
"contextPath":"dac-dashboard",
"key":"dac-dashboard-application-key",
"tabsHorizontal":true,
"upgrade":true,
"rightDrawer":true,
"breadcrumbs":false,
"sensorAppOneLink":"http://onelink.to/pca6qe",
"sensorPhone":true,
"contentSecurityPolicy":"base-uri 'none'; default-src 'self' 'unsafe-inline' http: https: ws: wss:; connect-src 'self' http: https: ws: wss:; script-src 'self' open.mapquestapi.com *.twitter.com *.twimg.com *.aptrinsic.com 'unsafe-inline' 'unsafe-eval' data:; style-src * 'unsafe-inline' blob:; img-src * data:; font-src * data:; frame-src *; worker-src 'self' blob:;",
"dynamicOptionsUrl":"/apps/public/public-options/options.json",
"brandingEntry":"./src/branding.less",
"icon":{
"class":"c8y-icon-cockpit"
}
}
}
I did what you suggested. The web sdk docs you linked for icon states that:
Application icon to be displayed in app switcher and header bar.
But i’m getting this
The icon in the app switcher didn’t change
Am i missing something?
regards
Luca
Hi Luca,
Are you trying this locally or have you deployed the app as well?
Try to remove the currently deployed app and upload it again if possible.
Regards,
Tristan
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.