Skip to content

Commit 1d2db11

Browse files
authored
V4 (#57)
* picker at mouse pos * start overlay * broken * cover working but not dismissing on browser select * broken: start event emitter layout * refactor: move all windows to own files use event emitter to pass around info. disabled backdrops as they seem to be slowing down render of picker * feat: spinner padding bottom * feat: use vibrancy * feat: ultra-dark vibrancy * cleanup * refactor: some functional stuff * remove vibrancy * refactor: convert more of main to functional * refactor: move browsers eventEmitter into getBrowsers * cleanup * start new spawn to open * broken * broken * broken * fix: missing firefox nightly icon * fix: missing copy to clipboard icon * broken * refactor: browser > activity * refactor: move renderer dirs up a level * refactor: remove deep nesting of files complexity not required for this app yet * bump package version to v4.0.0 * white copy to clipboard icon * cleanup more to do. * cleanup: consolidate tab components * backup * docs: add build-css * bump packages * remove moot awaits * remove moot async * update yarn.lock
1 parent 030d78b commit 1d2db11

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+882
-742
lines changed

β€ŽREADME.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ Install dependencies:
2424
yarn install
2525
```
2626

27+
Build the CSS:
28+
29+
```
30+
yarn build-css
31+
```
32+
2733
Run Browserosaurus in dev mode:
2834

2935
```

β€Žpackage.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
{
22
"name": "browserosaurus",
33
"productName": "Browserosaurus",
4-
"version": "3.0.2",
4+
"version": "4.0.0",
55
"description": "The browser prompter for macOS",
66
"homepage": "http://wstone.io/browserosaurus/",
77
"main": "src/main.js",
88
"scripts": {
9+
"start": "ENV=DEV electron-forge start",
910
"prettier": "prettier --config .prettierrc --write src/**/*.js",
10-
"start":
11-
"yarn run build-css && yarn watch-css & ENV=DEV electron-forge start",
1211
"package":
1312
"yarn run build-css && electron-forge package --platform=darwin --arch=x64",
1413
"make": "yarn run build-css && electron-forge make",
1514
"build-css":
16-
"node-sass-chokidar src/renderers/style -o build --importer=node_modules/node-sass-package-importer/dist/cli.js --output-style compressed",
15+
"node-sass-chokidar src/style -o build --importer=node_modules/node-sass-package-importer/dist/cli.js --output-style compressed",
1716
"watch-css":
18-
"node-sass-chokidar src/renderers/style -o build --importer=node_modules/node-sass-package-importer/dist/cli.js --output-style compressed --watch --recursive",
17+
"node-sass-chokidar src/style -o build --importer=node_modules/node-sass-package-importer/dist/cli.js --output-style compressed --watch --recursive",
1918
"icns": "cd ./src/images/icon && ./png2icns.sh icon.png"
2019
},
2120
"repository": "https://github.com/will-stone/browserosaurus",
@@ -42,10 +41,10 @@
4241
"eslint-plugin-react": "^7.1.0",
4342
"node-sass-chokidar": "^0.0.3",
4443
"node-sass-package-importer": "^5.1.0",
45-
"prettier": "^1.11.0"
44+
"prettier": "^1.12.0"
4645
},
4746
"dependencies": {
48-
"@blueprintjs/core": "^2.0.0-rc.2",
47+
"@blueprintjs/core": "2.0.1",
4948
"array-move": "^1.0.0",
5049
"electron-compile": "^6.4.2",
5150
"electron-store": "^1.3.0",
@@ -54,6 +53,7 @@
5453
"mousetrap": "^1.6.1",
5554
"node-fetch": "^1.7.3",
5655
"opn": "^5.1.0",
56+
"prop-types": "^15.6.1",
5757
"react": "^16.2.0",
5858
"react-beautiful-dnd": "^4.0.1",
5959
"react-dom": "^16.2.0",
@@ -70,7 +70,7 @@
7070
"electronPackagerConfig": {
7171
"packageManager": "yarn",
7272
"icon": "src/images/icon/icon.icns",
73-
"ignore": ["docs", "src/renderers/style"],
73+
"ignore": ["docs", "src/style"],
7474
"protocols": [
7575
{
7676
"name": "HTTP link",

β€Žsrc/components/ActivityIcon.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import React from 'react'
2+
import { string, object } from 'prop-types'
3+
4+
const ActivityIcon = ({ name, style, ...rest }) => {
5+
return (
6+
<img
7+
src={`../images/activity-icons/${name}.png`}
8+
alt=""
9+
style={{
10+
...style,
11+
width: 32,
12+
height: 32,
13+
verticalAlign: 'middle'
14+
}}
15+
{...rest}
16+
/>
17+
)
18+
}
19+
20+
ActivityIcon.propTypes = {
21+
name: string.isRequired,
22+
style: object
23+
}
24+
25+
export default ActivityIcon

β€Žsrc/components/Kbd.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React, { Fragment } from 'react'
2+
3+
const Kbd = ({ isDefault, hotKey }) => {
4+
return (
5+
<span style={{ marginLeft: 'auto' }}>
6+
{isDefault && (
7+
<Fragment>
8+
<kbd className="pt-key">enter</kbd>{' '}
9+
<span className="pt-text-muted">/</span>{' '}
10+
</Fragment>
11+
)}
12+
13+
<kbd className="pt-key">{hotKey}</kbd>
14+
</span>
15+
)
16+
}
17+
18+
export default Kbd

β€Žsrc/config/activities.js

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
/**
2+
* Activities
3+
*
4+
*/
5+
6+
export default [
7+
{
8+
appId: 'Brave',
9+
name: 'Brave',
10+
hotKey: 'b',
11+
cmd: 'open "{URL}" -a Brave'
12+
},
13+
{
14+
appId: 'Chromium',
15+
name: 'Chromium',
16+
hotKey: 'c',
17+
cmd: 'open "{URL}" -a Chromium'
18+
},
19+
{
20+
appId: 'Firefox',
21+
name: 'Firefox',
22+
hotKey: 'f',
23+
cmd: 'open "{URL}" -a Firefox'
24+
},
25+
{
26+
appId: 'Firefox Developer Edition',
27+
name: 'Firefox Developer Edition',
28+
hotKey: 'd',
29+
cmd: 'open "{URL}" -a "Firefox Developer Edition"'
30+
},
31+
{
32+
appId: 'Firefox Nightly',
33+
name: 'Firefox Nightly',
34+
hotKey: 'n',
35+
cmd: 'open "{URL}" -a "Firefox Nightly"'
36+
},
37+
{
38+
appId: 'Google Chrome',
39+
name: 'Google Chrome',
40+
hotKey: 'g',
41+
cmd: 'open "{URL}" -a "Google Chrome"'
42+
},
43+
{
44+
appId: 'Google Chrome Canary',
45+
name: 'Google Chrome Canary',
46+
hotKey: 'y',
47+
cmd: 'open "{URL}" -a "Google Chrome Canary"'
48+
},
49+
{
50+
appId: 'Iridium',
51+
name: 'Iridium',
52+
hotKey: 'i',
53+
cmd: 'open "{URL}" -a Iridium'
54+
},
55+
{
56+
appId: 'Maxthon',
57+
name: 'Maxthon',
58+
hotKey: 'm',
59+
cmd: 'open "{URL}" -a Maxthon'
60+
},
61+
{
62+
appId: 'Min',
63+
name: 'Min',
64+
hotKey: '-',
65+
cmd: 'open "{URL}" -a Min'
66+
},
67+
{
68+
appId: 'Opera',
69+
name: 'Opera',
70+
hotKey: 'o',
71+
cmd: 'open "{URL}" -a Opera'
72+
},
73+
{
74+
appId: 'Safari',
75+
name: 'Safari',
76+
hotKey: 's',
77+
cmd: 'open "{URL}" -a Safari'
78+
},
79+
{
80+
appId: 'TorBrowser',
81+
name: 'TorBrowser',
82+
hotKey: 't',
83+
cmd: 'open "{URL}" -a TorBrowser'
84+
},
85+
{
86+
appId: 'Vivaldi',
87+
name: 'Vivaldi',
88+
hotKey: 'v',
89+
cmd: 'open "{URL}" -a Vivaldi'
90+
},
91+
{
92+
name: 'Copy To Clipboard',
93+
hotKey: 'space',
94+
cmd: 'echo "{URL}" | pbcopy'
95+
}
96+
]

β€Žsrc/config/browsers.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

β€Žsrc/config/events.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export const ACTIVITY_TOGGLE = 'ACTIVITY_TOGGLE'
2+
export const ACTIVITY_SORT = 'ACTIVITY_SORT'
3+
export const ACTIVITIES_GET = 'ACTIVITIES_GET'
4+
export const ACTIVITIES_SET = 'ACTIVITIES_SET'
5+
export const URL_RECEIVED = 'URL_RECEIVED'
6+
export const PREFS_OPEN = 'PREFS_OPEN'
Loading

0 commit comments

Comments
Β (0)