fix(core): reverted malicious discord link change (#11189)

Co-authored-by: Jimmfly <yangjinfei001@gmail.com>
This commit is contained in:
Jeroen Heijster
2025-03-26 03:13:27 +01:00
committed by GitHub
parent d991149faa
commit 64b25dfd89
6 changed files with 9 additions and 9 deletions

View File

@@ -23,7 +23,7 @@
<div align="center">
<a href="https://affine.pro">Home Page</a> |
<a href="https://discord.gg/Yjf5VFEn">Discord</a> |
<a href="https://affine.pro/redirect/discord">Discord</a> |
<a href="https://app.affine.pro">Live Demo</a> |
<a href="https://affine.pro/blog/">Blog</a> |
<a href="https://docs.affine.pro/docs/">Documentation</a>
@@ -179,7 +179,7 @@ Begin with Docker to deploy your own feature-rich, unrestricted version of AFFiN
## Hiring
Some amazing companies, including AFFiNE, are looking for developers! Are you interested in joining AFFiNE or its partners? Check out our [Discord channel](https://discord.gg/Yjf5VFEn) for some of the latest jobs available.
Some amazing companies, including AFFiNE, are looking for developers! Are you interested in joining AFFiNE or its partners? Check out our [Discord channel](https://affine.pro/redirect/discord) for some of the latest jobs available.
## Feature Request

View File

@@ -59,8 +59,6 @@ type ImportConfig = {
) => Promise<ImportResult>;
};
const DISCORD_URL = 'https://discord.gg/Yjf5VFEn';
const importOptions = [
{
key: 'markdown',
@@ -305,7 +303,7 @@ const ImportOptions = ({
{t['com.affine.import.modal.tip']()}{' '}
<a
className={style.link}
href="https://discord.gg/Yjf5VFEn"
href={BUILD_CONFIG.discordUrl}
target="_blank"
rel="noreferrer"
>
@@ -342,7 +340,7 @@ const SuccessStatus = ({ onComplete }: { onComplete: () => void }) => {
{t['com.affine.import.status.success.message']()}{' '}
<a
className={style.link}
href={DISCORD_URL}
href={BUILD_CONFIG.discordUrl}
target="_blank"
rel="noreferrer"
>
@@ -379,7 +377,7 @@ const ErrorStatus = ({
<div className={style.importModalButtonContainer}>
<Button
onClick={() => {
urlService.openPopupWindow(DISCORD_URL);
urlService.openPopupWindow(BUILD_CONFIG.discordUrl);
}}
variant="secondary"
>

View File

@@ -21,7 +21,7 @@ export const relatedLinks = [
{
icon: <DiscordIcon />,
title: 'Discord',
link: 'https://discord.gg/Yjf5VFEn',
link: BUILD_CONFIG.discordUrl,
},
{
icon: <YouTubeIcon />,

View File

@@ -100,7 +100,7 @@ const FeedbackIcon = ({ type }: { type: Flag['feedbackType'] }) => {
};
const feedbackLink: Record<NonNullable<Flag['feedbackType']>, string> = {
discord: 'https://discord.gg/Yjf5VFEn',
discord: BUILD_CONFIG.discordUrl,
email: 'mailto:support@toeverything.info',
github: 'https://github.com/toeverything/AFFiNE/issues',
};

View File

@@ -29,6 +29,7 @@ declare interface BUILD_CONFIG_TYPE {
changelogUrl: string;
pricingUrl: string;
downloadUrl: string;
discordUrl: string;
// see: tools/workers
imageProxyUrl: string;
linkPreviewUrl: string;

View File

@@ -47,6 +47,7 @@ export function getBuildConfig(
changelogUrl: 'https://affine.pro/what-is-new',
downloadUrl: 'https://affine.pro/download',
pricingUrl: 'https://affine.pro/pricing',
discordUrl: 'https://affine.pro/redirect/discord',
imageProxyUrl: '/api/worker/image-proxy',
linkPreviewUrl: '/api/worker/link-preview',
};