fix(demo): multi-arch image example is now working

This commit is contained in:
Joxit 2021-07-04 00:12:30 +02:00
parent 026f65abc6
commit 840a00e32b
No known key found for this signature in database
GPG key ID: F526592B8E012263
4 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View file

@ -6,3 +6,4 @@ registry-data
_site
*.orig
.serve/
demo/v2

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
{
"name": "docker-registry-ui",
"version": "2.0.6",
"version": "2.0.7",
"scripts": {
"start": "ROLLUP_SERVE=true rollup -c -w",
"build": "rollup -c",

View file

@ -98,7 +98,7 @@ export class DockerImage {
oReq.addEventListener('loadend', function () {
if (this.status == 200 || this.status == 202) {
const response = JSON.parse(this.responseText);
if (response.mediaType === 'application/vnd.docker.distribution.manifest.list.v2+json' && !response.layers) {
if (response.mediaType === 'application/vnd.docker.distribution.manifest.list.v2+json' && self.opts.list) {
self.trigger('list', response);
const manifest = response.manifests[0];
const image = new DockerImage(self.name, manifest.digest, { ...self.opts, list: false });