Compare commits

..

2 Commits
2.0.3 ... 2.0.5

Author SHA1 Message Date
Joxit
1dc84eb46e fix: Labels and Env in history missing new line + clean names (#200)
fixes #200
2021-07-01 00:00:05 +02:00
Joxit
e0ec86503a fix: can't view platform specific tag info (#198) 2021-06-24 09:31:32 +02:00
7 changed files with 81 additions and 45 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

View File

@@ -44,6 +44,7 @@ export default [
dir: output,
name: 'DockerRegistryUI',
format: 'iife',
sourcemap: useServe
},
plugins: [emptyDirectories(output)].concat(
plugins,

View File

@@ -18,29 +18,89 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div class="headline"><i class="material-icons">{ state.icon }</i>
<p>{ state.name }</p>
</div>
<div class="value" if="{ state.value }"> { state.value }</div>
<div class="value" each="{ value in state.values }" if="{ state.values }"> { value }</div>
<div class="content">
<div class="value" if="{ state.value }"> { state.value }</div>
<div class="values value" each="{ value in state.values }" if="{ state.values }"> { value }</div>
</div>
<script>
import {
getHistoryIcon
} from '../../scripts/utils';
export default {
onBeforeStar(props, state) {
onBeforeStart(props, state) {
state.key = props.entry.key;
state.icon = getHistoryIcon(props.entry.key);
state.name = props.entry.key.replace('_', ' ');
if (props.value instanceof Array) {
state.name = this.cleanName(props.entry.key);
if (props.entry.value instanceof Array) {
state.values = props.entry.value;
} else {
state.value = props.entry.value;
}
},
onBeforeMount(props, state) {
this.onBeforeStar(props, state);
this.onBeforeStart(props, state);
},
onBeforeUpdate(props, state) {
this.onBeforeStar(props, state);
this.onBeforeStart(props, state);
},
cleanName(name) {
if (name === 'id') {
return name;
} else if (name === 'os') {
return 'OS';
}
return name.replace(/([a-z])([A-Z])/g, '$1 $2')
.replace('_', ' ')
.split(' ')
.map(word => `${word.charAt(0).toUpperCase()}${word.slice(1)}`)
.join(' ');
}
}
</script>
<style>
:host.Labels .value,
:host.Env .value {
margin-bottom: 0.5em;
}
:host i {
font-size: 20px;
padding: 0px;
}
:host.docker_version .headline .material-icons {
background-size: 24px auto;
background-image: url("images/docker-logo.svg");
background-repeat: no-repeat;
}
:host {
display: block;
padding: 20px;
min-width: 100px;
min-height: 3em;
width: 420px;
float: left;
}
:host .content {
overflow-x: auto;
}
:host.id .content {
overflow-x: initial;
}
:host .headline p {
font-weight: bold;
line-height: 20px;
position: relative;
display: inline;
top: -4px;
}
:host.id div.value {
font-size: 12px;
}
</style>
</tag-history-element>

View File

@@ -64,9 +64,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
},
onTabChanged(arch, idx) {
const state = this.state;
const {
registryUrl,
onNotify
} = this.props;
state.elements = []
state.image.variants[idx] = state.image.variants[idx] ||
new DockerImage(this.props.image, arch.digest, false, this.props.registryUrl, this.props.onNotify);
new DockerImage(this.props.image, arch.digest, {
list: false,
registryUrl,
onNotify
});
if (state.image.variants[idx].blobs) {
return this.processBlobs(state.image.variants[idx].blobs);
}

View File

@@ -410,39 +410,6 @@ tag-history material-card {
min-height: auto;
}
tag-history-element i {
font-size: 20px;
padding: 0px;
}
tag-history-element.docker_version .headline .material-icons {
background-size: 24px auto;
background-image: url("images/docker-logo.svg");
background-repeat: no-repeat;
}
tag-history-element {
display: block;
padding: 20px;
min-width: 100px;
min-height: 3em;
width: 420px;
float: left;
overflow-x: auto;
}
tag-history-element .headline p {
font-weight: bold;
line-height: 20px;
position: relative;
display: inline;
top: -4px;
}
tag-history-element.id div.value {
font-size: 12px;
}
tag-history-button button {
background: none;
border: none;