mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-25 01:58:35 +01:00
Add setting.json about skinnable #3241
This commit is contained in:
parent
f03a1b0f3e
commit
2ff41664b2
@ -1,6 +1,6 @@
|
|||||||
<div class="login-wrapper login-wrapper-override" [ngStyle]="{'background-image': 'url(' + customLoginBgImg + ')'}">
|
<div class="login-wrapper login-wrapper-override" [ngStyle]="{'background-image': 'url(' + customLoginBgImg + ')'}">
|
||||||
<form #signInForm="ngForm" class="login">
|
<form #signInForm="ngForm" class="login">
|
||||||
<label class="title">{{appTitle | translate}}<span class="trademark tm-font">™</span>
|
<label class="title"> {{customAppTitle? customAppTitle:(appTitle | translate)}}<span class="trademark tm-font">™</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="login-group">
|
<div class="login-group">
|
||||||
<label for="username" aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-top-left">
|
<label for="username" aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-top-left">
|
||||||
|
@ -51,6 +51,7 @@ export class SignInComponent implements AfterViewChecked, OnInit {
|
|||||||
rememberedName: string = "";
|
rememberedName: string = "";
|
||||||
|
|
||||||
customLoginBgImg: string;
|
customLoginBgImg: string;
|
||||||
|
customAppTitle: string;
|
||||||
//Form reference
|
//Form reference
|
||||||
signInForm: NgForm;
|
signInForm: NgForm;
|
||||||
@ViewChild('signInForm') currentForm: NgForm;
|
@ViewChild('signInForm') currentForm: NgForm;
|
||||||
@ -77,9 +78,14 @@ export class SignInComponent implements AfterViewChecked, OnInit {
|
|||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
// custom skin
|
// custom skin
|
||||||
let customSkinObj = this.skinableConfig.getSkinConfig();
|
let customSkinObj = this.skinableConfig.getSkinConfig();
|
||||||
if (customSkinObj && customSkinObj.loginBgImg) {
|
if (customSkinObj) {
|
||||||
|
if (customSkinObj.loginBgImg) {
|
||||||
this.customLoginBgImg = customSkinObj.loginBgImg;
|
this.customLoginBgImg = customSkinObj.loginBgImg;
|
||||||
}
|
}
|
||||||
|
if (customSkinObj.appTitle) {
|
||||||
|
this.customAppTitle = customSkinObj.appTitle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Make sure the updated configuration can be loaded
|
//Make sure the updated configuration can be loaded
|
||||||
this.appConfigService.load()
|
this.appConfigService.load()
|
||||||
|
15
src/ui_ng/src/setting.json
Normal file
15
src/ui_ng/src/setting.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"headerBgColor": "#004a70",
|
||||||
|
"headerLogo": "",
|
||||||
|
"loginBgImg": "",
|
||||||
|
"appTitle": "VMware Harbor",
|
||||||
|
"projects": {
|
||||||
|
"companyName": "vmware",
|
||||||
|
"projectName": "Harbor",
|
||||||
|
"introduction": {
|
||||||
|
"zh-cn": "",
|
||||||
|
"es-es": "",
|
||||||
|
"en-us": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user