mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
412cc537d3
@ -8,11 +8,13 @@ build: off
|
||||
shallow_clone: true
|
||||
platform: x64
|
||||
environment:
|
||||
nodejs_version: "7.4.0"
|
||||
NODEJS_VERSION: "7.4.0"
|
||||
CSC_LINK: '%WINDOWS_CSC_LINK%'
|
||||
CSC_KEY_PASSWORD: '%WINDOWS_CSC_KEY_PASSWORD%'
|
||||
|
||||
# Things to install after repo clone
|
||||
install:
|
||||
- ps: Install-Product node $env:nodejs_version $env:Platform
|
||||
- ps: Install-Product node $env:NODEJS_VERSION $env:Platform
|
||||
- npm install -g npm@latest > Nul
|
||||
- npm config set msvs_version 2013
|
||||
- npm install > NUL
|
||||
|
@ -5,8 +5,9 @@ process easy and effective for everyone involved.
|
||||
|
||||
## Using the issue tracker
|
||||
|
||||
The [issue tracker](/issues) is the preferred channel for [bug reports](#bug-reports),
|
||||
[features requests](#feature-requests) and [submitting pull requests](#pull-requests).
|
||||
[GitHub Issues](https://github.com/getinsomnia/insomnia/issues) is the preferred channel
|
||||
for [bug reports](#bug-reports), [features requests](#feature-requests)
|
||||
and [submitting pull requests](#pull-requests).
|
||||
|
||||
Please respect the following restrictions:
|
||||
|
||||
|
@ -136,7 +136,7 @@ export const AUTH_NTLM = 'ntlm';
|
||||
const authTypesMap = {
|
||||
[AUTH_BASIC]: ['Basic', 'Basic Auth'],
|
||||
[AUTH_DIGEST]: ['Digest', 'Digest Auth'],
|
||||
[AUTH_NTLM]: ['NTML', 'Microsoft NTML'],
|
||||
[AUTH_NTLM]: ['NTLM', 'Microsoft NTLM'],
|
||||
[AUTH_OAUTH_1]: ['OAuth 1', 'OAuth 1.0'],
|
||||
[AUTH_OAUTH_2]: ['OAuth 2', 'OAuth 2.0']
|
||||
};
|
||||
|
@ -3,7 +3,7 @@ import electron from 'electron';
|
||||
import {isDevelopment, isMac} from './common/constants';
|
||||
import * as errorHandling from './main/error-handling';
|
||||
import * as updates from './main/updates';
|
||||
import {createWindow} from './main/window-utils';
|
||||
import * as windowUtils from './main/window-utils';
|
||||
|
||||
// Handle potential auto-update
|
||||
if (needsRestart) {
|
||||
@ -13,6 +13,7 @@ if (needsRestart) {
|
||||
// Initialize some things
|
||||
errorHandling.init();
|
||||
updates.init();
|
||||
windowUtils.init();
|
||||
|
||||
function addUrlToOpen (e, url) {
|
||||
e.preventDefault();
|
||||
@ -43,7 +44,7 @@ app.on('activate', (e, hasVisibleWindows) => {
|
||||
// Create a new window when clicking the doc icon if there isn't one open
|
||||
if (!hasVisibleWindows) {
|
||||
try {
|
||||
createWindow();
|
||||
windowUtils.createWindow();
|
||||
} catch (e) {
|
||||
// This might happen if 'ready' hasn't fired yet. So we're just going
|
||||
// to silence these errors.
|
||||
@ -55,7 +56,7 @@ app.on('activate', (e, hasVisibleWindows) => {
|
||||
// When the app is first launched
|
||||
app.on('ready', () => {
|
||||
app.removeListener('open-url', addUrlToOpen);
|
||||
const window = createWindow();
|
||||
const window = windowUtils.createWindow();
|
||||
|
||||
// Handle URLs sent via command line args
|
||||
ipcMain.once('app-ready', () => {
|
||||
|
@ -59,12 +59,11 @@ function _checkForUpdates () {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isLinux()) {
|
||||
if (!isLinux() && !isDevelopment()) {
|
||||
try {
|
||||
autoUpdater.setFeedURL(UPDATE_URLS[process.platform]);
|
||||
autoUpdater.checkForUpdates();
|
||||
} catch (err) {
|
||||
// This will fail in development
|
||||
console.warn('[updater] Failed to check for updates:', err.message);
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,11 @@ const {app, Menu, BrowserWindow, shell, dialog} = electron;
|
||||
let mainWindow = null;
|
||||
let localStorage = null;
|
||||
|
||||
export function init () {
|
||||
initLocalStorage();
|
||||
initContextMenus();
|
||||
}
|
||||
|
||||
export function createWindow () {
|
||||
const zoomFactor = getZoomFactor();
|
||||
const {bounds, fullscreen} = getBounds();
|
||||
@ -270,8 +275,6 @@ export function createWindow () {
|
||||
|
||||
Menu.setApplicationMenu(Menu.buildFromTemplate(template));
|
||||
|
||||
require('electron-context-menu')({});
|
||||
|
||||
return mainWindow;
|
||||
}
|
||||
|
||||
@ -351,4 +354,6 @@ function initLocalStorage () {
|
||||
localStorage = new LocalStorage(localStoragePath);
|
||||
}
|
||||
|
||||
initLocalStorage();
|
||||
function initContextMenus () {
|
||||
require('electron-context-menu')({});
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "insomnia",
|
||||
"version": "5.0.20",
|
||||
"version": "5.1.0",
|
||||
"productName": "Insomnia",
|
||||
"longName": "Insomnia REST Client",
|
||||
"description": "Debug APIs like a human, not a robot",
|
||||
|
@ -23,9 +23,9 @@ export default class NowExtension extends BaseExtension {
|
||||
label: 'Timestamp Format',
|
||||
type: 'enum',
|
||||
options: [
|
||||
{name: 'ISO-8601', value: 'iso-8601'},
|
||||
{name: 'Milliseconds', value: 'millis'},
|
||||
{name: 'Unix Timestamp', value: 'unix'},
|
||||
{name: 'ISO-8601 Format', value: 'iso-8601'}
|
||||
{name: 'Unix', value: 'unix'}
|
||||
]
|
||||
}];
|
||||
}
|
||||
|
@ -232,7 +232,8 @@ async function _updateElementText (render, mark, text) {
|
||||
const firstArg = tagDefinition.args[0];
|
||||
if (firstArg && firstArg.type === 'enum') {
|
||||
const argData = tagData.args[0];
|
||||
const option = firstArg.options.find(d => d.value === argData.value);
|
||||
const foundOption = firstArg.options.find(d => d.value === argData.value);
|
||||
const option = foundOption || firstArg.options[0];
|
||||
el.innerHTML = `<label></label>${tagDefinition.displayName} ⇒ ${option.name}`;
|
||||
} else {
|
||||
el.innerHTML = `<label></label>${tagData.name}`;
|
||||
@ -254,6 +255,9 @@ async function _updateElementText (render, mark, text) {
|
||||
const fullMessage = err.message.replace(/\[.+,.+]\s*/, '');
|
||||
let message = fullMessage;
|
||||
const label = el.querySelector('label');
|
||||
if (!label) {
|
||||
console.log(el);
|
||||
}
|
||||
label.innerHTML = `<i class="fa fa-exclamation-triangle"></i>${label.innerHTML}`;
|
||||
el.title = message;
|
||||
el.setAttribute('data-error', 'on');
|
||||
|
@ -211,6 +211,10 @@ class WorkspaceSettingsModal extends PureComponent {
|
||||
You have not yet added any certificates
|
||||
</p>
|
||||
) : workspace.certificates.map(certificate => (
|
||||
<div>
|
||||
<p className="notice info no-margin-top">
|
||||
Client certificates are an experimental feature
|
||||
</p>
|
||||
<div key={certificate.host} className="row-spaced">
|
||||
<div>
|
||||
<span className="pad-right no-wrap">
|
||||
@ -268,6 +272,7 @@ class WorkspaceSettingsModal extends PureComponent {
|
||||
</PromptButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
<hr className="hr--spaced"/>
|
||||
<div className="text-center">
|
||||
|
@ -563,12 +563,13 @@ class App extends PureComponent {
|
||||
}
|
||||
|
||||
_handleToggleMenuBar (hide) {
|
||||
let win = remote.BrowserWindow.getFocusedWindow();
|
||||
if (win.isMenuBarAutoHide() === hide) {
|
||||
for (const win of remote.BrowserWindow.getAllWindows()) {
|
||||
if (win.isMenuBarAutoHide() !== hide) {
|
||||
win.setAutoHideMenuBar(hide);
|
||||
win.setMenuBarVisibility(!hide);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async _handleToggleSidebar () {
|
||||
const sidebarHidden = !this.props.sidebarHidden;
|
||||
|
@ -1,46 +1,47 @@
|
||||
/* Padding */
|
||||
@padding-md: 1.2rem;
|
||||
@padding-sm: 0.6rem;
|
||||
@padding-xs: 0.4rem;
|
||||
@padding-xxs: 0.2rem;
|
||||
@padding-lg: 2.5rem;
|
||||
@padding-xl: 5rem;
|
||||
|
||||
/* Fonts */
|
||||
@font-size: 13px;
|
||||
@font-size-xs: 0.8rem;
|
||||
@font-size-sm: 0.9rem;
|
||||
@font-size-md: 1.0rem;
|
||||
@font-size-lg: 1.2rem;
|
||||
@font-size-xl: 1.35rem;
|
||||
@font-size-xxl: 1.5rem;
|
||||
@font-size-xxxl: 1.7rem;
|
||||
@font-size-xs: round(@font-size * 0.8);
|
||||
@font-size-sm: round(@font-size * 0.9);
|
||||
@font-size-md: round(@font-size * 1.0);
|
||||
@font-size-lg: round(@font-size * 1.2);
|
||||
@font-size-xl: round(@font-size * 1.35);
|
||||
@font-size-xxl: round(@font-size * 1.5);
|
||||
@font-size-xxxl: round(@font-size * 1.7);
|
||||
|
||||
/* Padding */
|
||||
@padding-md: round(@font-size * 1.2);
|
||||
@padding-sm: round(@font-size * 0.6);
|
||||
@padding-xs: round(@font-size * 0.4);
|
||||
@padding-xxs: round(@font-size * 0.2);
|
||||
@padding-lg: round(@font-size * 2.5);
|
||||
@padding-xl: round(@font-size * 5);
|
||||
|
||||
|
||||
/* Wrapper */
|
||||
@line-height-md: 3.6rem;
|
||||
@line-height-sm: @line-height-md * 0.8;
|
||||
@line-height-xs: @line-height-sm * 0.85;
|
||||
@line-height-xxs: @line-height-xs * 0.85;
|
||||
@line-height-md: round(@font-size * 3.6);
|
||||
@line-height-sm: round(@line-height-md * 0.8);
|
||||
@line-height-xs: round(@line-height-sm * 0.85);
|
||||
@line-height-xxs: round(@line-height-xs * 0.85);
|
||||
|
||||
/* Nav */
|
||||
@height-nav: @line-height-md;
|
||||
|
||||
/* Scrollbars */
|
||||
@scrollbar-width: 0.75rem;
|
||||
@scrollbar-width: round(@font-size * 0.75);
|
||||
|
||||
/* Borders */
|
||||
@radius-sm: 0.2rem;
|
||||
@radius-md: 0.3rem;
|
||||
@radius-sm: round(@font-size * 0.2);
|
||||
@radius-md: round(@font-size * 0.3);
|
||||
|
||||
/* Dropdowns */
|
||||
@dropdown-min-width: 12rem;
|
||||
@dropdown-min-width: round(@font-size * 12);
|
||||
|
||||
/* Modals */
|
||||
@modal-width: 50rem;
|
||||
@modal-width-wide: 70rem;
|
||||
@modal-width: round(@font-size * 50);
|
||||
@modal-width-wide: round(@font-size * 70);
|
||||
|
||||
/* Other */
|
||||
@drag-width: 0.5em;
|
||||
@drag-width: round(@font-size * 0.5);
|
||||
|
||||
/* Breakpoints */
|
||||
@breakpoint-lg: 1100px;
|
||||
|
Loading…
Reference in New Issue
Block a user