You've already forked AstralRinth
forked from didirus/AstralRinth
Affiliates frontend (#4380)
* Begin affiliates frontend * Significant work on hooking up affiliates ui * Clean up server nodes menu * affiliates work * update affiliate time * oops * fix local import * fix local import x2 * remove line in dashboard * lint
This commit is contained in:
@@ -455,6 +455,12 @@
|
||||
link: '/admin/user_email',
|
||||
shown: isAdmin(auth.user),
|
||||
},
|
||||
{
|
||||
id: 'affiliates',
|
||||
color: 'primary',
|
||||
link: '/admin/affiliates',
|
||||
shown: isAdmin(auth.user),
|
||||
},
|
||||
{
|
||||
id: 'servers-notices',
|
||||
color: 'primary',
|
||||
@@ -478,7 +484,7 @@
|
||||
<ReportIcon aria-hidden="true" /> {{ formatMessage(messages.reports) }}
|
||||
</template>
|
||||
<template #user-lookup>
|
||||
<UserIcon aria-hidden="true" /> {{ formatMessage(messages.lookupByEmail) }}
|
||||
<UserSearchIcon aria-hidden="true" /> {{ formatMessage(messages.lookupByEmail) }}
|
||||
</template>
|
||||
<template #file-lookup>
|
||||
<FileIcon aria-hidden="true" /> {{ formatMessage(messages.fileLookup) }}
|
||||
@@ -486,7 +492,12 @@
|
||||
<template #servers-notices>
|
||||
<IssuesIcon aria-hidden="true" /> {{ formatMessage(messages.manageServerNotices) }}
|
||||
</template>
|
||||
<template #servers-nodes> <ServerIcon aria-hidden="true" /> Server Nodes </template>
|
||||
<template #affiliates>
|
||||
<AffiliateIcon aria-hidden="true" /> {{ formatMessage(messages.manageAffiliates) }}
|
||||
</template>
|
||||
<template #servers-nodes>
|
||||
<ServerIcon aria-hidden="true" /> Credit server nodes
|
||||
</template>
|
||||
</OverflowMenu>
|
||||
</ButtonStyled>
|
||||
<ButtonStyled type="transparent">
|
||||
@@ -563,6 +574,10 @@
|
||||
<template #organizations>
|
||||
<OrganizationIcon aria-hidden="true" /> {{ formatMessage(messages.organizations) }}
|
||||
</template>
|
||||
<template #affiliate-links>
|
||||
<AffiliateIcon aria-hidden="true" />
|
||||
{{ formatMessage(commonMessages.affiliateLinksButton) }}
|
||||
</template>
|
||||
<template #revenue>
|
||||
<CurrencyIcon aria-hidden="true" /> {{ formatMessage(messages.revenue) }}
|
||||
</template>
|
||||
@@ -850,6 +865,7 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import {
|
||||
AffiliateIcon,
|
||||
ArrowBigUpDashIcon,
|
||||
BellIcon,
|
||||
BlueskyIcon,
|
||||
@@ -891,6 +907,7 @@ import {
|
||||
SunIcon,
|
||||
TwitterIcon,
|
||||
UserIcon,
|
||||
UserSearchIcon,
|
||||
XIcon,
|
||||
} from '@modrinth/assets'
|
||||
import {
|
||||
@@ -903,7 +920,7 @@ import {
|
||||
OverflowMenu,
|
||||
PagewideBanner,
|
||||
} from '@modrinth/ui'
|
||||
import { isAdmin, isStaff } from '@modrinth/utils'
|
||||
import { isAdmin, isStaff, UserBadge } from '@modrinth/utils'
|
||||
import { IntlFormatted } from '@vintl/vintl/components'
|
||||
|
||||
import TextLogo from '~/components/brand/TextLogo.vue'
|
||||
@@ -1159,6 +1176,10 @@ const messages = defineMessages({
|
||||
id: 'layout.action.manage-server-notices',
|
||||
defaultMessage: 'Manage server notices',
|
||||
},
|
||||
manageAffiliates: {
|
||||
id: 'layout.action.manage-affiliates',
|
||||
defaultMessage: 'Manage affiliate links',
|
||||
},
|
||||
newProject: {
|
||||
id: 'layout.action.new-project',
|
||||
defaultMessage: 'New project',
|
||||
@@ -1336,6 +1357,11 @@ const userMenuOptions = computed(() => {
|
||||
id: 'organizations',
|
||||
link: '/dashboard/organizations',
|
||||
},
|
||||
{
|
||||
id: 'affiliate-links',
|
||||
link: '/dashboard/affiliate-links',
|
||||
shown: auth.value.user.badges & UserBadge.AFFILIATE,
|
||||
},
|
||||
{
|
||||
id: 'revenue',
|
||||
link: '/dashboard/revenue',
|
||||
|
||||
Reference in New Issue
Block a user