diff --git a/components/ConfirmPopup.vue b/components/ConfirmPopup.vue new file mode 100644 index 000000000..d4afc6e95 --- /dev/null +++ b/components/ConfirmPopup.vue @@ -0,0 +1,152 @@ + + + + {{ title }} + + {{ description }} + + + + To confirm your action, please type + {{ confirmationText }} + to continue + + + + + Cancel + + {{ proceedLabel }} + + + + + + + + + diff --git a/components/Popup.vue b/components/Popup.vue index 4a0cba68d..299b55c37 100644 --- a/components/Popup.vue +++ b/components/Popup.vue @@ -40,7 +40,6 @@ export default { transform: translate(-50%, -50%); z-index: 2; box-shadow: 0 2px 3px 1px var(--color-button-bg); - padding: 5px 60px 5px 20px; border-radius: 10px; max-height: 80%; overflow-y: auto; diff --git a/pages/dashboard/settings.vue b/pages/dashboard/settings.vue index 3d02ca61f..053c9025d 100644 --- a/pages/dashboard/settings.vue +++ b/pages/dashboard/settings.vue @@ -1,6 +1,16 @@ /* eslint-disable vue/attribute-hyphenation */ + Settings Save @@ -93,7 +103,7 @@ will be removed from our servers. This cannot be reversed, so be careful! - + Delete Account @@ -123,6 +133,7 @@ export default { email: '', bio: '', token: '', + confirm_delete: false, } }, methods: { @@ -192,6 +203,9 @@ export default { this.$nuxt.$loading.finish() }, + showPopup() { + this.$refs.delete_popup.show() + }, }, } diff --git a/pages/mod/_id/settings.vue b/pages/mod/_id/settings.vue index 77ae8a5a1..e1117a31e 100644 --- a/pages/mod/_id/settings.vue +++ b/pages/mod/_id/settings.vue @@ -7,6 +7,15 @@ :link-bar="[['Settings', 'settings']]" :user-follows="userFollows" > + General @@ -34,7 +43,7 @@ Delete Mod @@ -401,12 +410,21 @@ export default { this.$nuxt.$loading.finish() }, + showPopup() { + this.$refs.delete_popup.show() + }, async deleteMod() { await axios.delete( `https://api.modrinth.com/api/v1/mod/${this.mod.id}`, this.$auth.headers ) await this.$router.push('/dashboard/projects') + this.$notify({ + group: 'main', + title: 'Action Success', + text: 'Your mod has been successfully deleted.', + type: 'success', + }) }, }, } diff --git a/pages/mod/_id/version/_version/index.vue b/pages/mod/_id/version/_version/index.vue index 7aceb4e39..4ba193c83 100644 --- a/pages/mod/_id/version/_version/index.vue +++ b/pages/mod/_id/version/_version/index.vue @@ -11,6 +11,22 @@ ]" :user-follows="userFollows" > + + {{ version.name }} @@ -39,7 +55,7 @@ Delete @@ -108,7 +124,9 @@ {{ file.filename }} - Delete File + + Delete File + Make Primary @@ -231,6 +249,7 @@ export default { data() { return { filesToUpload: [], + popup_data: null, } }, methods: { @@ -244,6 +263,10 @@ export default { elem.href = url elem.click() }, + deleteFilePopup(hash) { + this.popup_data = hash + this.$refs.delete_file_popup.show() + }, async deleteFile(hash) { this.$nuxt.$loading.start() @@ -314,6 +337,9 @@ export default { this.$nuxt.$loading.finish() }, + deleteVersionPopup() { + this.$refs.delete_version_popup.show() + }, async deleteVersion() { this.$nuxt.$loading.start()
{{ file.filename }}