feat: disable image compression for platfrom icon and add X
This commit is contained in:
@@ -12,7 +12,6 @@ import { Titles } from "~/components/common/Titles"
|
||||
import PostCover from "~/components/home/PostCover"
|
||||
import { PlatformsSyncMap } from "~/components/site/Platform"
|
||||
import { Avatar } from "~/components/ui/Avatar"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { Tooltip } from "~/components/ui/Tooltip"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
@@ -145,7 +144,8 @@ const Card = ({
|
||||
>
|
||||
<span className="inline-flex items-center space-x-[6px]">
|
||||
{platform?.icon && (
|
||||
<Image
|
||||
// eslint-disable-next-line @next/next/no-img-element
|
||||
<img
|
||||
src={platform?.icon}
|
||||
alt={platform?.name}
|
||||
width={16}
|
||||
|
||||
@@ -14,7 +14,6 @@ import { Menu } from "@headlessui/react"
|
||||
import { useQueryClient } from "@tanstack/react-query"
|
||||
|
||||
import PostCover from "~/components/home/PostCover"
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { useDate } from "~/hooks/useDate"
|
||||
import { getSiteLink } from "~/lib/helpers"
|
||||
import { Trans, useTranslation } from "~/lib/i18n/client"
|
||||
@@ -386,7 +385,8 @@ export const PagesManager = ({ type }: { type: NoteType }) => {
|
||||
>
|
||||
<span className="inline-flex items-center space-x-[6px]">
|
||||
{platform?.icon && (
|
||||
<Image
|
||||
// eslint-disable-next-line @next/next/no-img-element
|
||||
<img
|
||||
src={platform?.icon}
|
||||
alt={platform?.name}
|
||||
width={16}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
import { useState } from "react"
|
||||
|
||||
import { Image } from "~/components/ui/Image"
|
||||
import { Tooltip } from "~/components/ui/Tooltip"
|
||||
import { UniLink } from "~/components/ui/UniLink"
|
||||
import { cn } from "~/lib/utils"
|
||||
@@ -38,6 +37,17 @@ export const PlatformsSyncMap: {
|
||||
icon: `${iconCDN}/twitter`,
|
||||
url: "https://twitter.com/i/user/{username}",
|
||||
},
|
||||
x: {
|
||||
name: "X",
|
||||
icon: `${iconCDN}/x/_/fff`,
|
||||
url: "https://x.com/{username}",
|
||||
portfolioDomain: `https://x.com/`,
|
||||
},
|
||||
x_id: {
|
||||
name: "X",
|
||||
icon: `${iconCDN}/x_/fff`,
|
||||
url: "https://x.com/i/user/{username}",
|
||||
},
|
||||
pixiv: {
|
||||
name: "Pixiv",
|
||||
url: "https://www.pixiv.net/users/{username}",
|
||||
@@ -189,7 +199,8 @@ export const Platform = ({
|
||||
>
|
||||
<span className="inline-flex items-center">
|
||||
{showImg ? (
|
||||
<Image
|
||||
// eslint-disable-next-line @next/next/no-img-element
|
||||
<img
|
||||
src={PlatformsSyncMap[platform]?.icon || `${iconCDN}/${platform}`}
|
||||
alt={platform}
|
||||
width={20}
|
||||
|
||||
Reference in New Issue
Block a user