forked from didirus/AstralRinth
* Start of app redesign * format * continue progress * Content page nearly done * Fix recursion issues with content page * Fix update all alignment * Discover page progress * Settings progress * Removed unlocked-size hack that breaks web * Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues * Ads + run prettier * Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor * fix ads not hiding when plus log in * rev lockfile changes/conflicts * Fix sign in page * Add generated * (mostly) Data driven search * Fix search mobile issue * profile fixes * Project versions page, fix typescript on UI lib and misc fixes * Remove unused gallery component * Fix linkfunction err * Search filter controls at top, localization for locked filters * Fix provided filter names * Fix navigating from instance browse to main browse * Friends frontend (#2995) * Friends system frontend * (almost) finish frontend * finish friends, fix lint * Fix lint --------- Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com> * Refresh macOS app icon * Update web search UI more * Fix link opens * Fix frontend build --------- Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com> Co-authored-by: Jai A <jaiagr+gpg@pm.me> Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
174 lines
5.0 KiB
Vue
174 lines
5.0 KiB
Vue
<template>
|
|
<div
|
|
v-if="
|
|
project.issues_url ||
|
|
project.source_url ||
|
|
project.wiki_url ||
|
|
project.discord_url ||
|
|
project.donation_urls.length > 0
|
|
"
|
|
class="flex flex-col gap-3"
|
|
>
|
|
<h2 class="text-lg m-0">{{ formatMessage(messages.title) }}</h2>
|
|
<div
|
|
class="flex flex-col gap-3 font-semibold [&>a]:flex [&>a]:gap-2 [&>a]:items-center [&>a]:w-fit [&>a]:text-primary [&>a]:leading-[1.2] [&>a:hover]:underline"
|
|
>
|
|
<a
|
|
v-if="project.issues_url"
|
|
:href="project.issues_url"
|
|
:target="linkTarget"
|
|
rel="noopener nofollow ugc"
|
|
>
|
|
<IssuesIcon aria-hidden="true" />
|
|
{{ formatMessage(messages.issues) }}
|
|
<ExternalIcon aria-hidden="true" class="external-icon" />
|
|
</a>
|
|
<a
|
|
v-if="project.source_url"
|
|
:href="project.source_url"
|
|
:target="linkTarget"
|
|
rel="noopener nofollow ugc"
|
|
>
|
|
<CodeIcon aria-hidden="true" />
|
|
{{ formatMessage(messages.source) }}
|
|
<ExternalIcon aria-hidden="true" class="external-icon" />
|
|
</a>
|
|
<a
|
|
v-if="project.wiki_url"
|
|
:href="project.wiki_url"
|
|
:target="linkTarget"
|
|
rel="noopener nofollow ugc"
|
|
>
|
|
<WikiIcon aria-hidden="true" />
|
|
{{ formatMessage(messages.wiki) }}
|
|
<ExternalIcon aria-hidden="true" class="external-icon" />
|
|
</a>
|
|
<a
|
|
v-if="project.discord_url"
|
|
:href="project.discord_url"
|
|
:target="linkTarget"
|
|
rel="noopener nofollow ugc"
|
|
>
|
|
<DiscordIcon class="shrink" aria-hidden="true" />
|
|
{{ formatMessage(messages.discord) }}
|
|
<ExternalIcon aria-hidden="true" class="external-icon" />
|
|
</a>
|
|
<hr
|
|
v-if="
|
|
(project.issues_url || project.source_url || project.wiki_url || project.discord_url) &&
|
|
project.donation_urls.length > 0
|
|
"
|
|
class="w-full border-button-border my-0.5"
|
|
/>
|
|
<a
|
|
v-for="(donation, index) in project.donation_urls"
|
|
:key="index"
|
|
:href="donation.url"
|
|
:target="linkTarget"
|
|
rel="noopener nofollow ugc"
|
|
>
|
|
<BuyMeACoffeeIcon v-if="donation.id === 'bmac'" aria-hidden="true" />
|
|
<PatreonIcon v-else-if="donation.id === 'patreon'" aria-hidden="true" />
|
|
<KoFiIcon v-else-if="donation.id === 'ko-fi'" aria-hidden="true" />
|
|
<PayPalIcon v-else-if="donation.id === 'paypal'" aria-hidden="true" />
|
|
<OpenCollectiveIcon v-else-if="donation.id === 'open-collective'" aria-hidden="true" />
|
|
<HeartIcon v-else-if="donation.id === 'github'" />
|
|
<CurrencyIcon v-else />
|
|
<span v-if="donation.id === 'bmac'">{{ formatMessage(messages.donateBmac) }}</span>
|
|
<span v-else-if="donation.id === 'patreon'">{{
|
|
formatMessage(messages.donatePatreon)
|
|
}}</span>
|
|
<span v-else-if="donation.id === 'paypal'">{{ formatMessage(messages.donatePayPal) }}</span>
|
|
<span v-else-if="donation.id === 'ko-fi'">{{ formatMessage(messages.donateKoFi) }}</span>
|
|
<span v-else-if="donation.id === 'github'">{{ formatMessage(messages.donateGithub) }}</span>
|
|
<span v-else>{{ formatMessage(messages.donateGeneric) }}</span>
|
|
<ExternalIcon aria-hidden="true" class="external-icon" />
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script setup lang="ts">
|
|
import {
|
|
BuyMeACoffeeIcon,
|
|
CodeIcon,
|
|
CurrencyIcon,
|
|
DiscordIcon,
|
|
ExternalIcon,
|
|
HeartIcon,
|
|
IssuesIcon,
|
|
KoFiIcon,
|
|
OpenCollectiveIcon,
|
|
PatreonIcon,
|
|
PayPalIcon,
|
|
WikiIcon,
|
|
} from '@modrinth/assets'
|
|
import { useVIntl, defineMessages } from '@vintl/vintl'
|
|
|
|
const { formatMessage } = useVIntl()
|
|
|
|
defineProps<{
|
|
project: {
|
|
issues_url: string
|
|
source_url: string
|
|
wiki_url: string
|
|
discord_url: string
|
|
donation_urls: {
|
|
id: string
|
|
url: string
|
|
}[]
|
|
}
|
|
linkTarget: string
|
|
}>()
|
|
|
|
const messages = defineMessages({
|
|
title: {
|
|
id: 'project.about.links.title',
|
|
defaultMessage: 'Links',
|
|
},
|
|
issues: {
|
|
id: 'project.about.links.issues',
|
|
defaultMessage: 'Report issues',
|
|
},
|
|
source: {
|
|
id: 'project.about.links.source',
|
|
defaultMessage: 'View source',
|
|
},
|
|
wiki: {
|
|
id: 'project.about.links.wiki',
|
|
defaultMessage: 'Visit wiki',
|
|
},
|
|
discord: {
|
|
id: 'project.about.links.discord',
|
|
defaultMessage: 'Join Discord server',
|
|
},
|
|
donateGeneric: {
|
|
id: 'project.about.links.donate.generic',
|
|
defaultMessage: 'Donate',
|
|
},
|
|
donateGitHub: {
|
|
id: 'project.about.links.donate.github',
|
|
defaultMessage: 'Sponsor on GitHub',
|
|
},
|
|
donateBmac: {
|
|
id: 'project.about.links.donate.bmac',
|
|
defaultMessage: 'Buy Me a Coffee',
|
|
},
|
|
donatePatreon: {
|
|
id: 'project.about.links.donate.patreon',
|
|
defaultMessage: 'Donate on Patreon',
|
|
},
|
|
donatePayPal: {
|
|
id: 'project.about.links.donate.paypal',
|
|
defaultMessage: 'Donate on PayPal',
|
|
},
|
|
donateKoFi: {
|
|
id: 'project.about.links.donate.kofi',
|
|
defaultMessage: 'Donate on Ko-fi',
|
|
},
|
|
donateGithub: {
|
|
id: 'project.about.links.donate.github',
|
|
defaultMessage: 'Sponsor on GitHub',
|
|
},
|
|
})
|
|
</script>
|