diff --git a/apps/frontend/src/components/ui/admin/BatchCreditModal.vue b/apps/frontend/src/components/ui/admin/BatchCreditModal.vue new file mode 100644 index 0000000000..8e6dbcbf2e --- /dev/null +++ b/apps/frontend/src/components/ui/admin/BatchCreditModal.vue @@ -0,0 +1,264 @@ + + + + Batch credit + + + + + Type + Select target to credit. + + + + + + Days to credit + + + + + + + + Node hostnames + + + + + + + Add + + + + + + + {{ h }} + + + + + + + + + Region + This will credit all active servers in the region. + + + + + + + + Send email + + + + + + + Customize Email + + Unless a particularly bad or out of the ordinary event happened, keep this to the + default + + + + Hi {user.name}, + + + + + To make up for it, we've added {{ days }} day{{ pluralize(days) }} to your Modrinth + Servers subscription. + + + Your next charge was scheduled for {credit.previous_due} and will now be on + {credit.next_due}. + + + + + + + + + Apply credits + + + + + + Cancel + + + + + + + + diff --git a/apps/frontend/src/layouts/default.vue b/apps/frontend/src/layouts/default.vue index ad84124a17..a0055867e0 100644 --- a/apps/frontend/src/layouts/default.vue +++ b/apps/frontend/src/layouts/default.vue @@ -477,7 +477,7 @@ { id: 'servers-nodes', color: 'primary', - link: '/admin/servers/nodes', + action: (event) => $refs.modal_batch_credit.show(event), shown: isAdmin(auth.user), }, ]" @@ -786,6 +786,7 @@ +