You've already forked AstralRinth
forked from didirus/AstralRinth
Add russian banner, blog post translation, and unlist old blog post. Adjust banner colors in dark mode (#4468)
* Add russian banner, blog post translation, and unlist old blog post. Adjust banner colors in dark mode * russia
This commit is contained in:
@@ -27,6 +27,61 @@
|
||||
</div>
|
||||
</div>
|
||||
<div ref="main_page" class="layout" :class="{ 'expanded-mobile-nav': isBrowseMenuOpen }">
|
||||
<PagewideBanner v-if="isRussia && !flags.hideRussiaCensorshipBanner" variant="error">
|
||||
<template #title>
|
||||
<div class="flex flex-col gap-1 text-contrast">
|
||||
<span lang="ru">К сожалению, Modrinth скоро станет недоступен в России</span>
|
||||
<span class="text-sm font-medium opacity-50" lang="en">
|
||||
Modrinth will soon be unavailable in Russia
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #description>
|
||||
<p class="m-0" lang="ru">
|
||||
Российское правительство потребовало от нас заблокировать некоторые проекты на Modrinth,
|
||||
но мы решили отказать им в цензуре.
|
||||
</p>
|
||||
<p class="-mt-2 mb-0 text-sm opacity-50" lang="en">
|
||||
The Russian government has asked us to censor certain topics on Modrinth and we have
|
||||
decided to refuse to comply with their requests.
|
||||
</p>
|
||||
|
||||
<p class="m-0 font-semibold" lang="ru">
|
||||
Пожалуйста, найдите какой-нибудь надёжный VPN или прокси, чтобы не потерять доступ к
|
||||
Modrinth.
|
||||
</p>
|
||||
<p class="-mt-2 mb-0 text-sm opacity-50" lang="en">
|
||||
Please seek a reputable VPN or proxy of some kind to continue to access Modrinth in
|
||||
Russia.
|
||||
</p>
|
||||
</template>
|
||||
<template #actions>
|
||||
<div class="mt-2 flex w-fit gap-2">
|
||||
<ButtonStyled color="brand">
|
||||
<nuxt-link to="/news/article/standing-by-our-values-russian">
|
||||
<BookTextIcon /> Прочесть наше полное заявление
|
||||
<span class="text-xs font-medium">(Перевод на русский)</span>
|
||||
</nuxt-link>
|
||||
</ButtonStyled>
|
||||
<ButtonStyled>
|
||||
<nuxt-link to="/news/article/standing-by-our-values">
|
||||
<BookTextIcon /> Read our full statement
|
||||
<span class="text-xs font-medium">(English)</span>
|
||||
</nuxt-link>
|
||||
</ButtonStyled>
|
||||
</div>
|
||||
</template>
|
||||
<template #actions_right>
|
||||
<ButtonStyled circular type="transparent">
|
||||
<button
|
||||
v-tooltip="formatMessage(commonMessages.closeButton)"
|
||||
@click="hideRussiaCensorshipBanner"
|
||||
>
|
||||
<XIcon :aria-label="formatMessage(commonMessages.closeButton)" />
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
</template>
|
||||
</PagewideBanner>
|
||||
<PagewideBanner v-if="showTaxComplianceBanner" variant="warning">
|
||||
<template #title>
|
||||
<span>{{ formatMessage(taxBannerMessages.title) }}</span>
|
||||
@@ -111,7 +166,7 @@
|
||||
<Button
|
||||
transparent
|
||||
icon-only
|
||||
:aria-label="formatMessage(messages.close)"
|
||||
:aria-label="formatMessage(commonMessages.closeButton)"
|
||||
@click="hideStagingBanner"
|
||||
>
|
||||
<XIcon aria-hidden="true" />
|
||||
@@ -774,6 +829,7 @@ import {
|
||||
BellIcon,
|
||||
BlueskyIcon,
|
||||
BookmarkIcon,
|
||||
BookTextIcon,
|
||||
BoxIcon,
|
||||
BracesIcon,
|
||||
ChartIcon,
|
||||
@@ -833,6 +889,8 @@ import TeleportOverflowMenu from '~/components/ui/servers/TeleportOverflowMenu.v
|
||||
import { errors as generatedStateErrors } from '~/generated/state.json'
|
||||
import { getProjectTypeMessage } from '~/utils/i18n-project-type.ts'
|
||||
|
||||
const country = useUserCountry()
|
||||
|
||||
const { formatMessage } = useVIntl()
|
||||
|
||||
const auth = await useAuth()
|
||||
@@ -875,7 +933,6 @@ const taxBannerMessages = defineMessages({
|
||||
id: 'layout.banner.tax.action',
|
||||
defaultMessage: 'Complete tax form',
|
||||
},
|
||||
close: { id: 'common.close', defaultMessage: 'Close' },
|
||||
})
|
||||
|
||||
const taxFormModalRef = ref(null)
|
||||
@@ -1019,10 +1076,6 @@ const messages = defineMessages({
|
||||
id: 'layout.action.change-theme',
|
||||
defaultMessage: 'Change theme',
|
||||
},
|
||||
close: {
|
||||
id: 'layout.action.close-banner',
|
||||
defaultMessage: 'Close',
|
||||
},
|
||||
modrinthHomePage: {
|
||||
id: 'layout.nav.modrinth-home-page',
|
||||
defaultMessage: 'Modrinth home page',
|
||||
@@ -1265,6 +1318,8 @@ const isDiscoveringSubpage = computed(
|
||||
() => route.name && route.name.startsWith('type-id') && !route.query.sid,
|
||||
)
|
||||
|
||||
const isRussia = computed(() => country.value === 'ru')
|
||||
|
||||
const rCount = ref(0)
|
||||
|
||||
const randomProjects = ref([])
|
||||
@@ -1403,6 +1458,11 @@ function hideStagingBanner() {
|
||||
cosmetics.value.hideStagingBanner = true
|
||||
}
|
||||
|
||||
function hideRussiaCensorshipBanner() {
|
||||
flags.value.hideRussiaCensorshipBanner = true
|
||||
saveFeatureFlags()
|
||||
}
|
||||
|
||||
const socialLinks = [
|
||||
{
|
||||
label: formatMessage(
|
||||
|
||||
Reference in New Issue
Block a user