Skip to content

Commit

Permalink
Merge branch 'release/3.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirPal committed Apr 22, 2019
2 parents 95cda0b + 8a23e13 commit a1d8115
Show file tree
Hide file tree
Showing 137 changed files with 5,369 additions and 1,894 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module.exports = {
rules: {
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'react/forbid-prop-types': 'off',
'react/destructuring-assignment': 'off',
'react/jsx-one-expression-per-line': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
<a name="3.2.0"></a>
# [3.2.0](https://github.com/web-pal/chronos-timetracker/compare/v3.1.0...v3.2.0) (2019-04-22)


### Bug Fixes

* idle popup scroll bars ([00af468](https://github.com/web-pal/chronos-timetracker/commit/00af468))
* sentry integration ([6f198e2](https://github.com/web-pal/chronos-timetracker/commit/6f198e2))


### Features

* Screenshots viewer popup ([c167083](https://github.com/web-pal/chronos-timetracker/commit/c167083))
* user mention api request ([2cb1952](https://github.com/web-pal/chronos-timetracker/commit/2cb1952))



<a name="3.1.0"></a>
# [3.1.0](https://github.com/web-pal/chronos-timetracker/compare/v3.0.1...v3.1.0) (2019-04-04)

Expand Down
37 changes: 8 additions & 29 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,47 +63,26 @@ yarn
```
Run dev process:
```
yarn run dev
yarn dev
```

## Packaging
To package an app for production, please ensure that `MIXPANEL_API_TOKEN` and `SENTRY_API_KEY`
env variables are set.
To package an app for production, please ensure that env variables are set.

```
export MIXPANEL_API_TOKEN=<your_mixpanel_api_token>
export DEBUG_PROD=<true|false>
export DISABLE_MIXPANEL=<0|1>
export SENTRY_DRY_RUN=<true|false>
export GH_TOKEN=<github_token>
export SENTRY_API_KEY=<your_sentry_api_key>
```

If you don't want to use sentry of mixpanel, you can toggle them with enc variables `DISABLE_MIXPANEL=1` or `DISABLE_SENTRY=1`

```
export DISABLE_MIXPANEL=1
export DISABLE_SENTRY=1
export MIXPANEL_API_TOKEN=<your_mixpanel_api_token>
```

Then you can package an app with:

#### will include uploading sentry artifacts
```
yarn package
```

#### will **exclude* uploading sentry artifacts
```
cross-env UPLOAD_SENTRY=0 yarn package
```


#### will include uploading release to a github
```
yarn package-release
```


#### will include chrome development tools on production for debugging purposes
```
yarn package-dev
yarn build && yarn release
```

## State architecture
Expand Down
27 changes: 27 additions & 0 deletions afterPack.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const path = require('path');
const fs = require('fs');

exports.default = async function afterPack(context) {
if (process.platform === 'win32') {
const libPath = (
path.join(
__dirname.split('node_modules')[0],
'node_modules/screenshot-desktop/lib/win32',
)
);
const screenshotDesktopPath = path.join(
context.appOutDir,
'resources/screenshot-desktop',
);
fs.mkdirSync(screenshotDesktopPath);

fs.copyFileSync(
path.join(libPath, 'screencapture_1.3.2.bat'),
path.join(screenshotDesktopPath, 'screenCapture_1.3.2.bat'),
);
fs.copyFileSync(
path.join(libPath, 'app.manifest'),
path.join(screenshotDesktopPath, 'app.manifest'),
);
}
};
7 changes: 6 additions & 1 deletion app/config/config.development.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
const config = {
apiUrl: 'https://chronos-api.web-pal.com', // server url
// apiUrl: 'http://127.0.0.1:5000/api', // server url
apiUrl: 'https://chronos-api.web-pal.com/api', // server url
socketUrl: 'https://chronos-socket.web-pal.com', // url of socket server

supportLink: 'https://web-pal.atlassian.net/servicedesk/customer/portal/2',
githubLink: 'https://github.com/web-pal/chronos-timetracker',

screenshotsPeriod: 30,
idleTimeThreshold: 300, // seconds of inactivity considering user is idle
checkUpdates: false,
infoLog: false,
reduxLogger: true,
issueWindowDevTools: false,
idleWindowDevTools: false,
loginWindowDevTools: false,
attachmentsWindowDevtools: false,
screenshotNotificationWindowDevtools: false,
screenshotsViewerWindowDevtools: false,
};

export default config;
6 changes: 5 additions & 1 deletion app/config/config.production.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
const config = {
apiUrl: 'https://chronos-api.web-pal.com', // server url
apiUrl: 'https://chronos-api.web-pal.com/api', // server url
socketUrl: 'https://chronos-socket.web-pal.com', // url of socket server

supportLink: 'https://web-pal.atlassian.net/servicedesk/customer/portal/2',
githubLink: 'https://github.com/web-pal/chronos-timetracker',

screenshotsPeriod: 600,
// idleTimeThreshold: 60 * 60 * 24, // seconds of inactivity considering user is idle
idleTimeThreshold: 300,
checkUpdates: true,
infoLog: false,
issueWindowDevTools: false,
idleWindowDevTools: false,
loginWindowDevTools: false,
attachmentsWindowDevtools: false,
screenshotNotificationWindowDevtools: false,
screenshotsViewerWindowDevtools: false,
};

export default config;
2 changes: 2 additions & 0 deletions app/main/sagas/updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ import {
import {
actionTypes,
} from 'shared/actions';
import pjson from '../../package.json';

autoUpdater.autoDownload = false;
autoUpdater.currentVersion = pjson.version;

if (process.env.NODE_ENV === 'development') {
autoUpdater.updateConfigPath = path.join(process.cwd(), 'dev-app-update.yml');
Expand Down
4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Chronos",
"version": "3.1.0",
"version": "3.2.0",
"description": "Native app for time-tracking fully integrated with JIRA",
"main": "./dist/main.prod.js",
"author": {
Expand All @@ -14,6 +14,6 @@
},
"dependencies": {
"desktop-idle": "1.1.2",
"keytar": "4.4.0"
"keytar": "4.4.1"
}
}
1 change: 0 additions & 1 deletion app/renderer/actions/actionTypes/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ export const AUTH_REQUEST = 'auth/AUTH_REQUEST';
export const AUTH_SELF_HOST_REQUEST = 'auth/AUTH_SELF_HOST_REQUEST';
export const LOGOUT_REQUEST = 'auth/LOGOUT_REQUEST';
export const SWITCH_ACCOUNT = 'auth/SWITCH_ACCOUNT';
export const ADD_AUTH_DEBUG_MESSAGE = 'auth/ADD_AUTH_DEBUG_MESSAGE';
1 change: 1 addition & 0 deletions app/renderer/actions/actionTypes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export * from './issues';
export * from './timer';
export * from './worklogs';
export * from './attachments';
export * from './screenshots';

export const INITIAL_CONFIGURE_APP = 'INITIAL_CONFIGURE_APP';
export const __CLEAR_ALL_REDUCERS__ = '__CLEAR_ALL_REDUCERS__';
15 changes: 15 additions & 0 deletions app/renderer/actions/actionTypes/screenshots.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export const TAKE_SCREENSHOT_REQUEST = 'TAKE_SCREENSHOT_REQUEST';
export const TAKE_SCREENSHOT_FINISHED = 'TAKE_SCREENSHOT_FINISHED';
export const UPLOAD_SCREENSHOT_FINISHED = 'UPLOAD_SCREENSHOT_FINISHED';
export const SET_NOTIFICATION_SCREENSHOT = 'SET_NOTIFICATION_SCREENSHOT';
export const NATIVE_SCREENSHOT_NOTIFICATION_CLICK = 'NATIVE_SCREENSHOT_NOTIFICATION_CLICK';
export const TEST_SCREENSHOT_WINDOW_CLOSE = 'TEST_SCREENSHOT_WINDOW_CLOSE';
export const KEEP_SCREENSHOT = 'KEEP_SCREENSHOT';
export const DISMISS_ONLY_SCREENSHOT = 'DISMISS_ONLY_SCREENSHOT';
export const DISMISS_TIME_AND_SCREENSHOT = 'DISMISS_TIME_AND_SCREENSHOT';
export const ADD_SCREENSHOT = 'ADD_SCREENSHOT';
export const SET_SCREENSHOTS = 'SET_SCREENSHOTS';
export const DELETE_SCREENSHOT_REQUEST = 'DELETE_SCREENSHOT_REQUEST';
export const DELETE_SCREENSHOT = 'DELETE_SCREENSHOT';
export const SET_SCREENSHOTS_VIEWER_STATE = 'SET_SCREENSHOTS_VIEWER_STATE';
export const SHOW_SCREENSHOTS_VIEWER_WINDOW = 'SHOW_SCREENSHOTS_VIEWER_WINDOW';
4 changes: 0 additions & 4 deletions app/renderer/actions/actionTypes/settings.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// @flow

export const FILL_LOCAL_DESKTOP_SETTINGS = 'settings/FILL_LOCAL';
export const SET_LOCAL_DESKTOP_SETTING = 'settings/SET_LOCAL';
export const SET_SETTINGS_MODAL_TAB = 'settings/SET_MODAL_TAB';

export const CLEAR_ELECTRON_CACHE = 'settings/CLEAR_ELECTRON_CACHE';
5 changes: 2 additions & 3 deletions app/renderer/actions/actionTypes/timer.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@

// @flow

export const TICK = 'timer/TICK';
export const START_TIMER = 'timer/START';
export const STOP_TIMER = 'timer/STOP';
export const SET_TIME = 'timer/SET_TIME';
export const CONTINUE_TIMER = 'timer/CONTINUE';
export const STOP_TIMER_REQUEST = 'timer/STOP_REQUEST';
export const SET_IDLE_STATE = 'timer/SET_IDLE_STATE';
export const SET_LAST_SCREENSHOT_TIME = 'timer/SET_LAST_SCREENSHOT_TIME';
export const RESET_TIMER = 'timer/RESET';
export const ADD_SCREENSHOT = 'timer/ADD_SCREENSHOT';
export const SET_SCREENSHOT_PERIODS = 'timer/SET_SCREENSHOT_PERIODS';
export const KEEP_IDLE_TIME = 'timer/KEEP_IDLE_TIME';
export const DISMISS_IDLE_TIME = 'timer/DISMISS_IDLE_TIME';
2 changes: 2 additions & 0 deletions app/renderer/actions/actionTypes/worklogs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// @flow

export const SAVE_WORKLOG_REQUEST = 'worklogs/SAVE_WORKLOG_REQUEST';
export const TRY_SAVE_WORKLOG_AGAIN_REQUEST = 'worklogs/TRY_SAVE_WORKLOG_AGAIN_REQUEST';
export const STOP_TRY_SAVE_WORKLOG_REQUEST = 'worklogs/STOP_TRY_SAVE_WORKLOG_REQUEST';
export const DELETE_WORKLOG_REQUEST = 'worklogs/DELETE_WORKLOG_REQUEST';
5 changes: 0 additions & 5 deletions app/renderer/actions/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,3 @@ export const switchAccount = (payload: {|
type: actionTypes.SWITCH_ACCOUNT,
...payload,
});

export const addAuthDebugMessage = (payload: Array<*>) => ({
type: actionTypes.ADD_AUTH_DEBUG_MESSAGE,
payload,
});
2 changes: 1 addition & 1 deletion app/renderer/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export * as resourcesActions from './resources';
export * as filtersActions from './filters';
export * as updaterActions from './updater';
export * as attachmentsActions from './attachments';

export * as screenshotsActions from './screenshots';

export * as types from './actionTypes';
export * as actionTypes from './actionTypes';
Loading

0 comments on commit a1d8115

Please sign in to comment.