Skip to content
This repository was archived by the owner on Jan 14, 2023. It is now read-only.

Commit f28e0e2

Browse files
committed
Merge branch 'release/1.1.0'
2 parents 537bf32 + a785a2f commit f28e0e2

File tree

142 files changed

+16083
-22579
lines changed

Some content is hidden

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

142 files changed

+16083
-22579
lines changed

.circleci/config.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,34 @@
11
version: 2
22
jobs:
3-
build:
3+
lint:
44
working_directory: ~/redshape
55
docker:
66
- image: circleci/node:10.15.3
77
steps:
88
- checkout
99
- restore_cache:
1010
key: dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
11+
- run: 'sudo apt install libxss-dev pkg-config'
12+
- run:
13+
name: Install Dependencies
14+
command: 'npm install'
15+
- save_cache:
16+
key: dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
17+
paths:
18+
- ./node_modules
19+
- run:
20+
name: 'Linting'
21+
command: 'npm run lint'
22+
23+
test:
24+
working_directory: ~/redshape
25+
docker:
26+
- image: circleci/node:10.15.3
27+
steps:
28+
- checkout
29+
- restore_cache:
30+
key: dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
31+
- run: 'sudo apt install libxss-dev libxext-dev libxtst6 libnss3 libgtk-3-0 libgtkextra-dev libasound2'
1132
- run:
1233
name: Install Dependencies
1334
command: 'npm install'
@@ -18,4 +39,10 @@ jobs:
1839
- run:
1940
name: Coverage
2041
command: 'npm test'
21-
42+
43+
workflows:
44+
version: 2
45+
test:
46+
jobs:
47+
- lint
48+
- test

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.eslintrc.json

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"parser": "babel-eslint",
23
"env": {
34
"browser": true,
45
"es6": true,
@@ -27,9 +28,48 @@
2728
"no-underscore-dangle": [ "error", {
2829
"allow": ["__initialize", "__reset"]
2930
}],
31+
"max-len": ["error", { "code": 120, "ignoreComments": true }],
32+
"no-restricted-syntax": "off",
3033
"camelcase": [ "error", {
31-
"allow": ["api_key"]
34+
"allow": [
35+
"api_key",
36+
"time_entry",
37+
"spent_on",
38+
"issue_id",
39+
"activity_id",
40+
"user_id",
41+
"spent_hours",
42+
"total_spent_hours",
43+
"time_entries",
44+
"project_id",
45+
"tracker_id",
46+
"status_id",
47+
"assigned_to_id",
48+
"author_id",
49+
"due_date",
50+
"created_on",
51+
"priority_id",
52+
"private_notes",
53+
"total_count",
54+
"estimated_duration",
55+
"estimated_hours",
56+
"done_ratio",
57+
"assigned_to",
58+
"start_date",
59+
"custom_fields",
60+
"closed_on",
61+
"progress_info"
62+
]
3263
}],
64+
"jsx-a11y/label-has-associated-control": "off",
65+
"jsx-a11y/anchor-is-valid": "off",
66+
"react/no-array-index-key": "off",
67+
"no-mixed-operators": "off",
68+
"react/forbid-prop-types": "off",
69+
"react/require-default-props": "off",
70+
"react/jsx-props-no-spreading": "off",
71+
"max-classes-per-file": "off",
72+
"no-use-before-define": "off",
3373
"jsx-a11y/label-has-for": [ 2, {
3474
"required": {
3575
"every": [ "nesting", "id" ]

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ coverage/
33
dist/
44
build/
55
.env
6+
.idea
7+
support/package-aur/*
8+
!support/package-aur/manager.sh
9+
!support/package-aur/PKGBUILD

README.md

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,43 @@ Re-designs the way tasks, task info, tracked time and communication is done on r
99

1010
The project was originally developed for a MVP portfolio showcase, but there is some roadmap planned with new features that might be added once I find enough of free time.
1111

12-
Thanks for using, or considering to use this project. I would love to hear some feedback as well as your suggestions and thoughts about what could be improved. If you have something to say, don't hesitate to [send me an email](mailto:redshape.app@gmail.com).
12+
Thanks for using, or considering to use this project.
1313

1414
![Redshape Screenshot](https://user-images.githubusercontent.com/4171202/58926139-bbd6df00-8752-11e9-92bb-ddfdb5bce33d.png)
1515

1616
## Installation
1717

1818
### macOS
19+
1920
Download the latest [Redshape release](https://github.com/Spring3/redshape/releases/latest).
2021

2122
The application will automatically update when a new release is available.
2223

2324
### Windows
25+
2426
Download the latest [Redshape installer](https://github.com/Spring3/redshape/releases).
2527

2628
You can download the .exe installer or the web installer. Both automatically detect the system architecture and set up the correct version.
2729

2830
The application will automatically update when a new release is available.
2931

30-
3132
### Linux
3233

3334
Download the latest [Redshape release](https://github.com/Spring3/redshape/releases/latest).
3435

3536
The application will automatically update when a new release is available.
3637

37-
## License
38-
[GPL-3.0](https://github.com/Spring3/redshape/blob/master/LICENSE.md)
38+
## Development
3939

40-
Created by [Daniyil Vasylenko](https://github.com/Spring3)
40+
If you don't have access to a deployed instance of redmine, you can now run it in docker
41+
42+
Unfortuantely, you will have to configure it then yourself
43+
44+
```
45+
docker-compose -f docker-compose.yml up
46+
```
4147

48+
Then after you run the project with `npm run dev`, use `http://localhost` as redmine endpoint on the login form and provide the credentials or the API token
4249

4350
## FAQ
4451

@@ -48,6 +55,51 @@ Created by [Daniyil Vasylenko](https://github.com/Spring3)
4855
#### - Markdown is displayed incorrectly
4956
Please ask your Redmine admin user to check if it's enabled in `Administration -> General -> Text Formatting` menu. This path may change with the upcoming redmine releases, so please refer to Redmine documentation to find out exactly where this switch is located for your version of Redmine
5057

51-
#### - My antivirus / Defender / Mac OS warns that it's not safe to run this app
58+
#### - My antivirus / Defender / Mac OS warns that it's not safe to run this app
5259
Mac OS build was signed by a **self-signed certificate**, while Windows and Linux builds **were not signed at all**. In such case, you will see this warnings upon download or running the application / installation, saying that this app is not safe to run or that it was provided by an unknown developer and is not safe to run.
5360

61+
#### - How to use timer controls
62+
63+
Timer controls allow to manually modify the time for the timer by (1 or 5 minutes back and forth) as well as write temporary comments. Using these, we can directly modify the time after the pause in the task. To enable it, toggle the "Use advanced timer controls" item in the Settings menu
64+
65+
#### - Idle behavior
66+
67+
Redshape can pause the timer if it detects the system is idle for a range of times (5, 10 o 15 minutes). It will warn with notifications (15s. warning time before pausing).
68+
69+
Optionally, it can automatically discard the idle time from the current timer when it is paused.
70+
71+
#### - More accurate progressbar
72+
73+
Issue progress slider can be changed with 1% step if configured (by default is 10%).
74+
Enable this if you have support in the server side (ruby, redmine) to use every percentage (33%, 81%, etc).
75+
76+
### AUR package
77+
78+
Electron-builder does not offer aur packages. Therefore, in the directory `support/package-aur` we can build those for ArchLinux/Manjaro distributions. It is "optimized" and just installs around 50MiB, using the system electron, as it is exposed here [issue 4059](https://github.com/electron-userland/electron-builder/issues/4059).
79+
80+
```sh
81+
bash support/package-aur/manager.sh pack # can be omitted if using the archive from the repo
82+
bash support/package-aur/manager.sh makepkg
83+
```
84+
85+
Before publishing a release, you have to update the PKGBUILD:
86+
87+
```sh
88+
# using npm script:
89+
npm run release:aur
90+
91+
# alternatively, with the shell:
92+
bash support/package-aur/manager.sh pack pkgbuild
93+
```
94+
95+
The second target (`pkgbuild`) will update the version and md5sums of the PKGBUILD.
96+
97+
98+
## License
99+
[GPL-3.0](https://github.com/Spring3/redshape/blob/master/LICENSE.md)
100+
101+
Created by [Daniyil Vasylenko](https://github.com/Spring3)
102+
103+
## Contributors
104+
105+
[rNoz](https://github.com/rnoz) from [Group4Layers](https://www.group4layers.com)

__mocks__/electron-store.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,24 @@ class Store {
1414
}
1515

1616
get = (key) => {
17+
// eslint-disable-next-line
1718
console.log('[electron-store] Using mocked get function');
1819
return values[key];
1920
}
2021

2122
has = (key) => {
23+
// eslint-disable-next-line
2224
console.log('[electron-store] Using mocked has function');
2325
return Object.hasOwnProperty.call(values, key);
2426
}
2527

2628
set = (key, value) => {
29+
// eslint-disable-next-line
2730
console.log('[electron-store] Using mocked set function');
2831
values[key] = value;
2932
}
3033

31-
delete = (key) => delete values[key];
34+
delete = (key) => delete values[key];
3235

3336
clear = () => Store.__reset();
3437
}

__mocks__/electron.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ const shell = {
44
openExternal: () => {}
55
};
66

7+
const powerMonitor = {
8+
getSystemIdleTime: jest.fn()
9+
};
10+
711
const remote = {
812
shell,
913
process: {
@@ -17,10 +21,20 @@ const remote = {
1721
if (path.includes('/common/request')) {
1822
return require('../common/request'); // eslint-disable-line
1923
}
24+
if (path.includes('electron')) {
25+
return { powerMonitor };
26+
}
2027
return undefined;
2128
}
2229
};
2330

31+
const ipcRenderer = {
32+
on: jest.fn(),
33+
send: jest.fn(),
34+
removeListener: jest.fn()
35+
};
36+
2437
module.exports = {
25-
remote
38+
remote,
39+
ipcRenderer
2640
};

__mocks__/image-mock.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
import React from 'react';
2+
3+
// eslint-disable-next-line react/jsx-filename-extension
14
export default () => (<div className="image" />);

__mocks__/ipc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
send: jest.fn(),
3+
setupTimer: jest.fn(),
4+
};
533 Bytes
Loading

0 commit comments

Comments
 (0)