mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-22 23:51:27 +01:00
Merge pull request #3910 from pengpengshui/skinable
Modify skinnable json file and modify images path about #3909 #3879
This commit is contained in:
commit
a75f347fd4
@ -47,4 +47,5 @@
|
||||
font-size: 14px !important;
|
||||
position: relative;
|
||||
top: -9px;
|
||||
}
|
||||
}
|
||||
.bg{position: absolute;top: 60px; right: 0px;width: 100%; height: 100%; background-size: cover;}
|
@ -1,4 +1,5 @@
|
||||
<div class="login-wrapper login-wrapper-override" [ngStyle]="{'background-image': 'url(' + customLoginBgImg + ')'}">
|
||||
<div class="login-wrapper login-wrapper-override">
|
||||
<div class="bg" *ngIf="customLoginBgImg" [ngStyle]="{'background-image': 'url(static/images/' + customLoginBgImg + ')'}"></div>
|
||||
<form #signInForm="ngForm" class="login">
|
||||
<label class="title"> {{customAppTitle? customAppTitle:(appTitle | translate)}}<span class="trademark tm-font">™</span>
|
||||
</label>
|
||||
|
@ -57,7 +57,7 @@ export class GlobalSearchComponent implements OnInit, OnDestroy {
|
||||
|
||||
ngOnInit(): void {
|
||||
//custom skin
|
||||
let customSkinObj = this.skinableConfig.getProjects();
|
||||
let customSkinObj = this.skinableConfig.getProject();
|
||||
if (customSkinObj && customSkinObj.projectName) {
|
||||
this.translate.get('GLOBAL_SEARCH.PLACEHOLDER', {'param': customSkinObj.projectName}).subscribe(res => {
|
||||
//Placeholder text
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="branding">
|
||||
<a href="javascript:void(0)" class="nav-link" (click)="homeAction()">
|
||||
<clr-icon shape="vm-bug" *ngIf="!customStyle?.headerLogo"></clr-icon>
|
||||
<img [attr.src]="customStyle?.headerLogo" *ngIf="customStyle?.headerLogo" style="width: 36px;height: 36px; object-fit: fill;">
|
||||
<img [attr.src]="'static/images/'+customStyle?.headerLogo" *ngIf="customStyle?.headerLogo" style="width: 36px;height: 36px; object-fit: fill;">
|
||||
<span class="title">{{customProjectName?.projectName? customProjectName?.projectName:(appTitle | translate)}}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -35,7 +35,7 @@ export class AboutDialogComponent implements OnInit{
|
||||
|
||||
ngOnInit(): void {
|
||||
// custom skin
|
||||
let customSkinObj = this.skinableConfig.getProjects();
|
||||
let customSkinObj = this.skinableConfig.getProject();
|
||||
if (customSkinObj) {
|
||||
let selectedLang = this.translate.currentLang;
|
||||
this.customName = customSkinObj;
|
||||
|
@ -12,7 +12,7 @@ export class SkinableConfig {
|
||||
constructor(private http: Http) {}
|
||||
|
||||
public getCustomFile(): Promise<any> {
|
||||
return this.http.get('../setting.json')
|
||||
return this.http.get('../static/setting.json')
|
||||
.toPromise()
|
||||
.then(response => { this.customSkinData = response.json(); return this.customSkinData; })
|
||||
.catch(error => {
|
||||
@ -24,9 +24,9 @@ export class SkinableConfig {
|
||||
return this.customSkinData;
|
||||
}
|
||||
|
||||
public getProjects() {
|
||||
public getProject() {
|
||||
if (this.customSkinData) {
|
||||
return this.customSkinData.projects;
|
||||
return this.customSkinData.project;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"headerBgColor": "#004a70",
|
||||
"headerBgColor": "",
|
||||
"headerLogo": "",
|
||||
"loginBgImg": "",
|
||||
"appTitle": "VMware Harbor",
|
||||
"projects": {
|
||||
"companyName": "vmware",
|
||||
"projectName": "Harbor",
|
||||
"appTitle": "",
|
||||
"project": {
|
||||
"companyName": "",
|
||||
"projectName": "",
|
||||
"introduction": {
|
||||
"zh-cn": "",
|
||||
"es-es": "",
|
||||
|
Loading…
Reference in New Issue
Block a user