mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 21:55:52 +02:00
Archive commit
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
.btn-group.d-flex(*ngIf="canInstall")
|
||||
button.btn.btn-lg.btn-outline-success.text-wrap.flex-grow-1((click)="install()")
|
||||
| Add #[b Pony Town] to {{isMobile ? 'home screen' : 'desktop'}}
|
||||
button.btn.btn-lg.btn-outline-success.flex-grow-0(
|
||||
(click)="dismiss()" title="Dismiss" [attr.aria-label]="'Dismiss add to ' + (isMobile ? 'home screen' : 'desktop')")
|
||||
fa-icon([icon]="closeIcon")
|
||||
@@ -0,0 +1,5 @@
|
||||
@import '../../../../styles/partials/variables';
|
||||
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { faTimes } from '../../../client/icons';
|
||||
import { InstallService } from '../../services/installService';
|
||||
import { isMobile } from '../../../client/data';
|
||||
|
||||
@Component({
|
||||
selector: 'install-button',
|
||||
templateUrl: 'install-button.pug',
|
||||
styleUrls: ['install-button.scss'],
|
||||
})
|
||||
export class InstallButton {
|
||||
readonly closeIcon = faTimes;
|
||||
constructor(private installService: InstallService) {
|
||||
}
|
||||
get canInstall() {
|
||||
return this.installService.canInstall;
|
||||
}
|
||||
get isMobile() {
|
||||
return isMobile;
|
||||
}
|
||||
install() {
|
||||
this.installService.install();
|
||||
}
|
||||
dismiss() {
|
||||
this.installService.dismiss();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user