mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-27 15:39:54 +03:00
fix: lifecycle for copy to clipboard and remove image
This commit is contained in:
parent
83f15aa267
commit
6d4d507db5
2 changed files with 8 additions and 4 deletions
|
@ -28,13 +28,15 @@
|
|||
} from '../../scripts/utils';
|
||||
export default {
|
||||
onBeforeMount(props, state) {
|
||||
const prefix = 'docker pull ' + props.pullUrl + '/' + props.image.name;
|
||||
if (props.target === 'tag') {
|
||||
state.dockerCmd = prefix + ':' + props.image.tag;
|
||||
} else {
|
||||
state.dockerCmd = `docker pull ${props.pullUrl}/${props.image.name}:${props.image.tag}`;
|
||||
}
|
||||
},
|
||||
onMounted(props, state) {
|
||||
if (props.target !== 'tag') {
|
||||
props.image.one('content-digest', (digest) => {
|
||||
this.update({
|
||||
dockerCmd: prefix + '@' + digest
|
||||
dockerCmd: `docker pull ${props.pullUrl}/${props.image.name}@${digest}`
|
||||
})
|
||||
});
|
||||
props.image.trigger('get-content-digest');
|
||||
|
|
|
@ -35,6 +35,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
digest
|
||||
});
|
||||
});
|
||||
},
|
||||
onMounted(props, state) {
|
||||
props.image.trigger('get-content-digest');
|
||||
},
|
||||
onBeforeUpdate(props, state) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue