Browse Source

Add confirmation

pull/2/head
Ambrose Chua 4 years ago
parent
commit
7eef45f747
  1. 3
      src/views/Repo.vue
  2. 3
      src/views/Tag.vue

3
src/views/Repo.vue

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

3
src/views/Tag.vue

@ -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…
Cancel
Save