-
-
Notifications
You must be signed in to change notification settings - Fork 4
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 #20 from Fasguy/dev
v1.1.1
- Loading branch information
Showing
37 changed files
with
385 additions
and
325 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
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,28 @@ | ||
import { readFileSync, writeFileSync } from 'fs'; | ||
|
||
(() => { | ||
const packageJson = require('../../package.json'); | ||
|
||
const changelogFile = "./projects/toolbox-main/src/resources/data/changelog.json"; | ||
const changelog = <any[]>JSON.parse(readFileSync(changelogFile, { encoding: "utf-8" })); | ||
|
||
const previousEntry = changelog[changelog.length - 2]; | ||
const currentEntry = changelog[changelog.length - 1]; | ||
|
||
if (currentEntry.version || currentEntry.build_date) { | ||
console.error("A unset entry must be present in the changelog."); | ||
process.exit(-1); | ||
} | ||
|
||
if (packageJson.version === previousEntry.version) { | ||
console.error("The version in package.json must be updated before building."); | ||
process.exit(-1); | ||
} | ||
|
||
currentEntry.version = packageJson.version; | ||
currentEntry.build_date = new Date().toISOString().split('T')[0]; | ||
|
||
writeFileSync(changelogFile, JSON.stringify(changelog, undefined, "\t")); | ||
|
||
console.log(`Building Minecraft Toolbox v${packageJson.version}...`); | ||
})(); |
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
1 change: 0 additions & 1 deletion
1
projects/toolbox-main/src/app/common/elements/button/button.component.html
This file was deleted.
Oops, something went wrong.
7 changes: 4 additions & 3 deletions
7
projects/toolbox-main/src/app/common/elements/button/button.component.ts
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import { Component } from '@angular/core'; | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'button[standard]', | ||
templateUrl: './button.component.html', | ||
styleUrls: ['./button.component.scss'] | ||
template: '<ng-content></ng-content>', | ||
styleUrls: ['./button.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class ButtonComponent { | ||
} |
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
5 changes: 3 additions & 2 deletions
5
projects/toolbox-main/src/app/common/elements/error-indicator/error-indicator.component.ts
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import { Component } from '@angular/core'; | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'tbx-error-indicator', | ||
templateUrl: './error-indicator.component.html', | ||
styleUrls: ['./error-indicator.component.scss'] | ||
styleUrls: ['./error-indicator.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class ErrorIndicatorComponent { | ||
} |
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
7 changes: 4 additions & 3 deletions
7
projects/toolbox-main/src/app/common/elements/input/input.component.ts
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import { Component } from '@angular/core'; | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'input[standard][type=text]', | ||
templateUrl: './input.component.html', | ||
styleUrls: ['./input.component.scss'] | ||
template: '', | ||
styleUrls: ['./input.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class InputComponent { | ||
} |
14 changes: 9 additions & 5 deletions
14
...cts/toolbox-main/src/app/common/elements/loading-indicator/loading-indicator.component.ts
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 |
---|---|---|
@@ -1,18 +1,22 @@ | ||
import { AfterViewInit, Component, ElementRef, ViewChild } from '@angular/core'; | ||
import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, ViewChild } from '@angular/core'; | ||
import { randomRange } from 'src/lib/utils'; | ||
|
||
@Component({ | ||
selector: 'tbx-loading-indicator', | ||
templateUrl: './loading-indicator.component.html', | ||
styleUrls: ['./loading-indicator.component.scss'] | ||
styleUrls: ['./loading-indicator.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class LoadingIndicatorComponent implements AfterViewInit { | ||
@ViewChild("item") | ||
private item!: ElementRef<HTMLDivElement>; | ||
|
||
ngAfterViewInit(): void { | ||
this.item.nativeElement.addEventListener("animationiteration", (e) => { | ||
public ngAfterViewInit(): void { | ||
let animationListener = (e: AnimationEvent) => { | ||
(<HTMLDivElement>e.target).style.backgroundPositionX = `calc(100% * ${randomRange(0, 3)})`; | ||
}); | ||
}; | ||
|
||
this.item.nativeElement.addEventListener("animationstart", animationListener); | ||
this.item.nativeElement.addEventListener("animationiteration", animationListener); | ||
} | ||
} |
Oops, something went wrong.