mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 20:43:41 +00:00
0.2.5 initial commit
Makefile incomplete
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<ion-item lines="none" *ngIf="$error$ | async as error" class="notifier-item" style="margin-top: 12px">
|
||||
<ion-label class="ion-text-wrap" color="danger"><p>{{ error }}</p></ion-label>
|
||||
<ion-button *ngIf="dismissable" size="small" slot="end" fill="outline" color="danger" (click)="clear()">
|
||||
<ion-icon style="height: 12px; width: 12px;" name="close"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-item>
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core'
|
||||
import { CommonModule } from '@angular/common'
|
||||
import { ErrorMessageComponent } from './error-message.component'
|
||||
import { IonicModule } from '@ionic/angular'
|
||||
import { RouterModule } from '@angular/router'
|
||||
import { SharingModule } from 'src/app/modules/sharing.module'
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
ErrorMessageComponent,
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
IonicModule,
|
||||
RouterModule.forChild([]),
|
||||
SharingModule,
|
||||
],
|
||||
exports: [ErrorMessageComponent],
|
||||
})
|
||||
export class ErrorMessageComponentModule { }
|
||||
@@ -0,0 +1,10 @@
|
||||
.error-message {
|
||||
--background: var(--ion-color-danger);
|
||||
margin: 12px;
|
||||
border-radius: 3px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.legacy-error-message {
|
||||
margin: 5px;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { Component, Input, OnInit } from '@angular/core'
|
||||
import { BehaviorSubject } from 'rxjs'
|
||||
|
||||
@Component({
|
||||
selector: 'error-message',
|
||||
templateUrl: './error-message.component.html',
|
||||
styleUrls: ['./error-message.component.scss'],
|
||||
})
|
||||
export class ErrorMessageComponent implements OnInit {
|
||||
@Input() $error$: BehaviorSubject<string | undefined> = new BehaviorSubject(undefined)
|
||||
@Input() dismissable = true
|
||||
|
||||
constructor () { }
|
||||
ngOnInit () { }
|
||||
|
||||
clear () {
|
||||
this.$error$.next(undefined)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user