mirror of
https://github.com/goharbor/harbor.git
synced 2024-10-31 23:59:32 +01:00
Merge pull request #9332 from jwangyangls/fix-setting-golobal-harbor
Fix setting.json bug
This commit is contained in:
commit
f5af75cc8a
@ -10,11 +10,10 @@ Open the `setting.json` file, you'll see the default content as shown below:
|
||||
"headerBgColor": "#004a70",
|
||||
"headerLogo": "",
|
||||
"loginBgImg": "",
|
||||
"appTitle": "",
|
||||
"product": {
|
||||
"title": "Harbor",
|
||||
"company": "goharbor",
|
||||
"name": "Harbor",
|
||||
"introductions": {
|
||||
"introduction": {
|
||||
"zh-cn": "",
|
||||
"es-es": "",
|
||||
"en-us": ""
|
||||
|
@ -58,8 +58,8 @@ export class GlobalSearchComponent implements OnInit, OnDestroy {
|
||||
ngOnInit(): void {
|
||||
// custom skin
|
||||
let customSkinObj = this.skinableConfig.getProject();
|
||||
if (customSkinObj && customSkinObj.projectName) {
|
||||
this.translate.get('GLOBAL_SEARCH.PLACEHOLDER', {'param': customSkinObj.projectName}).subscribe(res => {
|
||||
if (customSkinObj && customSkinObj.name) {
|
||||
this.translate.get('GLOBAL_SEARCH.PLACEHOLDER', {'param': customSkinObj.name}).subscribe(res => {
|
||||
// Placeholder text
|
||||
this.placeholderText = res;
|
||||
});
|
||||
|
@ -2,9 +2,9 @@
|
||||
<div class="branding">
|
||||
<a href="javascript:void(0)" class="nav-link" (click)="homeAction()">
|
||||
<!-- <clr-icon shape="vm-bug" *ngIf="!customStyle?.headerLogo"></clr-icon> -->
|
||||
<img [src]="'images/harbor-logo.svg'" class="harbor-logo" />
|
||||
<img [attr.src]="'static/images/'+customStyle?.headerLogo" *ngIf="customStyle?.headerLogo" class="headerLogo">
|
||||
<span class="title">{{customProjectName?.projectName? customProjectName?.projectName:(appTitle | translate)}}</span>
|
||||
<img [attr.src]="'images/'+customStyle?.headerLogo" *ngIf="customStyle?.headerLogo;else elseBlock" class="headerLogo">
|
||||
<ng-template #elseBlock><img [src]="'images/harbor-logo.svg'" class="harbor-logo" /></ng-template>
|
||||
<span class="title">{{customProjectName?.name? customProjectName?.name:(appTitle | translate)}}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="header-nav">
|
||||
|
@ -61,8 +61,8 @@ export class NavigatorComponent implements OnInit {
|
||||
// custom skin
|
||||
let customSkinObj = this.skinableConfig.getSkinConfig();
|
||||
if (customSkinObj) {
|
||||
if (customSkinObj.projects) {
|
||||
this.customProjectName = customSkinObj.projects;
|
||||
if (customSkinObj.product) {
|
||||
this.customProjectName = customSkinObj.product;
|
||||
}
|
||||
this.customStyle = customSkinObj;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
<img [src]="'images/harbor-logo.svg'" class="harbor-icon">
|
||||
</div>
|
||||
<div class="content">
|
||||
<div>{{customName?.projectName? customName?.projectName : ('APP_TITLE.HARBOR' | translate)}}</div>
|
||||
<div>{{customName?.name? customName?.name : ('APP_TITLE.HARBOR' | translate)}}</div>
|
||||
<div>
|
||||
<span class="p5 about-version">{{'ABOUT.VERSION' | translate}} {{version}}</span>
|
||||
</div>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<global-message [isAppLevel]="true"></global-message>
|
||||
<navigator></navigator>
|
||||
<search-result></search-result>
|
||||
<div class="login-wrapper" [ngStyle]="{'background-image': customLoginBgImg? 'url(static/images/' + customLoginBgImg + ')': ''}">
|
||||
<div class="login-wrapper" [ngStyle]="{'background-image': customLoginBgImg? 'url(/images/' + customLoginBgImg + ')': ''}">
|
||||
<form #signInForm="ngForm" class="login">
|
||||
<label class="title"> {{customAppTitle? customAppTitle:(appTitle | translate)}}
|
||||
</label>
|
||||
|
@ -23,7 +23,7 @@ export class SkinableConfig {
|
||||
|
||||
public getProject() {
|
||||
if (this.customSkinData) {
|
||||
return this.customSkinData.project;
|
||||
return this.customSkinData.product;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@ -3,9 +3,8 @@
|
||||
"headerLogo": "",
|
||||
"loginBgImg": "",
|
||||
"appTitle": "",
|
||||
"project": {
|
||||
"companyName": "",
|
||||
"projectName": "",
|
||||
"product": {
|
||||
"name": "",
|
||||
"introduction": {
|
||||
"zh-cn": "",
|
||||
"es-es": "",
|
||||
|
Loading…
Reference in New Issue
Block a user