1
0

fix: DI nonsense (#4174)

* fix: DI nonsense

* fix: lint

* fix: client try di issue

* fix: injects outside of context

* fix: use .catch

* refactor: convert projects.vue to composition API.

* fix: moderation checklist notif pos change watcher

* fix: lint issues
This commit is contained in:
Cal H.
2025-08-15 19:02:55 +01:00
committed by GitHub
parent 9b5f172170
commit 4ad6daa45c
32 changed files with 318 additions and 323 deletions

View File

@@ -101,7 +101,7 @@
email
{{ auth.user.payout_data.paypal_address }}
</p>
<button class="btn mt-4" @click="removeAuthProvider('paypal')">
<button class="btn mt-4" @click="handleRemoveAuthProvider('paypal')">
<XIcon />
Disconnect account
</button>
@@ -154,7 +154,9 @@ import { formatDate } from '@modrinth/utils'
import dayjs from 'dayjs'
import { computed } from 'vue'
const { addNotification } = injectNotificationManager()
import { removeAuthProvider } from '~/composables/auth.js'
const { addNotification, handleError } = injectNotificationManager()
const auth = await useAuth()
const minWithdraw = ref(0.01)
@@ -170,6 +172,14 @@ const deadlineEnding = computed(() => {
return deadline
})
async function handleRemoveAuthProvider(provider) {
try {
await removeAuthProvider(provider)
} catch (error) {
handleError(error)
}
}
const availableSoonDates = computed(() => {
// Get the next 3 dates from userBalance.dates that are from now to the deadline + 4 months to make sure we get all the pending ones.
const dates = Object.keys(userBalance.value.dates)