mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-01 20:41:22 +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",
|
"headerBgColor": "#004a70",
|
||||||
"headerLogo": "",
|
"headerLogo": "",
|
||||||
"loginBgImg": "",
|
"loginBgImg": "",
|
||||||
|
"appTitle": "",
|
||||||
"product": {
|
"product": {
|
||||||
"title": "Harbor",
|
|
||||||
"company": "goharbor",
|
|
||||||
"name": "Harbor",
|
"name": "Harbor",
|
||||||
"introductions": {
|
"introduction": {
|
||||||
"zh-cn": "",
|
"zh-cn": "",
|
||||||
"es-es": "",
|
"es-es": "",
|
||||||
"en-us": ""
|
"en-us": ""
|
||||||
|
@ -58,8 +58,8 @@ export class GlobalSearchComponent implements OnInit, OnDestroy {
|
|||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
// custom skin
|
// custom skin
|
||||||
let customSkinObj = this.skinableConfig.getProject();
|
let customSkinObj = this.skinableConfig.getProject();
|
||||||
if (customSkinObj && customSkinObj.projectName) {
|
if (customSkinObj && customSkinObj.name) {
|
||||||
this.translate.get('GLOBAL_SEARCH.PLACEHOLDER', {'param': customSkinObj.projectName}).subscribe(res => {
|
this.translate.get('GLOBAL_SEARCH.PLACEHOLDER', {'param': customSkinObj.name}).subscribe(res => {
|
||||||
// Placeholder text
|
// Placeholder text
|
||||||
this.placeholderText = res;
|
this.placeholderText = res;
|
||||||
});
|
});
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<div class="branding">
|
<div class="branding">
|
||||||
<a href="javascript:void(0)" class="nav-link" (click)="homeAction()">
|
<a href="javascript:void(0)" class="nav-link" (click)="homeAction()">
|
||||||
<!-- <clr-icon shape="vm-bug" *ngIf="!customStyle?.headerLogo"></clr-icon> -->
|
<!-- <clr-icon shape="vm-bug" *ngIf="!customStyle?.headerLogo"></clr-icon> -->
|
||||||
<img [src]="'images/harbor-logo.svg'" class="harbor-logo" />
|
<img [attr.src]="'images/'+customStyle?.headerLogo" *ngIf="customStyle?.headerLogo;else elseBlock" class="headerLogo">
|
||||||
<img [attr.src]="'static/images/'+customStyle?.headerLogo" *ngIf="customStyle?.headerLogo" class="headerLogo">
|
<ng-template #elseBlock><img [src]="'images/harbor-logo.svg'" class="harbor-logo" /></ng-template>
|
||||||
<span class="title">{{customProjectName?.projectName? customProjectName?.projectName:(appTitle | translate)}}</span>
|
<span class="title">{{customProjectName?.name? customProjectName?.name:(appTitle | translate)}}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-nav">
|
<div class="header-nav">
|
||||||
|
@ -61,8 +61,8 @@ export class NavigatorComponent implements OnInit {
|
|||||||
// custom skin
|
// custom skin
|
||||||
let customSkinObj = this.skinableConfig.getSkinConfig();
|
let customSkinObj = this.skinableConfig.getSkinConfig();
|
||||||
if (customSkinObj) {
|
if (customSkinObj) {
|
||||||
if (customSkinObj.projects) {
|
if (customSkinObj.product) {
|
||||||
this.customProjectName = customSkinObj.projects;
|
this.customProjectName = customSkinObj.product;
|
||||||
}
|
}
|
||||||
this.customStyle = customSkinObj;
|
this.customStyle = customSkinObj;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<img [src]="'images/harbor-logo.svg'" class="harbor-icon">
|
<img [src]="'images/harbor-logo.svg'" class="harbor-icon">
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div>{{customName?.projectName? customName?.projectName : ('APP_TITLE.HARBOR' | translate)}}</div>
|
<div>{{customName?.name? customName?.name : ('APP_TITLE.HARBOR' | translate)}}</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="p5 about-version">{{'ABOUT.VERSION' | translate}} {{version}}</span>
|
<span class="p5 about-version">{{'ABOUT.VERSION' | translate}} {{version}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<global-message [isAppLevel]="true"></global-message>
|
<global-message [isAppLevel]="true"></global-message>
|
||||||
<navigator></navigator>
|
<navigator></navigator>
|
||||||
<search-result></search-result>
|
<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">
|
<form #signInForm="ngForm" class="login">
|
||||||
<label class="title"> {{customAppTitle? customAppTitle:(appTitle | translate)}}
|
<label class="title"> {{customAppTitle? customAppTitle:(appTitle | translate)}}
|
||||||
</label>
|
</label>
|
||||||
|
@ -23,7 +23,7 @@ export class SkinableConfig {
|
|||||||
|
|
||||||
public getProject() {
|
public getProject() {
|
||||||
if (this.customSkinData) {
|
if (this.customSkinData) {
|
||||||
return this.customSkinData.project;
|
return this.customSkinData.product;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,8 @@
|
|||||||
"headerLogo": "",
|
"headerLogo": "",
|
||||||
"loginBgImg": "",
|
"loginBgImg": "",
|
||||||
"appTitle": "",
|
"appTitle": "",
|
||||||
"project": {
|
"product": {
|
||||||
"companyName": "",
|
"name": "",
|
||||||
"projectName": "",
|
|
||||||
"introduction": {
|
"introduction": {
|
||||||
"zh-cn": "",
|
"zh-cn": "",
|
||||||
"es-es": "",
|
"es-es": "",
|
||||||
|
Loading…
Reference in New Issue
Block a user