24507ac5cc
closes https://github.com/TryGhost/Team/issues/1103 Custom post settings can be grouped by homepage or post, when set to `'post'` it makes sense to be able to preview a post page rather than the homepage. - added preview type selection to `themeManagement` service - `.availablePreviewTypes` is useful for populating selects or other page selection elements - `.previewType` is set to the currently selected preview type name - `.setPreviewType()` is for setting the preview type and re-generating the preview html if necessary - updated `themeManagement.updatePreviewHtmlTask` to fetch the latest published post if we don't already have a published post reference in the store, that post's `url` is then used when fetching the preview html if the preview type is set to `'post'` - added a select element to the design index header that uses the themeManagement properties/actions to list types and update the preview on change - updated the design nav menu to switch preview types when different sections are opened so the preview automatically switches to the post preview when making changes to the "post" custom theme settings group |
||
---|---|---|
.. | ||
ajax.js | ||
billing.js | ||
clock.js | ||
config.js | ||
custom-theme-settings.js | ||
custom-views.js | ||
dropdown.js | ||
event-bus.js | ||
feature.js | ||
ghost-paths.js | ||
lazy-loader.js | ||
limit.js | ||
media-queries.js | ||
media.js | ||
member-import-validator.js | ||
members-count-cache.js | ||
members-stats.js | ||
members-utils.js | ||
modals.js | ||
navigation.js | ||
notifications.js | ||
resize-detector.js | ||
session.js | ||
settings.js | ||
slug-generator.js | ||
theme-management.js | ||
ui.js | ||
unsplash.js | ||
upgrade-status.js | ||
utils.js | ||
whats-new.js |