From 5e8bcf8faf3b91fbba7df8b250f11ed19cf65799 Mon Sep 17 00:00:00 2001 From: Geometrically Date: Mon, 11 Jan 2021 14:01:56 -0700 Subject: [PATCH] Version moderation --- pages/dashboard/moderation.vue | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/pages/dashboard/moderation.vue b/pages/dashboard/moderation.vue index 0fc16b5d1..7cace897f 100644 --- a/pages/dashboard/moderation.vue +++ b/pages/dashboard/moderation.vue @@ -38,6 +38,17 @@

Versions

+
+
+ + Version {{ version.name }} + +
+
+ + +
+
@@ -98,6 +109,26 @@ export default { await this.$router.go(0) }, + + async changeVersionStatus(id) { + const config = { + headers: { + Authorization: this.$auth.getToken('local') + ? this.$auth.getToken('local') + : '', + }, + } + + await axios.patch( + `https://api.modrinth.com/api/v1/version/${id}`, + { + accepted: true, + }, + config + ) + + await this.$router.go(0) + }, }, } @@ -106,4 +137,16 @@ export default { .button { margin: 0.25rem 0; } + +.version { + @extend %card; + padding: var(--spacing-card-sm) var(--spacing-card-lg); + margin-bottom: var(--spacing-card-sm); + align-items: center; + justify-content: space-between; + + p { + margin: 0; + } +}