diff --git a/package.json b/package.json index 45604e416..af3bad75b 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "msedge-tts": "1.3.4", "nanoid": "5.0.7", "ofetch": "1.3.4", - "path-to-regexp": "7.1.0", + "path-to-regexp": "7.2.0", "posthog-js": "1.161.0", "posthog-node": "4.2.0", "re-resizable": "6.9.17", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fedcfb811..e5090ff88 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -193,7 +193,7 @@ importers: version: 0.2.38(react@18.3.1) framer-motion: specifier: 11.0.10 - version: 11.5.4(@emotion/is-prop-valid@1.3.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 11.0.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1) franc-min: specifier: 6.2.0 version: 6.2.0 @@ -237,8 +237,8 @@ importers: specifier: 1.3.4 version: 1.3.4 path-to-regexp: - specifier: 7.1.0 - version: 8.0.0 + specifier: 7.2.0 + version: 7.2.0 posthog-js: specifier: 1.161.0 version: 1.161.0 @@ -1344,11 +1344,11 @@ packages: engines: {node: '>=14.14'} hasBin: true - '@emotion/is-prop-valid@1.3.0': - resolution: {integrity: sha512-SHetuSLvJDzuNbOdtPVbq6yMMMlLoW5Q94uDqJZqy50gcmAjxFkVqmzqSGEFq9gT2iMuIeKV1PXVWmvUhuZLlQ==} + '@emotion/is-prop-valid@0.8.8': + resolution: {integrity: sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==} - '@emotion/memoize@0.9.0': - resolution: {integrity: sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==} + '@emotion/memoize@0.7.4': + resolution: {integrity: sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==} '@es-joy/jsdoccomment@0.48.0': resolution: {integrity: sha512-G6QUWIcC+KvSwXNsJyDTHvqUdNoAVJPPgkc3+Uk4WBKqZvoXhlvazOgm9aL0HwihJLQf0l+tOE2UFzXBqCqgDw==} @@ -4948,15 +4948,12 @@ packages: react: optional: true - framer-motion@11.5.4: - resolution: {integrity: sha512-E+tb3/G6SO69POkdJT+3EpdMuhmtCh9EWuK4I1DnIC23L7tFPrl8vxP+LSovwaw6uUr73rUbpb4FgK011wbRJQ==} + framer-motion@11.0.10: + resolution: {integrity: sha512-aaImib9FQlfno2yiZAdkvN6zLXLr8a9uGsGFlQO64hSm8NoCeiUng2//5ok7RHCW2ufzT74uuPsmWzUsrHPYDQ==} peerDependencies: - '@emotion/is-prop-valid': '*' react: ^18.0.0 react-dom: ^18.0.0 peerDependenciesMeta: - '@emotion/is-prop-valid': - optional: true react: optional: true react-dom: @@ -6474,8 +6471,8 @@ packages: resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} engines: {node: 20 || >=22} - path-to-regexp@8.0.0: - resolution: {integrity: sha512-GAWaqWlTjYK/7SVpIUA6CTxmcg65SP30sbjdCvyYReosRkk7Z/LyHWwkK3Vu0FcIi0FNTADUs4eh1AsU5s10cg==} + path-to-regexp@7.2.0: + resolution: {integrity: sha512-0W4AcUxPpFlcS8ql8ZEmFwaI0X5WshUVAFdXe3PBurrt18DK8bvSS+UKHvJUAfGILco/nTtc/E4LcPNfVysfwQ==} engines: {node: '>=16'} path-type@2.0.0: @@ -9513,12 +9510,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@emotion/is-prop-valid@1.3.0': + '@emotion/is-prop-valid@0.8.8': dependencies: - '@emotion/memoize': 0.9.0 + '@emotion/memoize': 0.7.4 optional: true - '@emotion/memoize@0.9.0': + '@emotion/memoize@0.7.4': optional: true '@es-joy/jsdoccomment@0.48.0': @@ -13790,11 +13787,11 @@ snapshots: optionalDependencies: react: 18.3.1 - framer-motion@11.5.4(@emotion/is-prop-valid@1.3.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + framer-motion@11.0.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - tslib: 2.6.3 + tslib: 2.7.0 optionalDependencies: - '@emotion/is-prop-valid': 1.3.0 + '@emotion/is-prop-valid': 0.8.8 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -15736,7 +15733,7 @@ snapshots: lru-cache: 11.0.0 minipass: 7.1.2 - path-to-regexp@8.0.0: {} + path-to-regexp@7.2.0: {} path-type@2.0.0: dependencies: @@ -16189,7 +16186,7 @@ snapshots: dependencies: react: 18.3.1 react-style-singleton: 2.2.1(@types/react@18.3.5)(react@18.3.1) - tslib: 2.6.3 + tslib: 2.7.0 optionalDependencies: '@types/react': 18.3.5 @@ -16244,7 +16241,7 @@ snapshots: get-nonce: 1.0.1 invariant: 2.2.4 react: 18.3.1 - tslib: 2.6.3 + tslib: 2.7.0 optionalDependencies: '@types/react': 18.3.5 @@ -17220,7 +17217,7 @@ snapshots: use-callback-ref@1.3.2(@types/react@18.3.5)(react@18.3.1): dependencies: react: 18.3.1 - tslib: 2.6.3 + tslib: 2.7.0 optionalDependencies: '@types/react': 18.3.5 @@ -17239,7 +17236,7 @@ snapshots: dependencies: detect-node-es: 1.1.0 react: 18.3.1 - tslib: 2.6.3 + tslib: 2.7.0 optionalDependencies: '@types/react': 18.3.5 diff --git a/src/renderer/src/components/feed-icon.tsx b/src/renderer/src/components/feed-icon.tsx index 7bc3bec72..9de39aa1f 100644 --- a/src/renderer/src/components/feed-icon.tsx +++ b/src/renderer/src/components/feed-icon.tsx @@ -72,6 +72,7 @@ export function FeedIcon({ size = 20, fallback = true, siteUrl, + useMedia, }: { feed?: FeedModel entry?: CombinedEntryModel["entries"] @@ -83,8 +84,13 @@ export function FeedIcon({ * Image loading error fallback to site icon */ fallback?: boolean + + useMedia?: boolean }) { - const image = entry?.authorAvatar || feed?.image + const image = + (useMedia + ? entry?.media?.find((i) => i.type === "photo")?.url || entry?.authorAvatar + : entry?.authorAvatar) || feed?.image if (!feed && !siteUrl) { throw new Error("You must provide either a feed or a siteUrl") diff --git a/src/renderer/src/modules/entry-column/templates/list-item-template.tsx b/src/renderer/src/modules/entry-column/templates/list-item-template.tsx index b5a9f7381..bee8051a0 100644 --- a/src/renderer/src/modules/entry-column/templates/list-item-template.tsx +++ b/src/renderer/src/modules/entry-column/templates/list-item-template.tsx @@ -137,6 +137,7 @@ export function ListItem({ entry={entry.entries} size={80} className="m-0 rounded" + useMedia /> } />