Skip to content

Commit

Permalink
Merge branch 'release/0.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ralf-br committed Jan 14, 2020
2 parents a8ff176 + 56c354a commit a4112e8
Show file tree
Hide file tree
Showing 30 changed files with 59 additions and 10,094 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
run: |
my_version=$(grep '"version":' src/manifest.json | cut -d '"' -f 4)
echo "::set-env name=MY_VERSION::$my_version"
- name: npm install and build
- name: npm install and prod build
run: |
npm ci
npm run build
npm run build-prod
- name: Upload artifact for version ${{ env.MY_VERSION }}
uses: actions/upload-artifact@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Example release of version 0.6.0:
- upload zip file via https://chrome.google.com/webstore/developer/dashboard
- update description and screenshot if relevant
- change manifest.json in release/0.6.0 to next feature release version plus .999 (SNAPSHOT) -> 0.7.0.999
- commit changes: git commit -ad "snapshot 0.7.0.999"
- commit changes: git commit -am "snapshot 0.7.0.999"
- push: git push
- pull request to develop branch on github - accept it

Expand Down
23 changes: 10 additions & 13 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"harvest-jira-sync": {
"ng-harvest-jira-sync": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
Expand All @@ -26,18 +26,15 @@
"assets": [
"src/favicon.ico",
"src/manifest.json",
{"glob": "**/*.min.js", "input": "src/assets/", "output": "/assets/" },
{"glob": "**/*.min.css", "input": "src/assets/", "output": "/assets/" },
{"glob": "*", "input": "src/assets/bootstrap-3.3.7/fonts/", "output": "/assets/bootstrap-3.3.7/fonts/" },
{"glob": "*", "input": "src/assets/icons/", "output": "/assets/icons/" }
],
"styles": [
"src/styles.scss",
"src/assets/bootstrap-3.3.7/css/bootstrap.min.css"
"node_modules/bootstrap/dist/css/bootstrap.css"
],
"scripts": [
"src/assets/js/jquery-3.1.1.min.js",
"src/assets/bootstrap-3.3.7/js/bootstrap.min.js"
"node_modules/jquery/dist/jquery.js",
"node_modules/bootstrap/dist/js/bootstrap.js"
]
},
"configurations": {
Expand Down Expand Up @@ -75,18 +72,18 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "harvest-jira-sync:build"
"browserTarget": "ng-harvest-jira-sync:build"
},
"configurations": {
"production": {
"browserTarget": "harvest-jira-sync:build:production"
"browserTarget": "ng-harvest-jira-sync:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "harvest-jira-sync:build"
"browserTarget": "ng-harvest-jira-sync:build"
}
},
"test": {
Expand Down Expand Up @@ -123,15 +120,15 @@
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "harvest-jira-sync:serve"
"devServerTarget": "ng-harvest-jira-sync:serve"
},
"configurations": {
"production": {
"devServerTarget": "harvest-jira-sync:serve:production"
"devServerTarget": "ng-harvest-jira-sync:serve:production"
}
}
}
}
}},
"defaultProject": "harvest-jira-sync"
"defaultProject": "ng-harvest-jira-sync"
}
12 changes: 11 additions & 1 deletion package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"build-prod": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
Expand All @@ -19,6 +20,8 @@
"@angular/platform-browser": "^8.2.14",
"@angular/platform-browser-dynamic": "^8.2.14",
"@angular/router": "^8.2.14",
"bootstrap": "^3.4.1",
"jquery": "^3.4.1",
"rxjs": "~6.4.0",
"tslib": "^1.10.0",
"zone.js": "~0.9.1"
Expand Down
18 changes: 9 additions & 9 deletions src/app/datepicker/datepicker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,34 @@ export class DatepickerComponent implements OnInit {
this.optionsService.loadOptionsToEnvironment(this.updateTimesheet);
}

