Add confirmation
parent
6c1595537f
commit
7eef45f747
|
@ -74,6 +74,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
async deleteRepo() {
|
||||
if (!window.confirm(`Are you sure you want to delete ${this.$route.params.repo}?`)) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await repoDelete(this.$route.params.repo);
|
||||
this.$router.push({ name: 'repos' });
|
||||
|
|
|
@ -112,6 +112,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
async deleteTag() {
|
||||
if (!window.confirm(`Are you sure you want to delete ${this.$route.params.repo}:${this.$route.params.tag}?`)) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await tagDelete(this.$route.params.repo, this.$route.params.tag);
|
||||
this.$router.push({ name: 'repo', params: { repo: this.$route.params.repo } });
|
||||
|
|
Loading…
Reference in New Issue