fix(desktop): using RSSHub icon in SVG format (#4366)

This commit is contained in:
Cason Kervis 2025-08-23 01:06:20 +08:00 committed by GitHub
parent 77684b6b9e
commit 28ddb76df4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 20 additions and 20 deletions

View File

@ -1,12 +1 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="470" height="470" viewBox="-10 -10 490 490">
<path
d="M0 0 C1.9825408 -0.00435531 3.96507991 -0.00954117 5.94761658 -0.01548767 C11.29914353 -0.02880291 16.65059953 -0.02946456 22.00213981 -0.02692437 C26.48711863 -0.02584926 30.97208341 -0.03075194 35.4570592 -0.03552979 C46.04918311 -0.04659982 56.64127155 -0.04707695 67.23339844 -0.04101562 C78.11865952 -0.03498176 89.00379115 -0.04727776 99.88903016 -0.06858569 C109.27124526 -0.08626837 118.65341942 -0.09219246 128.03565055 -0.08894795 C133.62296658 -0.08714506 139.21019031 -0.0896708 144.79749107 -0.10366249 C150.0581393 -0.1163447 155.3185876 -0.11419964 160.57923317 -0.1012516 C162.49546505 -0.09890846 164.41171146 -0.10153786 166.32792664 -0.10987473 C204.8488433 -0.26520886 239.2517555 12.70339909 268.08325195 38.2746582 C269.13672369 39.14749773 270.19270311 40.01731985 271.2512207 40.8840332 C274.98874055 44.03901548 277.97488568 47.51127222 281.08325195 51.2746582 C281.92114258 52.2749707 282.7590332 53.2752832 283.62231445 54.3059082 C307.20952489 82.9980649 317.41167497 116.39634833 317.35791016 153.19140625 C317.36226547 155.17394705 317.36745132 157.15648616 317.37339783 159.13902283 C317.38671307 164.49054978 317.38737471 169.84200578 317.38483453 175.19354606 C317.38375941 179.67852488 317.3886621 184.16348966 317.39343995 188.64846545 C317.40450997 199.24058936 317.40498711 209.8326778 317.39892578 220.42480469 C317.39289192 231.31006577 317.40518791 242.1951974 317.42649585 253.08043641 C317.44417853 262.46265151 317.45010262 271.84482567 317.44685811 281.2270568 C317.44505522 286.81437283 317.44758096 292.40159656 317.46157265 297.98889732 C317.47425485 303.24954555 317.4721098 308.50999385 317.45916176 313.77063942 C317.45681862 315.6868713 317.45944801 317.60311771 317.46778488 319.51933289 C317.62311902 358.04024955 304.65451106 392.44316175 279.08325195 421.2746582 C278.21041243 422.32812994 277.34059031 423.38410936 276.47387695 424.44262695 C273.31889468 428.1801468 269.84663793 431.16629193 266.08325195 434.2746582 C264.5827832 435.53149414 264.5827832 435.53149414 263.05200195 436.8137207 C246.64807275 450.29904125 221.15879029 467.2746582 199.08325195 467.2746582 C199.70155235 463.7527437 200.62736171 460.59849883 201.9387207 457.2746582 C202.31101807 456.31599854 202.68331543 455.35733887 203.06689453 454.36962891 C203.46416748 453.34828857 203.86144043 452.32694824 204.27075195 451.2746582 C228.81811101 386.77872712 226.90931904 315.03997803 199.49682617 251.62988281 C187.88874913 225.78099281 172.41465985 202.6479464 153.3293457 181.7434082 C151.82622596 180.09128355 150.33923169 178.42434933 148.8684082 176.7434082 C143.63303823 170.7811591 138.12599689 165.41465121 132.08325195 160.2746582 C131.51751465 159.79125977 130.95177734 159.30786133 130.36889648 158.80981445 C94.75519251 128.56126737 48.98095846 105.38997381 2.27856445 99.59887695 C0.08325195 99.2746582 0.08325195 99.2746582 -1.91674805 98.2746582 C-15.44086231 96.32228344 -29.02835583 96.06070803 -42.66674805 96.0246582 C-43.82069565 96.01702957 -43.82069565 96.01702957 -44.99795532 96.00924683 C-59.7457176 95.93093387 -74.27430498 96.87030628 -88.6237793 100.48950195 C-93.73689751 101.70864402 -98.91162422 102.55083535 -104.0925293 103.4309082 C-107.56151278 104.19628147 -110.6011106 105.21696947 -113.88769531 106.51196289 C-117.269316 107.78307143 -120.75000326 108.68709249 -124.22924805 109.6496582 C-130.30789962 111.3774146 -135.96632622 113.44103147 -141.66674805 116.2043457 C-144.34618602 117.47893946 -147.07438595 118.42963163 -149.91674805 119.2746582 C-149.34869805 113.47663069 -148.22107294 108.28681653 -146.35424805 102.7746582 C-145.96160767 101.60942627 -145.96160767 101.60942627 -145.56103516 100.4206543 C-142.73179119 92.32041118 -139.00847008 84.80013691 -134.91674805 77.2746582 C-134.08530273 75.70458008 -134.08530273 75.70458008 -133.23706055 74.1027832 C-128.65110321 65.80856371 -122.93390267 58.55711322 -116.91674805 51.2746582 C-116.26319336 50.47672852 -115.60963867 49.67879883 -114.9362793 48.85668945 C-110.97590247 44.17130085 -106.65400365 40.1632198 -101.91674805 36.2746582 C-100.91901367 35.4393457 -99.9212793 34.6040332 -98.89331055 33.7434082 C-70.20437402 10.14837602 -36.79614021 -0.05376639 0 0 Z"
fill="none" stroke="currentColor" stroke-width="2" transform="translate(152.916748046875,-0.274658203125)" />
<path
d="M0 0 C1.9825408 -0.00435531 3.96507991 -0.00954117 5.94761658 -0.01548767 C11.29914353 -0.02880291 16.65059953 -0.02946456 22.00213981 -0.02692437 C26.48711863 -0.02584926 30.97208341 -0.03075194 35.4570592 -0.03552979 C46.04918311 -0.04659982 56.64127155 -0.04707695 67.23339844 -0.04101562 C78.11865952 -0.03498176 89.00379115 -0.04727776 99.88903016 -0.06858569 C109.27124526 -0.08626837 118.65341942 -0.09219246 128.03565055 -0.08894795 C133.62296658 -0.08714506 139.21019031 -0.0896708 144.79749107 -0.10366249 C150.0581393 -0.1163447 155.3185876 -0.11419964 160.57923317 -0.1012516 C162.49546505 -0.09890846 164.41171146 -0.10153786 166.32792664 -0.10987473 C204.8488433 -0.26520886 239.2517555 12.70339909 268.08325195 38.2746582 C269.13672369 39.14749773 270.19270311 40.01731985 271.2512207 40.8840332 C274.98874055 44.03901548 277.97488568 47.51127222 281.08325195 51.2746582 C281.92114258 52.2749707 282.7590332 53.2752832 283.62231445 54.3059082 C307.20952489 82.9980649 317.41167497 116.39634833 317.35791016 153.19140625 C317.36226547 155.17394705 317.36745132 157.15648616 317.37339783 159.13902283 C317.38671307 164.49054978 317.38737471 169.84200578 317.38483453 175.19354606 C317.38375941 179.67852488 317.3886621 184.16348966 317.39343995 188.64846545 C317.40450997 199.24058936 317.40498711 209.8326778 317.39892578 220.42480469 C317.39289192 231.31006577 317.40518791 242.1951974 317.42649585 253.08043641 C317.44417853 262.46265151 317.45010262 271.84482567 317.44685811 281.2270568 C317.44505522 286.81437283 317.44758096 292.40159656 317.46157265 297.98889732 C317.47425485 303.24954555 317.4721098 308.50999385 317.45916176 313.77063942 C317.45681862 315.6868713 317.45944801 317.60311771 317.46778488 319.51933289 C317.62311902 358.04024955 304.65451106 392.44316175 279.08325195 421.2746582 C278.21041243 422.32812994 277.34059031 423.38410936 276.47387695 424.44262695 C273.31889468 428.1801468 269.84663793 431.16629193 266.08325195 434.2746582 C264.5827832 435.53149414 264.5827832 435.53149414 263.05200195 436.8137207 C246.64807275 450.29904125 221.15879029 467.2746582 199.08325195 467.2746582 C199.70155235 463.7527437 200.62736171 460.59849883 201.9387207 457.2746582 C202.31101807 456.31599854 202.68331543 455.35733887 203.06689453 454.36962891 C203.46416748 453.34828857 203.86144043 452.32694824 204.27075195 451.2746582 C228.81811101 386.77872712 226.90931904 315.03997803 199.49682617 251.62988281 C187.88874913 225.78099281 172.41465985 202.6479464 153.3293457 181.7434082 C151.82622596 180.09128355 150.33923169 178.42434933 148.8684082 176.7434082 C143.63303823 170.7811591 138.12599689 165.41465121 132.08325195 160.2746582 C131.51751465 159.79125977 130.95177734 159.30786133 130.36889648 158.80981445 C94.75519251 128.56126737 48.98095846 105.38997381 2.27856445 99.59887695 C0.08325195 99.2746582 0.08325195 99.2746582 -1.91674805 98.2746582 C-15.44086231 96.32228344 -29.02835583 96.06070803 -42.66674805 96.0246582 C-43.82069565 96.01702957 -43.82069565 96.01702957 -44.99795532 96.00924683 C-59.7457176 95.93093387 -74.27430498 96.87030628 -88.6237793 100.48950195 C-93.73689751 101.70864402 -98.91162422 102.55083535 -104.0925293 103.4309082 C-107.56151278 104.19628147 -110.6011106 105.21696947 -113.88769531 106.51196289 C-117.269316 107.78307143 -120.75000326 108.68709249 -124.22924805 109.6496582 C-130.30789962 111.3774146 -135.96632622 113.44103147 -141.66674805 116.2043457 C-144.34618602 117.47893946 -147.07438595 118.42963163 -149.91674805 119.2746582 C-149.34869805 113.47663069 -148.22107294 108.28681653 -146.35424805 102.7746582 C-145.96160767 101.60942627 -145.96160767 101.60942627 -145.56103516 100.4206543 C-142.73179119 92.32041118 -139.00847008 84.80013691 -134.91674805 77.2746582 C-134.08530273 75.70458008 -134.08530273 75.70458008 -133.23706055 74.1027832 C-128.65110321 65.80856371 -122.93390267 58.55711322 -116.91674805 51.2746582 C-116.26319336 50.47672852 -115.60963867 49.67879883 -114.9362793 48.85668945 C-110.97590247 44.17130085 -106.65400365 40.1632198 -101.91674805 36.2746582 C-100.91901367 35.4393457 -99.9212793 34.6040332 -98.89331055 33.7434082 C-70.20437402 10.14837602 -36.79614021 -0.05376639 0 0 Z"
fill="none" stroke="currentColor" stroke-width="2" transform="translate(152.916748046875,-0.274658203125)" />
<path
d="M0 0 C17.15700425 13.25398907 28.35288193 28.77836264 35.41015625 49.16015625 C36.06177734 50.98353516 36.06177734 50.98353516 36.7265625 52.84375 C43.66996482 75.70617229 40.45865786 101.91157533 29.48486328 122.93261719 C24.29969041 132.5798008 18.08253396 140.39334928 10.41015625 148.16015625 C9.84039062 148.80210937 9.270625 149.4440625 8.68359375 150.10546875 C-5.93673884 166.22532263 -29.62326077 175.04768946 -50.96240234 176.29931641 C-70.74714593 177.09921741 -88.54362556 173.60397865 -105.78515625 163.7109375 C-108.47111156 162.12408821 -108.47111156 162.12408821 -111.08203125 161.28515625 C-114.48750406 159.75746751 -116.92466766 157.39445523 -119.58984375 154.84765625 C-120.35167969 154.13706055 -120.35167969 154.13706055 -121.12890625 153.41210938 C-140.43009318 135.32343291 -140.43009318 135.32343291 -143.58984375 126.16015625 C-144.55809417 124.0925091 -145.53864911 122.03060584 -146.52734375 119.97265625 C-157.80156804 95.52185717 -159.05147691 69.16927104 -149.72900391 43.81933594 C-139.63216064 18.48145826 -120.47190027 -0.77581862 -95.58984375 -11.83984375 C-63.09642631 -24.46725509 -28.508196 -20.25242883 0 0 Z"
fill="none" stroke="currentColor" stroke-width="2" transform="translate(170.58984375,278.83984375)" />
</svg>
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>RSSHub</title><rect width="24" height="24" fill="#ffd6a6" rx="7.636"/><path fill="#ff8549" d="M.142 6.16Q.002 6.875 0 7.635v8.728A7.636 7.636 0 0 0 7.636 24h8.728a7.7 7.7 0 0 0 1.477-.142 13.26 13.26 0 0 0 1.25-5.64c0-7.35-5.959-13.309-13.31-13.309a13.25 13.25 0 0 0-5.64 1.25"/><circle cx="5.727" cy="18.273" r="4.964" fill="#ff2900"/></svg>

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 420 B

View File

@ -1,5 +1,6 @@
import { MdiMeditation } from "@follow/components/icons/Meditation.js"
import { ActionButton } from "@follow/components/ui/button/index.js"
import { RSSHubLogo } from "@follow/components/ui/platform-icon/icons.js"
import { RootPortal } from "@follow/components/ui/portal/index.js"
import { EllipsisHorizontalTextWithTooltip } from "@follow/components/ui/typography/EllipsisWithTooltip.js"
import { UserRole } from "@follow/constants"
@ -12,7 +13,6 @@ import { memo, useCallback, useLayoutEffect, useState } from "react"
import { useTranslation } from "react-i18next"
import { useNavigate } from "react-router"
import rsshubLogoUrl from "~/assets/rsshub-icon.png?url"
import { useIsInMASReview, useServerConfigs } from "~/atoms/server-configs"
import { useIsZenMode, useSetZenMode } from "~/atoms/settings/ui"
import {
@ -37,8 +37,6 @@ import { LoginButton } from "./LoginButton"
import { UserAvatar } from "./UserAvatar"
import { UserProBadge } from "./UserProBadge"
const rsshubLogo = new URL(rsshubLogoUrl, import.meta.url).href
export type ProfileButtonProps = LoginProps & {
animatedAvatar?: boolean
}
@ -181,7 +179,7 @@ export const ProfileButton: FC<ProfileButtonProps> = memo((props) => {
onClick={() => {
navigate("/rsshub")
}}
icon={<img src={rsshubLogo} className="size-3 grayscale" />}
icon={<RSSHubLogo className="size-3 grayscale" />}
>
{t("words.rsshub")}
</DropdownMenuItem>

View File

@ -1,12 +1,12 @@
import { Logo } from "@follow/components/icons/logo.jsx"
import { Button } from "@follow/components/ui/button/index.js"
import { RSSHubLogo } from "@follow/components/ui/platform-icon/icons.js"
import type { RSSHubModel } from "@follow/models"
import { whoami } from "@follow/store/user/getters"
import { cn, formatNumber } from "@follow/utils/utils"
import { memo, useCallback, useEffect } from "react"
import { useTranslation } from "react-i18next"
import RSSHubIconUrl from "~/assets/rsshub-icon.png?url"
import { ErrorTooltip } from "~/components/common/ErrorTooltip"
import { HeaderActionButton, HeaderActionGroup } from "~/components/ui/button/HeaderActionButton"
import { useModalStack } from "~/components/ui/modal/stacked/hooks"
@ -20,8 +20,6 @@ import { UserAvatar } from "~/modules/user/UserAvatar"
import { Queries } from "~/queries"
import { useSetRSSHubMutation } from "~/queries/rsshub"
const RSSHubIcon = new URL(RSSHubIconUrl, import.meta.url).href
export function Component() {
const { t } = useTranslation("settings")
const { present } = useModalStack()
@ -53,7 +51,7 @@ export function Component() {
{/* Simple Header */}
<div className="mx-auto mb-8 max-w-6xl text-center">
<div className="mb-4 flex justify-center">
<img src={RSSHubIcon} className="size-16" alt="RSSHub" />
<RSSHubLogo className="size-16" />
</div>
<h1 className="text-text mb-4 text-3xl font-bold">{t("words.rsshub", { ns: "common" })}</h1>
<p className="text-text-secondary mx-auto max-w-2xl text-sm leading-relaxed">

View File

@ -0,0 +1,14 @@
import type { SVGProps } from "react"
export function RSSHubLogo(props: SVGProps<SVGSVGElement>) {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" {...props}>
<rect width="24" height="24" fill="#ffd6a6" rx="7.636" />
<path
fill="#ff8549"
d="M.142 6.16Q.002 6.875 0 7.635v8.728A7.636 7.636 0 0 0 7.636 24h8.728a7.7 7.7 0 0 0 1.477-.142 13.26 13.26 0 0 0 1.25-5.64c0-7.35-5.959-13.309-13.31-13.309a13.25 13.25 0 0 0-5.64 1.25"
/>
<circle cx="5.727" cy="18.273" r="4.964" fill="#ff2900" />
</svg>
)
}

View File

@ -6,4 +6,5 @@ export * from "./collections/outline"
export * from "./collections/readeck"
export * from "./collections/readwise"
export * from "./collections/rss3"
export * from "./collections/rsshub"
export * from "./collections/zotero"