You've already forked AstralRinth
forked from didirus/AstralRinth
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user