mirror of
https://github.com/goharbor/harbor
synced 2025-04-14 10:32:47 +00:00
Add cosign icon (#16531)
Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
7cb5c34f7e
commit
c54f51d4d8
|
@ -1,5 +1,5 @@
|
|||
.artifact-icon {
|
||||
width: 0.8rem;
|
||||
width: 2.5rem;
|
||||
height: 0.8rem;
|
||||
}
|
||||
.cell {
|
||||
|
|
|
@ -85,6 +85,7 @@ export class SubAccessoriesComponent implements OnInit {
|
|||
clrLoad() {
|
||||
if (this.currentPage === 1) {
|
||||
this.displayedAccessories = clone(this.accessories);
|
||||
this.getIconFromBackend();
|
||||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
|
@ -100,10 +101,16 @@ export class SubAccessoriesComponent implements OnInit {
|
|||
.subscribe(
|
||||
res => {
|
||||
this.displayedAccessories = res;
|
||||
this.getIconFromBackend();
|
||||
},
|
||||
error => {
|
||||
this.errorHandlerService.error(error);
|
||||
}
|
||||
);
|
||||
}
|
||||
getIconFromBackend() {
|
||||
if (this.displayedAccessories?.length) {
|
||||
this.artifactService.getIconsFromBackEnd(this.displayedAccessories);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import { Artifact } from '../../../../../../ng-swagger-gen/models/artifact';
|
|||
import { IconService } from '../../../../../../ng-swagger-gen/services/icon.service';
|
||||
import { share } from "rxjs/operators";
|
||||
import { Icon } from "ng-swagger-gen/models/icon";
|
||||
import { Accessory } from '../../../../../../ng-swagger-gen/models/accessory';
|
||||
|
||||
|
||||
/**
|
||||
|
@ -19,7 +20,7 @@ export abstract class ArtifactService {
|
|||
triggerUploadArtifact = new Subject<string>();
|
||||
abstract getIcon(digest: string): SafeUrl;
|
||||
abstract setIcon(digest: string, url: SafeUrl);
|
||||
abstract getIconsFromBackEnd(artifactList: Artifact[]);
|
||||
abstract getIconsFromBackEnd(artifactList: Artifact[] | Accessory[]);
|
||||
}
|
||||
@Injectable()
|
||||
export class ArtifactDefaultService extends ArtifactService {
|
||||
|
|
Loading…
Reference in New Issue
Block a user