private currentDateIsToday() : boolean{
currentDateIsToday() : boolean{
return this.currentDate.valueOf() == this.todayStartOfDay().valueOf();
}

private pastDay(days : number){
pastDay(days : number){
this.currentDate = new Date(this.currentDate.getFullYear(), this.currentDate.getMonth(), this.currentDate.getDate() - days);
this.updateTimesheet()
}

private futureDay(days : number){
futureDay(days : number){
this.currentDate = new Date(this.currentDate.getFullYear(), this.currentDate.getMonth(), this.currentDate.getDate() + days);
this.updateTimesheet()
}

private goBackToToday(){
goBackToToday(){
this.currentDate = this.todayStartOfDay();
this.updateTimesheet();
}

private updateTimesheet = () => {
this.timesheetService.clearAlertAndInitTimesheet(this.currentDate);
};

private futureDisabled(days : number) : boolean{
futureDisabled(days : number) : boolean{
let futureDay = new Date(this.currentDate.getFullYear(), this.currentDate.getMonth(), this.currentDate.getDate() + days);
return this.todayStartOfDay().valueOf() < futureDay.valueOf();
}

private updateTimesheet = () => {
this.timesheetService.clearAlertAndInitTimesheet(this.currentDate);
};

private todayStartOfDay() : Date{
let startOfToday = new Date();
startOfToday.setHours(0,0,0,0);
Expand Down
2 changes: 1 addition & 1 deletion src/app/main-sync-overview/main-sync-overview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class MainSyncOverviewComponent implements OnInit {
ngOnInit() {
}

private gotToSettings(){
gotToSettings(){
chrome.runtime.openOptionsPage();
}
}
14 changes: 7 additions & 7 deletions src/app/options/options.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import {OptionsService} from "./options.service";
})
export class OptionsComponent implements OnInit {

private harvestBaseUrl : string;
private harvestBaseUrl_example : string;
private jiraBaseUrl : string;
private jiraBaseUrl_example : string;
harvestBaseUrl : string;
harvestBaseUrl_example : string;
jiraBaseUrl : string;
jiraBaseUrl_example : string;

//https://regex101.com/r/8aYBuz/3
private url_pattern = /^((http[s]?):\/\/)([^:\/\s]+)((\/\w+)*\/)\/*$/;
url_pattern = /^((http[s]?):\/\/)([^:\/\s]+)((\/\w+)*\/)\/*$/;

constructor(private alertService : AlertService,
private optionsService : OptionsService,
Expand All @@ -40,11 +40,11 @@ export class OptionsComponent implements OnInit {
});
}

private saveSettings(){
saveSettings(){
this.optionsService.saveSettings(this.harvestBaseUrl, this.jiraBaseUrl);
}

private openUrlInNewTab(openUrl :string){
openUrlInNewTab(openUrl :string){
chrome.tabs.create({url: openUrl});
}
}
16 changes: 8 additions & 8 deletions src/app/timesheet/timesheet.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,39 @@ export class TimesheetComponent implements OnInit {
return environment.jiraBaseUrl;
}

private copyHarvestToJira(timesheetEntry: TimesheetEntry){
copyHarvestToJira(timesheetEntry: TimesheetEntry){
this.timesheetService.copyHarvestToJira(timesheetEntry);
}

private deleteJiraWorklog(timesheetEntry: TimesheetEntry){
deleteJiraWorklog(timesheetEntry: TimesheetEntry){
this.timesheetService.deleteJiraWorklog(timesheetEntry)
}

private multipleJiraSyncsOffered(){
multipleJiraSyncsOffered(){
return 2 <= this.timesheetEntries
.filter(t => t.allowSyncToJira())
.length;
}

private anyEntrySyncing(){
anyEntrySyncing(){
return 1 <= this.timesheetEntries
.filter(t => t.syncing)
.length;
}

private copyAllFromHarvestToJira(){
copyAllFromHarvestToJira(){
this.timesheetService.copyAllFromHarvestToJira();
}

private trashJiraIcon(event){
trashJiraIcon(event){
event.target.attributes['src'].value = "/assets/icons/jira-trash.png";
}

private normalJiraIcon(event){
normalJiraIcon(event){
event.target.attributes['src'].value = "/assets/icons/jira.png";
}

private totalTimeSpentString(): string {
totalTimeSpentString(): string {
let totalTimeSpentInSeconds = this.timesheetEntries
.map(timesheetEntry => timesheetEntry.getTimeSpentInSeconds())
.reduce((acc, val) => acc + val, 0);
Expand Down
1 change: 0 additions & 1 deletion src/app/utils/UtilsDate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
declare let jQuery:any;

export module UtilsDate {

Expand Down
1 change: 0 additions & 1 deletion src/app/utils/UtilsJira.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {UtilsDate} from "./UtilsDate";
declare let jQuery:any;

export module UtilsJira {

Expand Down
Loading

0 comments on commit a4112e8

Please sign in to comment.