mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
318c35c2cb
* Some minor implementations * Some more * Lots more * Removed 'backend' alias * removed all promises * Removed a bunch of module exports stuff * Some morE' * Fix * custom DNS * Tests for DNS * bug fix * Some small adjustments * Small stuff
23 lines
574 B
JavaScript
23 lines
574 B
JavaScript
export const PREVIEW_MODE_FRIENDLY = 'friendly';
|
|
export const PREVIEW_MODE_SOURCE = 'source';
|
|
export const PREVIEW_MODE_RAW = 'raw';
|
|
|
|
const previewModeMap = {
|
|
[PREVIEW_MODE_FRIENDLY]: 'Visual',
|
|
[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';
|
|
}
|