mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 02:35:17 +01:00
commit
1bd3a790e7
@ -1,4 +1,4 @@
|
||||
<clr-modal [(clrModalOpen)]="opened" [clrModalStaticBackdrop]="staticBackdrop">
|
||||
<clr-modal [(clrModalOpen)]="opened" [clrModalStaticBackdrop]="staticBackdrop" [clrModalClosable]="false">
|
||||
<h3 class="modal-title">{{'PROFILE.TITLE' | translate}}</h3>
|
||||
<inline-alert class="modal-title" (confirmEvt)="confirmCancel($event)"></inline-alert>
|
||||
<div class="modal-body" style="overflow-y: hidden;">
|
||||
|
@ -97,14 +97,10 @@ export class AccountSettingsModalComponent implements OnInit, AfterViewChecked {
|
||||
}
|
||||
|
||||
for (var prop in this.originalStaticData) {
|
||||
if (this.originalStaticData[prop]) {
|
||||
if (this.account[prop]) {
|
||||
if (this.originalStaticData[prop] != this.account[prop]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<clr-modal [(clrModalOpen)]="opened" [clrModalStaticBackdrop]="true">
|
||||
<clr-modal [(clrModalOpen)]="opened" [clrModalStaticBackdrop]="true" [clrModalClosable]="false">
|
||||
<h3 class="modal-title">{{'CHANGE_PWD.TITLE' | translate}}</h3>
|
||||
<inline-alert class="modal-title" (confirmEvt)="confirmCancel($event)"></inline-alert>
|
||||
<div class="modal-body" style="overflow-y: hidden;">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<clr-modal [(clrModalOpen)]="opened" [clrModalStaticBackdrop]="staticBackdrop" [clrModalClosable]="true">
|
||||
<clr-modal [(clrModalOpen)]="opened" [clrModalStaticBackdrop]="staticBackdrop" [clrModalClosable]="false">
|
||||
<h3 class="modal-title">{{'SIGN_UP.TITLE' | translate}}</h3>
|
||||
<inline-alert class="modal-title" (confirmEvt)="confirmCancel($event)"></inline-alert>
|
||||
<div class="modal-body" style="overflow-y: hidden;">
|
||||
|
@ -9,6 +9,7 @@ export class AppConfig {
|
||||
this.project_creation_restriction = "everyone";
|
||||
this.self_registration = true;
|
||||
this.has_ca_root = false;
|
||||
this.harbor_version = "0.5.0";//default
|
||||
}
|
||||
|
||||
with_notary: boolean;
|
||||
@ -19,4 +20,5 @@ export class AppConfig {
|
||||
project_creation_restriction: string;
|
||||
self_registration: boolean;
|
||||
has_ca_root: boolean;
|
||||
harbor_version: string;
|
||||
}
|
@ -7,8 +7,6 @@
|
||||
<div style="height: 12px;"></div>
|
||||
<div>
|
||||
<span class="p5 about-version">{{'ABOUT.VERSION' | translate}} {{version}}</span>
|
||||
<span>|</span>
|
||||
<span class="p5 about-build">{{'ABOUT.BUILD' | translate}} {{build}}</span>
|
||||
</div>
|
||||
<div style="height: 12px;"></div>
|
||||
<div>
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
import { AppConfigService } from '../../app-config.service';
|
||||
|
||||
@Component({
|
||||
selector: 'about-dialog',
|
||||
templateUrl: "about-dialog.component.html",
|
||||
@ -7,9 +9,15 @@ import { Component } from '@angular/core';
|
||||
})
|
||||
export class AboutDialogComponent {
|
||||
private opened: boolean = false;
|
||||
private version: string ="0.4.1";
|
||||
private build: string = "4276418";
|
||||
|
||||
constructor(private appConfigService: AppConfigService) { }
|
||||
|
||||
public get version(): string {
|
||||
let appConfig = this.appConfigService.getConfig();
|
||||
return appConfig?appConfig.harbor_version: "n/a";
|
||||
}
|
||||
|
||||
public open(): void {
|
||||
this.opened = true;
|
||||
}
|
||||
|
@ -0,0 +1,4 @@
|
||||
.alert-text-blink {
|
||||
color: red;
|
||||
font-weight: bolder;
|
||||
}
|
@ -1,9 +1,10 @@
|
||||
<clr-alert [clrAlertType]="inlineAlertType" [clrAlertClosable]="inlineAlertClosable" [(clrAlertClosed)]="alertClose" [clrAlertAppLevel]="useAppLevelStyle">
|
||||
<div class="alert-item">
|
||||
<span class="alert-text">
|
||||
<span class="alert-text" [class.alert-text-blink]="blinking">
|
||||
{{errorMessage}}
|
||||
</span>
|
||||
<div class="alert-actions" *ngIf="showCancelAction">
|
||||
<button class="btn alert-action" (click)="close()">{{'BUTTON.NO' | translate}}</button>
|
||||
<button class="btn alert-action" (click)="confirmCancel()">{{'BUTTON.YES' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -2,18 +2,24 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { errorHandler } from '../shared.utils';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Subscription } from "rxjs";
|
||||
|
||||
@Component({
|
||||
selector: 'inline-alert',
|
||||
templateUrl: "inline-alert.component.html"
|
||||
templateUrl: "inline-alert.component.html",
|
||||
styleUrls: ['inline-alert.component.css']
|
||||
})
|
||||
export class InlineAlertComponent {
|
||||
private inlineAlertType: string = 'alert-danger';
|
||||
private inlineAlertClosable: boolean = true;
|
||||
private inlineAlertClosable: boolean = false;
|
||||
private alertClose: boolean = true;
|
||||
private displayedText: string = "";
|
||||
private showCancelAction: boolean = false;
|
||||
private useAppLevelStyle: boolean = false;
|
||||
private timer: Subscription = null;
|
||||
private count: number = 0;
|
||||
private blinking: boolean = false;
|
||||
|
||||
@Output() confirmEvt = new EventEmitter<boolean>();
|
||||
|
||||
@ -45,7 +51,7 @@ export class InlineAlertComponent {
|
||||
}
|
||||
this.inlineAlertType = 'alert-warning';
|
||||
this.showCancelAction = true;
|
||||
this.inlineAlertClosable = true;
|
||||
this.inlineAlertClosable = false;
|
||||
this.alertClose = false;
|
||||
this.useAppLevelStyle = false;
|
||||
}
|
||||
@ -68,6 +74,9 @@ export class InlineAlertComponent {
|
||||
this.alertClose = true;
|
||||
}
|
||||
|
||||
public blink() {
|
||||
}
|
||||
|
||||
private confirmCancel(): void {
|
||||
this.confirmEvt.emit(true);
|
||||
}
|
||||
|
@ -35,8 +35,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="statistic-item-divider"></div>
|
||||
<div class="statistic-block">
|
||||
<div class="statistic-item-divider" [hidden]="!isValidSession"></div>
|
||||
<div class="statistic-block" [hidden]="!isValidSession">
|
||||
<div>{{freeStorage}}GB | {{totalStorage}}GB</div>
|
||||
<div>[STORAGE]</div>
|
||||
</div>
|
||||
|
@ -26,8 +26,11 @@ export class StatisticsPanelComponent implements OnInit {
|
||||
private session: SessionService) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.isValidSession) {
|
||||
if (this.session.getCurrentUser()) {
|
||||
this.getStatistics();
|
||||
}
|
||||
|
||||
if (this.isValidSession) {
|
||||
this.getVolumes();
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
.statistic-data {
|
||||
font-size: 16px;
|
||||
font-weight: 900;
|
||||
font-family: "semibold";
|
||||
font-family: "Metropolis Semibold";
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
font-size: 10px;
|
||||
line-height: 10px;
|
||||
text-transform: uppercase;
|
||||
font-family: "semibold";
|
||||
font-family: "Metropolis Regular";
|
||||
}
|
||||
|
||||
.statistic-column-block {
|
||||
@ -30,6 +30,7 @@
|
||||
position: relative;
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
font-family: "Metropolis Regular";
|
||||
}
|
||||
|
||||
.statistic-column-title-pro {
|
||||
|
@ -1,4 +1,4 @@
|
||||
<clr-modal [(clrModalOpen)]="opened" [clrModalStaticBackdrop]="true">
|
||||
<clr-modal [(clrModalOpen)]="opened" [clrModalStaticBackdrop]="true" [clrModalClosable]="false">
|
||||
<h3 class="modal-title">{{'USER.ADD_USER_TITLE' | translate}}</h3>
|
||||
<inline-alert class="modal-title" (confirmEvt)="confirmCancel($event)"></inline-alert>
|
||||
<div class="modal-body" style="overflow-y: hidden;">
|
||||
|
Loading…
Reference in New Issue
Block a user