Skip to content

Commit

Permalink
Merge pull request #15 from FrogTheFrog/v2.0.0
Browse files Browse the repository at this point in the history
V2.0.0
  • Loading branch information
FrogTheFrog authored Jun 11, 2017
2 parents 17e5ca0 + 565ada5 commit f2879e3
Show file tree
Hide file tree
Showing 64 changed files with 2,800 additions and 1,520 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
dist/
src/renderer/styles/oldThemes/
release/
npm-debug.log*
.debug/
8 changes: 4 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": "0.2.0",
"configurations": [
{
"name": "Debug Main Process",
"name": "Debug Main",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}/dist",
Expand All @@ -20,7 +20,7 @@
]
},
{
"name": "Debug Renderer Process",
"name": "Debug Renderer",
"type": "chrome",
"request": "attach",
"port": 9222,
Expand All @@ -31,8 +31,8 @@
{
"name": "Debug Electron",
"configurations": [
"Debug Main Process",
"Debug Renderer Process"
"Debug Main",
"Debug Renderer"
]
}
]
Expand Down
37 changes: 26 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
# Change Log
All notable changes to this project will be documented in this file.

## 1.2.0 - 2017-05-06
### Fixed
* Completely rewritten `vdf` file parser (both mine and [shortcuts.vdf](https://github.com/tirish/steam-shortcut-editor)) solves #2 and should solve #6 (not confirmed yet)
* Fixed #7

## 2.0.0 - 2017-06-11
### Added
* Generated entries can now be removed
* All added entries can be removed (which are added since this release)
* New image provider - `retrogaming.cloud`
* 2 new options for fuzzy matcher.
* Online image query option allows to specify search string for images.
* Image urls can now be redownloaded per game only (without regenerating a list).
* Specific account support added. This allows to make different configuration for different accounts.
* New settings windows has been added.
* Images can now be preloaded as soon as they are retrieved.
* Images can now be filtered for non-related images (select this option in settings window).
* Fuzzy matcher has it's own Event log option now. This will reduce the clutter.
* Timeout support added for `retrogaming.cloud`. After requested timeout, images will continue to download.
* New nagging message will now announce when all downloads are complete.
* User configurations and user settings (new in this release) will now be validated. Incorrect structure types will be replaced with default values (it will add missing options for new APP versions).

### Changed
* `Glob-regex` now supports `leftovers`, thus allowing `${regex}.ext`. It will now remove `.ext` and pass remaining string to regex parser.
* `Glob` and `Glob-regex` now properly replace `${title}` and `${regex}` with star (`*`). Earlier `dir\*\${title}.ext` would become `dir\*\*`. Not it will be replaced like this - `dir\*\*.ext`. This will eliminate a lot of "failed matches" messages and should increase `node-glob` performance.
* All image providers now have 40 seconds timeout and 3 retries. This should address #3
* Parser no longer needs executable location. If left empty, a file, returned by parser, will be used as executable. This allows to use custom batch files that do not require executable. Technically, any non-steam game can be added now.
* Title prefix and suffix fields replaced by one `Title modifier` field.
* Changed list data merging from `title` to `appID`. This means that games may now have the same titles, BUT they must have different executable path (case sensitive).
* Image retrieve logic. Images are now retrieved in background, allowing user to view currently available images.
* Internal data structure has changed to allow unique configurations for multiple apps per multiple user accounts per multiple directories.
* Using the new API for `SteamGridDB`.

### Fixed
* Properly show image url retrieve errors.

### Removed
* Prefered image list is removed as it is impossible to implement with background image downloader.
* ConsoleGrid support, because it's dead.
* Greedy mode option.

## 1.1.4 - 2017-05-02
### Fixed
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM electronuserland/electron-builder:base
WORKDIR /app
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - && apt-get install -y nodejs && curl -L https://npmjs.org/install.sh | sh && npm cache clean && npm config set unsafe-perm true && npm completion >> ~/.bashrc && apt-get clean && rm -rf /var/lib/apt/lists/*
18 changes: 12 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "steam-rom-manager",
"version": "1.2.1",
"version": "2.0.0",
"license": "GPL-3.0",
"description": "An app for managing ROMs in Steam",
"author": {
Expand Down Expand Up @@ -41,13 +41,17 @@
"scripts": {
"build:main": "cross-env NODE_ENV=production webpack --config ./webpack/main.js",
"build:renderer": "cross-env NODE_ENV=production webpack --config ./webpack/renderer.js",
"build:win": "rimraf release && npm run build && build --win --ia32 --x64",
"build:linux": "rimraf release && npm run build && build --linux --ia32 --x64",
"build": "rimraf dist && npm run build:main && npm run build:renderer",
"build:dist": "rimraf dist && npm run build:main && npm run build:renderer",
"build:win": "npm run build:dist && build --win --ia32 --x64",
"build:linux": "npm run build:dist && build --linux --ia32 --x64",
"build:all:forWin": "npm run build:win && npm run docker:build:linux",
"watch:main": "webpack --watch --config ./webpack/main.js",
"watch:renderer": "webpack --watch --config ./webpack/renderer.js",
"start": "./node_modules/.bin/electron ./dist/main.bundle.js",
"clean": "rimraf dist release"
"clean": "rimraf dist release",
"docker:create": "docker build -t srm-linux .",
"docker:install-dependencies": "docker run -v %cd%:/app -v node_modules:/app/node_modules srm-linux npm install",
"docker:build:linux": "docker run -v %cd%:/app -v node_modules:/app/node_modules srm-linux npm run build:linux"
},
"dependencies": {
"@angular/animations": "^4.0.3",
Expand All @@ -59,6 +63,7 @@
"@angular/platform-browser": "^4.0.3",
"@angular/platform-browser-dynamic": "^4.0.3",
"@angular/router": "^4.0.3",
"async": "^2.4.1",
"blob-to-buffer": "^1.2.6",
"colornames": "^1.1.1",
"crc": "^3.4.4",
Expand All @@ -78,6 +83,7 @@
"zone.js": "^0.8.5"
},
"devDependencies": {
"@types/async": "^2.0.40",
"@types/crc": "^3.4.0",
"@types/electron": "^1.4.37",
"@types/fs-extra": "^2.1.0",
Expand All @@ -89,10 +95,10 @@
"awesome-typescript-loader": "^3.1.2",
"cross-env": "^4.0.0",
"css-loader": "^0.28.0",
"extract-zip": "=1.6.0",
"electron": "^1.6.7",
"electron-builder": "^17.0.1",
"extract-text-webpack-plugin": "^2.1.0",
"extract-zip": "=1.6.0",
"file-loader": "^0.11.1",
"html-loader": "^0.4.5",
"html-webpack-plugin": "^2.28.0",
Expand Down
14 changes: 5 additions & 9 deletions src/renderer/app.routing.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { PreviewComponent, LoggerComponent, ParsersComponent, HacksComponent } from './components';
import { PreviewComponent, LoggerComponent, ParsersComponent, SettingsComponent } from './components';

const AppRouter: Routes = [
{
Expand All @@ -17,17 +17,13 @@ const AppRouter: Routes = [
component: LoggerComponent
},
{
path: 'hacks',
component: HacksComponent
path: 'settings',
component: SettingsComponent
},
{
path: 'parsers/:index',
component: ParsersComponent
},
{
path: '**',
component: PreviewComponent
},
}
];

export const AppRoutes: ModuleWithProviders = RouterModule.forRoot(AppRouter, { useHash: true });
export const AppRoutes: ModuleWithProviders = RouterModule.forRoot(AppRouter, { useHash: true, initialNavigation: false });
44 changes: 35 additions & 9 deletions src/renderer/components/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,43 @@
import { Component, ChangeDetectionStrategy } from '@angular/core';
import { Component, ChangeDetectionStrategy, ChangeDetectorRef, OnDestroy } from '@angular/core';
import { SettingsService } from "../services";
import { Router } from "@angular/router";
import { Subscription } from 'rxjs';

@Component({
selector: 'app',
template: `
<titlebar></titlebar>
<section>
<nav></nav>
<router-outlet></router-outlet>
</section>
<theme></theme>
<alert></alert>
<ng-container *ngIf="setttingsLoaded; else stillLoading">
<titlebar></titlebar>
<section>
<nav></nav>
<router-outlet></router-outlet>
</section>
<theme></theme>
<alert></alert>
</ng-container>
<ng-template #stillLoading>
<div class="appLoading loadingSettings"></div>
</ng-template>
`,
styleUrls: ['../styles/app.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class AppComponent { }
export class AppComponent implements OnDestroy {
private setttingsLoaded: boolean = false;
private subscriptions: Subscription = new Subscription();

constructor(private settingsService: SettingsService, private router: Router, private changeDetectionRef: ChangeDetectorRef) {
this.subscriptions.add(this.settingsService.getLoadStatusObservable().subscribe((loaded) => {
if (loaded) {
this.setttingsLoaded = loaded;
this.router.initialNavigation();
this.changeDetectionRef.detectChanges();
this.subscriptions.unsubscribe();
}
}));
}

ngOnDestroy() {
this.subscriptions.unsubscribe();
}
}
10 changes: 0 additions & 10 deletions src/renderer/components/hacks.component.ts

This file was deleted.

5 changes: 3 additions & 2 deletions src/renderer/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ export * from './nav-expand.component';
export * from './theme.component';
export * from './ng-select.component';
export * from './ng-option.component';
export * from './ng-button.component';
export * from './hacks.component';
export * from './ng-var.component';
export * from './ng-toggle-button.component';
export * from './settings.component';
3 changes: 3 additions & 0 deletions src/renderer/components/logger.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { Observable } from 'rxjs';
<div class="error" [class.active]="settings.showErrors" (click)="settings.showErrors = !settings.showErrors">ERROR</div>
<div class="info" [class.active]="settings.showInfo" (click)="settings.showInfo = !settings.showInfo">INFO</div>
<div class="success" [class.active]="settings.showSuccesses" (click)="settings.showSuccesses = !settings.showSuccesses">SUCCESS</div>
<div class="fuzzy" [class.active]="settings.showFuzzy" (click)="settings.showFuzzy = !settings.showFuzzy">FUZZY</div>
<div class="timestamp" [class.active]="settings.timestamp" (click)="settings.timestamp = !settings.timestamp">TIMESTAMP</div>
<div class="textWrap" [class.active]="settings.textWrap" (click)="settings.textWrap = !settings.textWrap">TEXT-WRAP</div>
<div class="autoscroll" [class.active]="settings.autoscroll" (click)="settings.autoscroll = !settings.autoscroll">AUTOSCROLL</div>
Expand Down Expand Up @@ -67,6 +68,8 @@ export class LoggerComponent {
return this.settings.showInfo;
case 'success':
return this.settings.showSuccesses;
case 'fuzzy':
return this.settings.showFuzzy;
default:
return false;
}
Expand Down
79 changes: 79 additions & 0 deletions src/renderer/components/ng-toggle-button.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import { Component, forwardRef, ElementRef, ViewChildren, QueryList, Input, EventEmitter, Output } from '@angular/core';
import { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';

@Component({
selector: 'ng-toggle-button',
template: `
<div *ngIf="!contentOnLeft" class="button" style="margin-right: 0.25em;">
<svg [class.active]="currentValue" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 220 100">
<path (click)="writeValue(!currentValue)" d="M60 10 c -60 0, -60 80, 0 80 h 100 c 60 0, 60 -80, 0 -80 h -100" stroke-width="3" />
<circle id="shape" (click)="writeValue(!currentValue)" [attr.cx]="(currentValue ? 165: 55)" cy="50" r="43" stroke-width="2">
<animate #animation begin="indefinite" attributeName="cx" dur="150ms" [attr.from]="(currentValue ? 55: 165)" [attr.to]="(currentValue ? 165: 55)" />
</circle>
</svg>
</div>
<div class="content">
<ng-content></ng-content>
</div>
<div *ngIf="contentOnLeft" class="button" style="margin-left: 0.25em;">
<svg [class.active]="currentValue" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 220 100">
<path (click)="writeValue(!currentValue)" d="M60 10 c -60 0, -60 80, 0 80 h 100 c 60 0, 60 -80, 0 -80 h -100" stroke-width="3" />
<circle id="shape" (click)="writeValue(!currentValue)" [attr.cx]="(currentValue ? 165: 55)" cy="50" r="43" stroke-width="2">
<animate #animation begin="indefinite" attributeName="cx" dur="150ms" [attr.from]="(currentValue ? 55: 165)" [attr.to]="(currentValue ? 165: 55)" />
</circle>
</svg>
</div>
`,
styleUrls: [
'../styles/ng-toggle-button.component.scss'
],
providers: [{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => ToggleButtonComponent),
multi: true
}]
})
export class ToggleButtonComponent implements ControlValueAccessor {
@Input('contentOnLeft') private contentOnLeft: boolean;
@ViewChildren('animation', { read: ElementRef }) private animation: QueryList<ElementRef>;
@Output() private change = new EventEmitter();
@Output() private touched = new EventEmitter();
private onTouchedNgModel: () => void = () => {};
private onChangeNgModel: (_: any) => void = () => {};
private currentValue: any = false;

constructor(private element: ElementRef) { }

@Input()
set value(value: any) {
let oldValue = this.currentValue;
this.currentValue = !!value;

if (value !== oldValue){
this.change.emit(value);
this.onChangeNgModel(value);
if (this.animation && this.animation.first){
this.animation.first.nativeElement.beginElement();
}
}

this.touched.emit();
this.onTouchedNgModel();
}

get value() {
return this.currentValue;
}

writeValue(value: any): void {
this.value = value;
}

registerOnChange(fn: (value: any) => any): void {
this.onChangeNgModel = fn;
}

registerOnTouched(fn: () => any): void {
this.onTouchedNgModel = fn;
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
import { Component, forwardRef, ElementRef, Optional, Host, HostListener, Input } from '@angular/core';
import { Component, forwardRef, ElementRef, Input } from '@angular/core';
import { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';

@Component({
selector: 'ng-button',
selector: 'ng-div, ng-span, ng-button',
template: `
<ng-content></ng-content>
`,
styleUrls: [
'../styles/ng-button.component.scss'
],
host: { '[class.open]': 'open' },
providers: [{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => ButtonComponent),
useExisting: forwardRef(() => VarComponent),
multi: true
}]
})
export class ButtonComponent implements ControlValueAccessor {
export class VarComponent implements ControlValueAccessor {
private currentValue: any;

constructor(private element: ElementRef) { }
Expand Down
Loading

0 comments on commit f2879e3

Please sign in to comment.