-
-
Notifications
You must be signed in to change notification settings - Fork 818
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from devhubapp/desktop
Desktop apps
- Loading branch information
Showing
152 changed files
with
1,834 additions
and
840 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
matrix: | ||
include: | ||
- os: osx | ||
osx_image: xcode9.4 | ||
language: node_js | ||
node_js: "10" | ||
env: | ||
- ELECTRON_CACHE=$HOME/.cache/electron | ||
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder | ||
|
||
cache: | ||
directories: | ||
- node_modules | ||
- $HOME/.cache/electron | ||
- $HOME/.cache/electron-builder | ||
|
||
script: | ||
- yarn workspace @devhub/desktop build --mac --win --linux | ||
|
||
before_cache: | ||
- rm -rf $HOME/.cache/electron-builder/wine | ||
|
||
branches: | ||
only: | ||
- master | ||
|
||
if: tag IS present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/// <reference path="../../node_modules/electron/electron.d.ts" /> | ||
|
||
interface Window { | ||
eval: never | ||
ipc: Electron.IpcRenderer | ||
process?: { | ||
type?: string | ||
} | ||
require: NodeRequireFunction | ||
} | ||
|
||
declare namespace NodeJS { | ||
interface ProcessVersions { | ||
electron?: boolean | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,13 @@ | |
"name": "devhub", | ||
"version": "0.40.0", | ||
"private": true, | ||
"author": { | ||
"name": "Bruno Lemos", | ||
"email": "[email protected]", | ||
"url": "https://twitter.com/brunolemos" | ||
}, | ||
"description": "TweetDeck for GitHub", | ||
"repository": "https://github.com/devhubapp/devhub", | ||
"workspaces": { | ||
"packages": [ | ||
"packages/*" | ||
|
@@ -11,16 +18,15 @@ | |
] | ||
}, | ||
"scripts": { | ||
"build:desktop": "yarn compile && concurrently --kill-others \"yarn compile -w\" \"yarn workspace @devhub/desktop build\"", | ||
"build:desktop": "yarn workspace @devhub/desktop compile && concurrently --kill-others \"yarn workspace @devhub/desktop compile -w\" \"yarn workspace @devhub/desktop build\"", | ||
"clean": "yarn workspaces run clean", | ||
"compile": "yarn workspace @devhub/components build", | ||
"deploy": "yarn deploy:web", | ||
"deploy:web": "yarn workspace @devhub/web build && yarn now && yarn now alias", | ||
"deploy:www": "pushd packages/www; now && now alias; popd;", | ||
"dev": "yarn compile && concurrently --kill-others \"yarn compile -w\" \"yarn workspace @devhub/web start\" \"yarn workspace @devhub/mobile start\" \"yarn workspace @devhub/desktop start\"", | ||
"dev:desktop": "yarn compile && concurrently --kill-others \"yarn compile -w\" \"yarn workspace @devhub/desktop start\"", | ||
"dev:mobile": "yarn compile && concurrently --kill-others \"yarn compile -w\" \"yarn workspace @devhub/mobile start\"", | ||
"dev:web": "yarn compile && concurrently --kill-others \"yarn compile -w\" \"yarn workspace @devhub/web start\"", | ||
"deploy:www": "pushd \"packages/www\"; now && now alias; popd;", | ||
"dev": "yarn workspace @devhub/desktop compile && concurrently --kill-others \"yarn workspace @devhub/desktop compile -w\" \"yarn workspace @devhub/web start\" \"yarn workspace @devhub/mobile start\" \"wait-on http://localhost:3000 && yarn workspace @devhub/desktop start\"", | ||
"dev:desktop": "cross-env BROWSER=none concurrently \"yarn dev:web\" \"yarn workspace @devhub/desktop compile -w\" \"wait-on http://localhost:3000 && yarn workspace @devhub/desktop start\"", | ||
"dev:mobile": "yarn workspace @devhub/mobile compile && concurrently --kill-others \"yarn workspace @devhub/mobile compile -w\" \"yarn workspace @devhub/mobile start\"", | ||
"dev:web": "yarn workspace @devhub/web compile && concurrently --kill-others \"yarn workspace @devhub/web compile -w\" \"yarn workspace @devhub/web start\"", | ||
"format": "yarn workspaces run format", | ||
"lint": "yarn workspaces run lint", | ||
"now": "npx now", | ||
|
@@ -32,16 +38,17 @@ | |
"dependencies": {}, | ||
"devDependencies": { | ||
"concurrently": "^4.1.0", | ||
"cross-env": "^5.2.0", | ||
"husky": "^1.2.0", | ||
"lint-staged-offline": "^0.0.1", | ||
"patch-package": "^5.1.1", | ||
"postinstall-prepare": "^1.0.1", | ||
"prettier": "^1.15.3", | ||
"rimraf": "^2.6.2", | ||
"shx": "0.3.2", | ||
"tslint": "^5.11.0", | ||
"tslint-config-prettier": "^1.17.0", | ||
"tslint-react": "^3.6.0", | ||
"typescript": "^3.2.1" | ||
"typescript": "^3.2.2" | ||
}, | ||
"resolutions": { | ||
"scheduler": "0.12.0" | ||
|
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/components/src/components/modals/EnterpriseSetupModal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { BrowserCrossPlatform } from '.' | ||
import { Linking } from '../linking' | ||
|
||
export const Browser: BrowserCrossPlatform = { | ||
addEventListener: (e: any, handler: any) => { | ||
if (e === 'url') return Linking.addEventListener(e, handler) | ||
console.debug('[BROWSER] Ignoring addEventListener event', e) // tslint:disable-line no-console | ||
}, | ||
removeEventListener: (e: any, handler: any) => { | ||
if (e === 'url') return Linking.removeEventListener(e, handler) | ||
console.debug('[BROWSER] Ignoring removeEventListener event', e) // tslint:disable-line no-console | ||
}, | ||
dismiss: () => undefined, | ||
openURL: Linking.openURL, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export interface BrowserCrossPlatform { | ||
addEventListener: { | ||
(event: 'url', handler: ((payload: { url: string }) => void)): void | ||
(event: 'onDismiss', handler: (() => void)): void | ||
} | ||
removeEventListener: { | ||
(event: 'url', handler: ((payload: { url: string }) => void)): void | ||
(event: 'onDismiss', handler: (() => void)): void | ||
} | ||
dismiss(): void | ||
openURL(url: string): void | ||
} | ||
|
||
export const Browser: BrowserCrossPlatform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { BrowserCrossPlatform } from '.' | ||
|
||
// tslint:disable-next-line no-var-requires | ||
export const Browser: BrowserCrossPlatform = require('./index-native').Browser |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { BrowserCrossPlatform } from '.' | ||
|
||
// tslint:disable-next-line no-var-requires | ||
export const Browser: BrowserCrossPlatform = require('./index-native').Browser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Source: https://github.com/PaulLeCam/react-native-electron/blob/master/src/apis/Linking.js | ||
|
||
import _ from 'lodash' | ||
|
||
import { LinkingCrossPlatform } from './index' | ||
import { Linking as LinkingOriginal } from './index-native' | ||
|
||
const eventHandlers = new Map() | ||
|
||
export const Linking: LinkingCrossPlatform = { | ||
addEventListener: (type: string, handler: any) => { | ||
if (!(type === 'url' && typeof handler === 'function')) return | ||
|
||
const wrapHandler = (_e: any, url: string) => { | ||
handler({ type, url }) | ||
} | ||
|
||
eventHandlers.set(handler, wrapHandler) | ||
window.ipc.addListener('open-url', wrapHandler) | ||
}, | ||
async canOpenURL(url: string) { | ||
return LinkingOriginal.canOpenURL(url) | ||
}, | ||
async getInitialURL() { | ||
return '' | ||
}, | ||
openURL: (url: string): Promise<void> => { | ||
return LinkingOriginal.openURL(url) | ||
}, | ||
removeEventListener: (type: string, handler: any) => { | ||
if (!(type === 'url' && typeof handler === 'function')) return | ||
|
||
const wrapHandler = eventHandlers.get(handler) | ||
if (wrapHandler) { | ||
window.ipc.removeListener('open-url', wrapHandler) | ||
} | ||
|
||
eventHandlers.delete(handler) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import _ from 'lodash' | ||
|
||
export { Linking } from 'react-native' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export interface LinkingCrossPlatform { | ||
addEventListener: ( | ||
event: 'url', | ||
handler: (payload: { url: string }) => void, | ||
) => void | ||
removeEventListener: ( | ||
event: 'url', | ||
handler: (payload: { url: string }) => void, | ||
) => void | ||
canOpenURL(url: string): Promise<boolean> | ||
getInitialURL(): Promise<string> | ||
openURL(url: string): void | ||
} | ||
|
||
export const Linking: LinkingCrossPlatform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import _ from 'lodash' | ||
|
||
import { LinkingCrossPlatform } from './index' | ||
|
||
export const Linking: LinkingCrossPlatform = require('./index-native').Linking // tslint:disable-line no-var-requires |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import _ from 'lodash' | ||
|
||
import { Platform } from '../platform' | ||
import { LinkingCrossPlatform } from './index' | ||
|
||
export const Linking: LinkingCrossPlatform = Platform.isElectron | ||
? require('./index-electron').Linking // tslint:disable-line no-var-requires | ||
: require('./index-native').Linking // tslint:disable-line no-var-requires |
Oops, something went wrong.