mirror of
https://github.com/modrinth/code.git
synced 2026-08-31 03:55:59 +00:00
* feat: blocking api interfaces * feat: block action on user pages + shared instance flows * feat: safety settings subpage * feat: interaction source settings * feat: finish social settings * feat: profile settings xplat * fix: prepr * feat: click on friends * default instance -> game options & fix feature flag width * fix: scroll indicators --------- Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
44 lines
1.0 KiB
Vue
44 lines
1.0 KiB
Vue
<template>
|
|
<section v-if="auth.user" class="universal-card">
|
|
<AccountSocialSettings
|
|
:get-blocked-users="getBlockedUsers"
|
|
:get-users="getUsers"
|
|
:unblock-user="unblockUser"
|
|
/>
|
|
</section>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import type { Labrinth } from '@modrinth/api-client'
|
|
import {
|
|
AccountSocialSettings,
|
|
commonSettingsMessages,
|
|
injectModrinthClient,
|
|
useVIntl,
|
|
} from '@modrinth/ui'
|
|
|
|
definePageMeta({
|
|
middleware: 'auth',
|
|
})
|
|
|
|
const auth = await useAuth()
|
|
const client = injectModrinthClient()
|
|
const { formatMessage } = useVIntl()
|
|
|
|
function getBlockedUsers(): Promise<Labrinth.BlockedUsers.v3.BlockedUserId[]> {
|
|
return client.labrinth.blocked_users_v3.list()
|
|
}
|
|
|
|
function getUsers(userIds: string[]): Promise<Labrinth.Users.v2.User[]> {
|
|
return client.labrinth.users_v2.getMultiple(userIds)
|
|
}
|
|
|
|
function unblockUser(userId: string): Promise<void> {
|
|
return client.labrinth.blocked_users_v3.unblock(userId)
|
|
}
|
|
|
|
useHead({
|
|
title: () => `${formatMessage(commonSettingsMessages.social)} - Modrinth`,
|
|
})
|
|
</script>
|