upgrade and migrate

This commit is contained in:
_Bastler
2022-12-09 22:04:35 +01:00
parent edecc344e7
commit 92a74e72f9
74 changed files with 4624 additions and 4917 deletions
+2 -2
View File
@@ -2,6 +2,6 @@
{{text}}
</mat-dialog-content>
<mat-dialog-actions>
<button mat-raised-button [mat-dialog-close]="true" color="accent" matAutofocus>{{'confirm' | i18n}}</button>
<button mat-button [mat-dialog-close]="false">{{'cancel' | i18n}}</button>
<a mat-raised-button [mat-dialog-close]="true" color="accent" matAutofocus>{{'confirm' | i18n}}</a>
<a mat-button [mat-dialog-close]="false">{{'cancel' | i18n}}</a>
</mat-dialog-actions>
@@ -1,18 +1,21 @@
<div fxLayout="row wrap" fxLayoutAlign="start stretch">
<div fxFlex="33%">
<div class="flex wrap" fxLayoutAlign="start stretch">
<div [style.flex-basis]="'33%'">
<mat-form-field>
<input matInput type="number" min="0" placeholder="{{'durationpicker.days' | i18n}}" [formControl]="days">
<mat-label>{{'durationpicker.days' | i18n}}</mat-label>
<input matInput type="number" min="0" [formControl]="days">
</mat-form-field>
</div>
<div fxFlex="33%">
<div [style.flex-basis]="'33%'">
<mat-form-field>
<input matInput type="number" min="0" max="23" placeholder="{{'durationpicker.hours' | i18n}}"
<mat-label>{{'durationpicker.hours' | i18n}}</mat-label>
<input matInput type="number" min="0" max="23"
[formControl]="hours">
</mat-form-field>
</div>
<div fxFlex="33%">
<div [style.flex-basis]="'33%'">
<mat-form-field>
<input matInput type="number" min="0" max="59" placeholder="{{'durationpicker.minutes' | i18n}}"
<mat-label>{{'durationpicker.minutes' | i18n}}</mat-label>
<input matInput type="number" min="0" max="59"
[formControl]="minutes">
<mat-hint align="end">{{duration}}</mat-hint>
</mat-form-field>
+5 -5
View File
@@ -1,6 +1,6 @@
<mat-toolbar color="primary">
<a href="javascript:" mat-icon-button>
<mat-icon (click)="sidenav.toggle()">menu</mat-icon>
<a href="javascript:" mat-icon-button (click)="sidenav.toggle()">
<mat-icon>menu</mat-icon>
</a>
<mat-icon svgIcon="logo"></mat-icon>
<span>
@@ -9,17 +9,17 @@
<span class="spacer"></span>
<ng-container>
<button mat-button [matMenuTriggerFor]="menu">
<a mat-button [matMenuTriggerFor]="menu">
<mat-icon>settings</mat-icon>
<mat-icon>arrow_drop_down</mat-icon>
</button>
</a>
<mat-menu #menu="matMenu">
<a *ngIf="!auth || auth && !auth.authenticated" routerLink="/login" routerLinkActive="active" mat-menu-item>
<mat-icon>login</mat-icon> {{'login' | i18n}}
</a>
<mat-divider *ngIf="!auth || auth && !auth.authenticated"></mat-divider>
<a *ngFor="let locale of locales" mat-menu-item (click)="setLocale(locale)">{{'locale.' + locale + '.long' |
i18n}} <mat-icon inline=true *ngIf="locale == currentLocale">done</mat-icon></a>
i18n}} <mat-icon *ngIf="locale == currentLocale">done</mat-icon></a>
<a mat-menu-item>
<mat-slide-toggle (change)="darkThemeChange($event)" [checked]="darkTheme == 'true'">
{{'profileField.name.darkTheme' | i18n}}
@@ -3,9 +3,9 @@
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef mat-sort-header="name"> {{'permissions.name' | i18n}} </th>
<td mat-cell *matCellDef="let permission">
<mat-icon inline=true>{{'services.' + permission.name + '.icon' | i18n}}</mat-icon>
<mat-icon inline="true">{{'services.' + permission.name + '.icon' | i18n}}</mat-icon>
{{'services.' + permission.name + '.title' | i18n}}
<mat-icon inline=true *ngIf="permission.addon">add_circle</mat-icon>
<mat-icon inline="true" *ngIf="permission.addon">add_circle</mat-icon>
<br>
<small>{{'services.' + permission.name + '.subtitle' | i18n}}</small>
</td>
@@ -13,9 +13,9 @@
i18n}}</a>
<a mat-raised-button (click)="copyKey(privkey)">{{'pgp.privateKey.copyKey' |
i18n}}</a>
<button mat-icon-button #privateKeyHelp="matTooltip" (click)="privateKeyHelp.toggle()" [matTooltip]="'pgp.privateKey.help' | i18n" matTooltipPosition="after">
<a mat-icon-button #privateKeyHelp="matTooltip" (click)="privateKeyHelp.toggle()" [matTooltip]="'pgp.privateKey.help' | i18n" matTooltipPosition="after">
<mat-icon>help</mat-icon>
</button>
</a>
</mat-dialog-actions>
<br />
<mat-dialog-actions>
@@ -23,6 +23,6 @@
<mat-slide-toggle [(ngModel)]="data.confirmClose" [disabled]="!downloaded">
{{'pgp.privateKey.confirmStore' | i18n}}
</mat-slide-toggle>
<button mat-button [mat-dialog-close]="false">{{'cancel' | i18n}}</button>
<button mat-button color="accent" [disabled]="!data.confirmClose" [mat-dialog-close]="data.publicKey">{{'ok' | i18n}}</button>
<a mat-button [mat-dialog-close]="false">{{'cancel' | i18n}}</a>
<a mat-button color="accent" [disabled]="!data.confirmClose" [mat-dialog-close]="data.publicKey">{{'ok' | i18n}}</a>
</mat-dialog-actions>
@@ -5,5 +5,5 @@
</pre>
</mat-dialog-content>
<mat-dialog-actions>
<button mat-button mat-dialog-close>{{'close' | i18n}}</button>
<a mat-button mat-dialog-close>{{'close' | i18n}}</a>
</mat-dialog-actions>
@@ -2,15 +2,16 @@
<mat-dialog-content>
<form [formGroup]="form">
<mat-form-field>
<input matInput type="text" min="3" [(ngModel)]="profileField.name" formControlName="name"
placeholder="{{'profileField.name' | i18n}}">
<mat-label>{{'profileField.name' | i18n}}</mat-label>
<input matInput type="text" min="3" [(ngModel)]="profileField.name" formControlName="name">
<mat-error>
{{'profileField.error.name' | i18n}}
</mat-error>
</mat-form-field>
<mat-form-field>
<mat-select [(ngModel)]="profileField.type" formControlName="type" placeholder="{{'profileField.type' | i18n}}">
<mat-label>{{'profileField.type' | i18n}}</mat-label>
<mat-select [(ngModel)]="profileField.type" formControlName="type">
<mat-option *ngFor="let type of types" [value]="type">
{{'profileField.type.' + type | i18n}}
</mat-option>
@@ -22,15 +23,15 @@
<div [ngSwitch]="profileField.type">
<mat-form-field *ngSwitchCase="'TEXT'">
<input matInput type="text" max="255" [(ngModel)]="profileField.value" formControlName="value"
placeholder="{{'profileField.value' | i18n}}">
<mat-label>{{'profileField.value' | i18n}}</mat-label>
<input matInput type="text" max="255" [(ngModel)]="profileField.value" formControlName="value">
<mat-error>
{{'profileField.error.TEXT' | i18n}}
</mat-error>
</mat-form-field>
<mat-form-field *ngSwitchCase="'DATE'">
<input matInput [matDatepicker]="datePicker" [(ngModel)]="profileField.value" formControlName="value"
placeholder="{{'profileField.value' | i18n}}">
<mat-label>{{'profileField.value' | i18n}}</mat-label>
<input matInput [matDatepicker]="datePicker" [(ngModel)]="profileField.value" formControlName="value">
<mat-datepicker-toggle matSuffix [for]="datePicker"></mat-datepicker-toggle>
<mat-datepicker #datePicker></mat-datepicker>
<mat-error>
@@ -38,8 +39,9 @@
</mat-error>
</mat-form-field>
<mat-form-field *ngSwitchCase="'DATETIME'">
<input matInput [ngxMatDatetimePicker]="datetimePicker" [(ngModel)]="profileField.value" formControlName="value"
placeholder="{{'profileField.value' | i18n}}">
<mat-label>{{'profileField.value' | i18n}}</mat-label>
<input matInput [ngxMatDatetimePicker]="datetimePicker" [(ngModel)]="profileField.value"
formControlName="value">
<mat-datepicker-toggle matSuffix [for]="datetimePicker"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #datetimePicker></ngx-mat-datetime-picker>
<mat-error>
@@ -47,15 +49,15 @@
</mat-error>
</mat-form-field>
<mat-form-field *ngSwitchCase="'URL'">
<input matInput type="url" [(ngModel)]="profileField.value" formControlName="value"
placeholder="{{'profileField.value' | i18n}}">
<mat-label>{{'profileField.value' | i18n}}</mat-label>
<input matInput type="url" [(ngModel)]="profileField.value" formControlName="value">
<mat-error>
{{'profileField.error.URL' | i18n}}
</mat-error>
</mat-form-field>
<mat-form-field *ngSwitchCase="'EMAIL'">
<input matInput type="email" [(ngModel)]="profileField.value" formControlName="value"
placeholder="{{'profileField.value' | i18n}}">
<mat-label>{{'profileField.value' | i18n}}</mat-label>
<input matInput type="email" [(ngModel)]="profileField.value" formControlName="value">
<mat-error>
{{'profileField.error.EMAIL' | i18n}}
</mat-error>
@@ -65,16 +67,16 @@
{{'profileField.value' | i18n}}
</mat-slide-toggle>
<mat-form-field *ngSwitchCase="'NUMBER'">
<input matInput type="number" [(ngModel)]="profileField.value" formControlName="value"
placeholder="{{'profileField.value' | i18n}}">
<mat-label>{{'profileField.value' | i18n}}</mat-label>
<input matInput type="number" [(ngModel)]="profileField.value" formControlName="value">
<mat-error>
{{'profileField.error.NUMBER' | i18n}}
</mat-error>
</mat-form-field>
<div *ngSwitchCase="'BLOB'">
<mat-form-field>
<textarea matInput [(ngModel)]="profileField.blob" formControlName="blob"
placeholder="{{'profileField.value' | i18n}}"></textarea>
<mat-label>{{'profileField.value' | i18n}}</mat-label>
<textarea matInput [(ngModel)]="profileField.blob" formControlName="blob"></textarea>
<mat-error>
{{'profileField.error.BLOB' | i18n}}
</mat-error>
@@ -85,8 +87,8 @@
<mat-form-field>
<mat-select [(ngModel)]="profileField.visibility" formControlName="visibility"
placeholder="{{'visibility' | i18n}}">
<mat-label>{{'visibility' | i18n}}</mat-label>
<mat-select [(ngModel)]="profileField.visibility" formControlName="visibility">
<mat-option *ngFor="let visibility of visibilities" [value]="visibility">
<mat-icon inline="true">{{'visibility.' + visibility + '.icon' | i18n}}</mat-icon> {{'visibility.' +
visibility | i18n}}
@@ -104,8 +106,8 @@
</mat-form-field>
<mat-form-field>
<input matInput type="number" min="0" [(ngModel)]="profileField.index" formControlName="index"
placeholder="{{'profileField.index' | i18n}}">
<input matInput type="number" min="0" [(ngModel)]="profileField.index" formControlName="index">
<mat-label>{{'profileField.index' | i18n}}</mat-label>
<mat-error>
{{'profileField.error.index' | i18n}}
</mat-error>
@@ -113,7 +115,7 @@
</form>
</mat-dialog-content>
<mat-dialog-actions>
<button mat-button [mat-dialog-close]="false">{{'cancel' | i18n}}</button>
<button [disabled]="form.invalid" mat-raised-button (click)="save(profileField)" color="accent">{{'save' |
i18n}}</button>
<a mat-button [mat-dialog-close]="false">{{'cancel' | i18n}}</a>
<a [disabled]="form.invalid" mat-raised-button (click)="save(profileField)" color="accent">{{'save' |
i18n}}</a>
</mat-dialog-actions>
@@ -16,7 +16,7 @@
<a *ngSwitchCase="'URL'" class="accent" href="{{profileField.value}}">{{profileField.value}}</a>
<a *ngSwitchCase="'EMAIL'" class="accent" href="mailto:{{profileField.value}}">{{profileField.value}}</a>
<span *ngSwitchCase="'NUMBER'">{{profileField.value}}</span>
<button *ngSwitchCase="'BLOB'" mat-raised-button (click)="openBlob(profileField)">{{'profileField.openBlob' | i18n}}</button>
<a *ngSwitchCase="'BLOB'" mat-raised-button (click)="openBlob(profileField)">{{'profileField.openBlob' | i18n}}</a>
<mat-slide-toggle *ngSwitchCase="'BOOL'" [checked]="profileField.value == 'true'" disabled>
</mat-slide-toggle>
</div>
@@ -34,8 +34,8 @@
<ng-container matColumnDef="edit" *ngIf="edit">
<th mat-header-cell *matHeaderCellDef class="text-right"> {{'profileField.edit' | i18n}} </th>
<td mat-cell *matCellDef="let profileField" class="text-right">
<a mat-icon-button>
<mat-icon (click)="openEdit(profileField)">edit</mat-icon>
<a mat-icon-button (click)="openEdit(profileField)">
<mat-icon>edit</mat-icon>
</a>
</td>
</ng-container>
@@ -43,8 +43,8 @@
<ng-container matColumnDef="delete" *ngIf="edit">
<th mat-header-cell *matHeaderCellDef class="align-right"> {{'profileField.delete' | i18n}} </th>
<td mat-cell *matCellDef="let profileField" class="text-right">
<a mat-icon-button>
<mat-icon (click)="confirmDelete(profileField)">delete</mat-icon>
<a mat-icon-button (click)="confirmDelete(profileField)">
<mat-icon>delete</mat-icon>
</a>
</td>
</ng-container>
@@ -54,6 +54,6 @@
</table>
<br>
<div *ngIf="edit" class="text-center">
<button mat-raised-button color="primary" (click)="openCreate()">{{'profileField.create' |
i18n}}</button>
<a mat-raised-button color="primary" (click)="openCreate()">{{'profileField.create' |
i18n}}</a>
</div>
@@ -1,16 +1,3 @@
table {
width: 100%;
}
.mat-header-cell,
.mat-cell {
&.text-right {
text-align: right;
}
}
.align-right {
display: flex;
padding: 21px 0;
justify-content: flex-end;
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef mat-sort-header="name"> {{'quotas.name' | i18n}} </th>
<td mat-cell *matCellDef="let quota">
<mat-icon inline=true>{{'services.' + quota.name + '.icon' | i18n}}</mat-icon>
<mat-icon inline="true">{{'services.' + quota.name + '.icon' | i18n}}</mat-icon>
{{'services.' + quota.name + '.title' | i18n}}
</td>
</ng-container>
@@ -1,10 +1,12 @@
<div fxLayout="row wrap" fxLayoutGap="24px grid">
<div fxFlex="33%" fxFlex.sm="50%" fxFlex.xs="100%" *ngFor="let service of services">
<div class="service-grid" fxLayoutGap="24px grid">
<div *ngFor="let service of services">
<mat-card>
<a *ngIf="service.url" href="{{service.url}}" [target]="service.sameSite ? '_self' : '_blank'"
color="accent">
<mat-card-header>
<mat-icon mat-card-avatar>{{'services.' + service.name + '.icon' | i18n}}</mat-icon>
<div class="icon" mat-card-avatar>
<mat-icon>{{'services.' + service.name + '.icon' | i18n}}</mat-icon>
</div>
<mat-card-title> <strong>{{'services.' + service.name + '.title' | i18n}}</strong>
<mat-icon *ngIf="!service.sameSite" inline="true">
open_in_new</mat-icon>
@@ -14,7 +16,9 @@
</a>
<mat-card-header *ngIf="!service.url">
<mat-icon mat-card-avatar>{{'services.' + service.name + '.icon' | i18n}}</mat-icon>
<div class="icon" mat-card-avatar>
<mat-icon>{{'services.' + service.name + '.icon' | i18n}}</mat-icon>
</div>
<mat-card-title> <strong>{{'services.' + service.name + '.title' | i18n}}</strong>
</mat-card-title>
<mat-card-subtitle>{{'services.' + service.name + '.subtitle' | i18n}}</mat-card-subtitle>
@@ -1,22 +1,50 @@
@import '../../../variables.scss';
mat-card {
display: flex;
flex-direction: column;
height: 100%;
.service-grid {
a {
text-decoration: none;
color: inherit;
display: grid;
column-gap: 24px;
row-gap: 24px;
mat-card-title {
color: $accent;
@media (min-width: 576px) {
grid-template-columns: 1fr;
}
@media (min-width: 768px) {
grid-template-columns: 1fr 1fr;
}
@media (min-width: 992px) {
grid-template-columns: 1fr 1fr 1fr;
}
mat-card {
display: flex;
flex-direction: column;
height: 100%;
a {
text-decoration: none;
color: inherit;
mat-card-title {
color: $accent;
}
}
mat-card-header {
.icon {
display: flex;
justify-content: center;
align-items: center;
}
}
mat-card-content {
flex-grow: 1;
overflow: auto;
}
}
mat-card-content {
flex-grow: 1;
overflow: auto;
}
}
}