rename frontend to web and update contributing guide (#2509)

* rename frontend to web and update contributing guide

* rename this time

* fix build

* restructure rust code

* update documentation

* update descriptions

* Update CONTRIBUTING.md

Co-authored-by: J H <2364004+Blu-J@users.noreply.github.com>

---------

Co-authored-by: Aiden McClelland <me@drbonez.dev>
Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
Co-authored-by: J H <2364004+Blu-J@users.noreply.github.com>
This commit is contained in:
Matt Hill
2023-11-13 14:22:23 -07:00
committed by GitHub
parent 871f78b570
commit 86567e7fa5
968 changed files with 812 additions and 6672 deletions

View File

@@ -0,0 +1,11 @@
import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { IonicModule } from '@ionic/angular'
import { BackupReportPage } from './backup-report.page'
@NgModule({
declarations: [BackupReportPage],
imports: [CommonModule, IonicModule],
exports: [BackupReportPage],
})
export class BackupReportPageModule {}

View File

@@ -0,0 +1,44 @@
<ion-header>
<ion-toolbar>
<ion-title>Backup Report</ion-title>
<ion-buttons slot="end">
<ion-button (click)="dismiss()">
<ion-icon slot="icon-only" name="close"></ion-icon>
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-item-group>
<ion-item-divider>
Completed: {{ timestamp | date : 'medium' }}
</ion-item-divider>
<ion-item>
<ion-label>
<h2>System data</h2>
<p><ion-text [color]="system.color">{{ system.result }}</ion-text></p>
</ion-label>
<ion-icon
slot="end"
[name]="system.icon"
[color]="system.color"
></ion-icon>
</ion-item>
<ion-item *ngFor="let pkg of report?.packages | keyvalue">
<ion-label>
<h2>{{ pkg.key }}</h2>
<p>
<ion-text [color]="pkg.value.error ? 'danger' : 'success'">
{{ pkg.value.error ? 'Failed: ' + pkg.value.error : 'Succeeded' }}
</ion-text>
</p>
</ion-label>
<ion-icon
slot="end"
[name]="pkg.value.error ? 'remove-circle-outline' : 'checkmark'"
[color]="pkg.value.error ? 'danger' : 'success'"
></ion-icon>
</ion-item>
</ion-item-group>
</ion-content>

View File

@@ -0,0 +1,47 @@
import { Component, Input } from '@angular/core'
import { ModalController } from '@ionic/angular'
import { BackupReport } from 'src/app/services/api/api.types'
@Component({
selector: 'backup-report',
templateUrl: './backup-report.page.html',
styleUrls: ['./backup-report.page.scss'],
})
export class BackupReportPage {
@Input() report!: BackupReport
@Input() timestamp!: string
system!: {
result: string
icon: 'remove' | 'remove-circle-outline' | 'checkmark'
color: 'dark' | 'danger' | 'success'
}
constructor(private readonly modalCtrl: ModalController) {}
ngOnInit() {
if (!this.report.server.attempted) {
this.system = {
result: 'Not Attempted',
icon: 'remove',
color: 'dark',
}
} else if (this.report.server.error) {
this.system = {
result: `Failed: ${this.report.server.error}`,
icon: 'remove-circle-outline',
color: 'danger',
}
} else {
this.system = {
result: 'Succeeded',
icon: 'checkmark',
color: 'success',
}
}
}
async dismiss() {
return this.modalCtrl.dismiss(true)
}
}