1
0
Fork 0

Add confirmation

pull/2/head
Ambrose Chua 2018-09-29 16:31:25 +08:00
parent 6c1595537f
commit 7eef45f747
2 changed files with 6 additions and 0 deletions

View File

@ -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' });

View File

@ -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 } });