Skip to content

Commit

Permalink
Merge branch 'develop' into controlled-radio-button-group
Browse files Browse the repository at this point in the history
  • Loading branch information
develohpanda committed Aug 12, 2020
2 parents 897c85b + b26ce1c commit a155029
Show file tree
Hide file tree
Showing 28 changed files with 968 additions and 3,661 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12
12.18.3
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,24 @@ npm test
npm run app-start
```

If you are on Linux and have problems, you may need to install `libfontconfig-dev`
If you are on Linux, you may need to install the following supporting packages

```bash
# Install libfontconfig-dev
# Update library
sudo apt-get update

# Install font configuration library & support
sudo apt-get install libfontconfig-dev
sudo apt-get install font-manager

# Build capability for required font-scanner package
sudo apt-get install build-essential
```

Also on Linux, if Electron is failing during the bootstrap process, run the following
```bash
# Clear Electron install conflicts
rm -rf ~/cache/electron
```

If you are on Windows and have problems, you may need to install [Windows Build Tools](https://github.com/felixrieseberg/windows-build-tools)
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tagVersionPrefix": "lib@",
"version": "2.2.19",
"version": "2.2.20",
"packages": [
"packages/*",
"plugins/*"
Expand Down
1 change: 1 addition & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
base = "packages/insomnia-components/"
command = "npm run convert-svg && npm run build-storybook"
ignore = "git diff --quiet HEAD^ HEAD packages/insomnia-components/"
environment = { NODE_ENV = "production" }
101 changes: 0 additions & 101 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
"name": "insomnia",
"private": true,
"version": "1.0.0",
"description": "Insomnia is a cross-platform REST client, built on top of Electron.",
"repository": "https://github.com/kong/insomnia",
"bugs": {
"url": "https://github.com/kong/insomnia"
"url": "https://github.com/kong/insomnia/issues"
},
"homepage": "https://github.com/kong/insomnia#readme",
"scripts": {
"lint": "eslint . --ext .js,.json",
"lint:fix": "npm run lint -- --fix",
Expand Down Expand Up @@ -45,7 +47,6 @@
"babel-loader": "^8.0.5",
"babel-plugin-inline-react-svg": "^1.1.0",
"babel-plugin-styled-components": "^1.10.6",
"chokidar": "^3.4.1",
"eslint": "^7.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-config-semistandard": "^15.0.0",
Expand Down
68 changes: 50 additions & 18 deletions packages/insomnia-app/app/main/window-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import {
MNEMONIC_SYM,
} from '../common/constants';
import * as misc from '../common/misc';
import * as os from 'os';
import { docsBase } from '../common/documentation';

const { app, Menu, BrowserWindow, shell, dialog } = electron;
const { app, Menu, BrowserWindow, shell, dialog, clipboard } = electron;

// So we can use native modules in renderer
// NOTE: This will be deprecated in Electron 10 and impossible in 11
Expand Down Expand Up @@ -121,9 +122,6 @@ export function createWindow() {
const applicationMenu = {
label: `${MNEMONIC_SYM}Application`,
submenu: [
...(isMac()
? [{ label: `A${MNEMONIC_SYM}bout ${getAppName()}`, role: 'about' }, { type: 'separator' }]
: []),
{
label: `${MNEMONIC_SYM}Preferences`,
click: function(menuItem, window, e) {
Expand Down Expand Up @@ -294,24 +292,58 @@ export function createWindow() {
],
};

if (!isMac()) {
const aboutDetail = [
`OS ${os.type()} ${os.arch()} ${os.release()}`,
`Version ${getAppLongName()} ${getAppVersion()}`,
`Shell ${process.versions.electron}`,
`Node ${process.versions.node}`,
`V8 ${process.versions.v8}`,
`Architecture ${process.arch}`,
Curl.getVersion(),
].join('\n');

const aboutMsgOptions = {
type: 'info',
title: getAppName(),
message: getAppLongName(),
detail: aboutDetail,
noLink: true,
};

if (isMac()) {
applicationMenu.submenu.unshift(
{
label: `A${MNEMONIC_SYM}bout ${getAppName()}`,
click: async () => {
const buttons = ['OK', 'Copy'];
const msgBox = await dialog.showMessageBox({
...aboutMsgOptions,
buttons: buttons,
defaultId: buttons.indexOf('OK'),
cancelId: buttons.indexOf('OK'),
});

if (msgBox.response === buttons.indexOf('Copy')) {
clipboard.writeText(aboutDetail);
}
},
},
{ type: 'separator' },
);
} else {
helpMenu.submenu.unshift({
label: `${MNEMONIC_SYM}About`,
click: async () => {
await dialog.showMessageBox({
type: 'info',
title: getAppName(),
message: getAppLongName(),
detail: [
'Version ' + getAppVersion(),
'Shell ' + process.versions.electron,
'Node ' + process.versions.node,
'V8 ' + process.versions.v8,
'Architecture ' + process.arch,
'', // Blank line before libcurl
Curl.getVersion(),
].join('\n'),
const buttons = ['Copy', 'OK'];
const msgBox = await dialog.showMessageBox({
...aboutMsgOptions,
buttons: buttons,
defaultId: buttons.indexOf('OK'),
cancelId: buttons.indexOf('OK'),
});
if (msgBox.response === buttons.indexOf('Copy')) {
clipboard.writeText(aboutDetail);
}
},
});
}
Expand Down
2 changes: 1 addition & 1 deletion packages/insomnia-app/config/config.core.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2020.4.0-alpha.3",
"version": "2020.4.0-beta.4",
"name": "insomnia",
"executableName": "insomnia",
"appId": "com.insomnia.app",
Expand Down
2 changes: 1 addition & 1 deletion packages/insomnia-app/config/config.designer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2020.4.0-alpha.3",
"version": "2020.4.0-beta.4",
"name": "insomnia-designer",
"executableName": "insomnia-designer",
"appId": "com.insomnia.designer",
Expand Down
32 changes: 16 additions & 16 deletions packages/insomnia-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a155029

Please sign in to comment.