2016-04-30 05:01:57 +00:00
|
|
|
|
2016-04-29 04:57:03 +00:00
|
|
|
export const PREVIEW_MODE_FRIENDLY = 'friendly';
|
2016-04-30 05:01:57 +00:00
|
|
|
export const PREVIEW_MODE_SOURCE = 'source';
|
2016-04-29 04:57:03 +00:00
|
|
|
export const PREVIEW_MODE_RAW = 'raw';
|
2016-04-30 05:01:57 +00:00
|
|
|
|
|
|
|
const previewModeMap = {
|
2016-07-07 20:10:55 +00:00
|
|
|
[PREVIEW_MODE_FRIENDLY]: 'Visual',
|
2016-04-30 05:01:57 +00:00
|
|
|
[PREVIEW_MODE_SOURCE]: 'Source',
|
|
|
|
[PREVIEW_MODE_RAW]: 'Raw'
|
|
|
|
};
|
|
|
|
|
|
|
|
export const PREVIEW_MODES = Object.keys(previewModeMap);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the friendly name for a given preview mode
|
|
|
|
*
|
|
|
|
* @param previewMode
|
|
|
|
* @returns {*|string}
|
|
|
|
*/
|
|
|
|
export function getPreviewModeName (previewMode) {
|
|
|
|
// TODO: Make this more robust maybe...
|
|
|
|
return previewModeMap[previewMode] || 'Unknown';
|
|
|
|
}
|