You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, window.kiln.navButtons are only shown in the menu in edit mode because a minimal amount of kiln is loaded in view mode and the drawers those buttons open wouldn't work in view mode. However, there might be certain instances when you would want a nav button to show up in view mode.
Could be as simple as adding a window.kiln.viewNavButtons object, then in the plugin's index file you could use the same button in navButtons and viewNavButtons if it wouldn't break anything in View mode, or you could use different buttons for each mode. The viewNavButton could be as simple as a deepLink to edit mode with the plugins drawer open. Or if you don't add it to the kiln.viewNavButtons object, it just wouldn't show up in view mode at all.
So in the index.js file you could have
// If the edit nav button wouldn't throw an error in view mode, reuse the same buttonwindow.kiln.navButtons['myPlugin']=require('./nav-button.vue');window.kiln.viewNavButtons['myPlugin']=require('./nav-button.vue');
or
// If the edit nav button would throw an error in view mode, create two versions of buttonwindow.kiln.navButtons['myPlugin']=require('./nav-button.vue');window.kiln.viewNavButtons['myPlugin']=require('.view-nav-button.vue');
The text was updated successfully, but these errors were encountered:
Currently, window.kiln.navButtons are only shown in the menu in edit mode because a minimal amount of kiln is loaded in view mode and the drawers those buttons open wouldn't work in view mode. However, there might be certain instances when you would want a nav button to show up in view mode.
Could be as simple as adding a window.kiln.viewNavButtons object, then in the plugin's index file you could use the same button in navButtons and viewNavButtons if it wouldn't break anything in View mode, or you could use different buttons for each mode. The viewNavButton could be as simple as a deepLink to edit mode with the plugins drawer open. Or if you don't add it to the kiln.viewNavButtons object, it just wouldn't show up in view mode at all.
So in the index.js file you could have
or
The text was updated successfully, but these errors were encountered: