mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 21:55:52 +02:00
Revert codestyle changes (#40)
* Revert "7f7efbb94bab8574e42d942ad82d414e007b2970" Code style changes should probably be part of a PR
This commit is contained in:
@@ -4,29 +4,29 @@ import { AdminModel } from '../../../services/adminModel';
|
||||
import { Character } from '../../../../common/adminInterfaces';
|
||||
|
||||
@Component({
|
||||
selector: 'pony-info-remote',
|
||||
templateUrl: 'pony-info-remote.pug',
|
||||
selector: 'pony-info-remote',
|
||||
templateUrl: 'pony-info-remote.pug',
|
||||
})
|
||||
export class PonyInfoRemote implements OnDestroy {
|
||||
@Input() highlight = false;
|
||||
@Input() showName = false;
|
||||
pony?: Character;
|
||||
private _ponyId?: string;
|
||||
private subscription?: Subscription;
|
||||
constructor(private model: AdminModel) {
|
||||
}
|
||||
get ponyId() {
|
||||
return this._ponyId;
|
||||
}
|
||||
@Input() set ponyId(value: string | undefined) {
|
||||
if (this.ponyId !== value) {
|
||||
this._ponyId = value;
|
||||
this.pony = undefined;
|
||||
this.subscription && this.subscription.unsubscribe();
|
||||
this.subscription = value ? this.model.ponies.subscribe(value, pony => this.pony = pony) : undefined;
|
||||
}
|
||||
}
|
||||
ngOnDestroy() {
|
||||
this.subscription && this.subscription.unsubscribe();
|
||||
}
|
||||
@Input() highlight = false;
|
||||
@Input() showName = false;
|
||||
pony?: Character;
|
||||
private _ponyId?: string;
|
||||
private subscription?: Subscription;
|
||||
constructor(private model: AdminModel) {
|
||||
}
|
||||
get ponyId() {
|
||||
return this._ponyId;
|
||||
}
|
||||
@Input() set ponyId(value: string | undefined) {
|
||||
if (this.ponyId !== value) {
|
||||
this._ponyId = value;
|
||||
this.pony = undefined;
|
||||
this.subscription && this.subscription.unsubscribe();
|
||||
this.subscription = value ? this.model.ponies.subscribe(value, pony => this.pony = pony) : undefined;
|
||||
}
|
||||
}
|
||||
ngOnDestroy() {
|
||||
this.subscription && this.subscription.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user