Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Commit

Permalink
Add fake UA for redmine
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Cucer committed Mar 21, 2018
1 parent 803538a commit 2ba5415
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 31 deletions.
36 changes: 10 additions & 26 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "titime",
"productName": "TiTime - Keeping the time for you",
"version": "1.4.5",
"version": "1.4.7",
"description": "Tool for Instant Time Tracking",
"main": "src/index.js",
"scripts": {
Expand Down Expand Up @@ -70,7 +70,7 @@
"fs-extra": "^5.0.0",
"humanize-duration": "^3.12.1",
"moment": "^2.20.1",
"node-redmine": "^0.2.1",
"node-redmine-fake-ua": "^0.2.1",
"pify": "^3.0.0",
"valid-url": "^1.0.9",
"vue": "^2.5.13",
Expand Down
4 changes: 2 additions & 2 deletions src/remote/redmine.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Redmine from 'node-redmine';
import Redmine from 'node-redmine-fake-ua';
import path from 'path';
import pify from 'pify';
import moment from 'moment';
Expand All @@ -11,7 +11,7 @@ export default class RedmineProvider extends AbstractProvider {

return new Redmine(
this.options.host,
{ apiKey: this.options.apiKey },
{ apiKey: this.options.apiKey, fakeUA: true },
);
}

Expand Down
3 changes: 2 additions & 1 deletion src/view/component/projects.vue
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ export default {
return this.$electron.remote.getGlobal('$registry');
},
sortedProjects () {
return this.projects.sort(p => p.isArchived);
return this.projects.sort()
.sort((a, b) => (a.isArchived && b.isArchived ? 0 : a.isArchived ? 1 : b.isArchived ? -1 : 0));
},
},
created () {
Expand Down

0 comments on commit 2ba5415

Please sign in to comment.