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