{
e.stopPropagation()
if (view !== undefined) {
- navigate({
+ navigateEntry({
entryId: null,
feedId: FEED_COLLECTION_LIST,
view,
@@ -131,16 +150,32 @@ function FeedListImpl({ className, view }: { className?: string; view: number })
}
}}
>
-
+
{t("words.starred")}
+ {Object.keys(listsData).length > 0 && (
+ <>
+
diff --git a/apps/renderer/src/modules/feed-column/unread-number.tsx b/apps/renderer/src/modules/feed-column/unread-number.tsx
index 958826593..b5482156d 100644
--- a/apps/renderer/src/modules/feed-column/unread-number.tsx
+++ b/apps/renderer/src/modules/feed-column/unread-number.tsx
@@ -1,7 +1,15 @@
import { useUISettingKey } from "~/atoms/settings/ui"
import { cn } from "~/lib/utils"
-export const UnreadNumber = ({ unread, className }: { unread: number; className?: string }) => {
+export const UnreadNumber = ({
+ unread,
+ className,
+ isList,
+}: {
+ unread: number
+ className?: string
+ isList?: boolean
+}) => {
const showUnreadCount = useUISettingKey("sidebarShowUnreadCount")
if (!showUnreadCount) return null
if (!unread) return null
@@ -9,7 +17,11 @@ export const UnreadNumber = ({ unread, className }: { unread: number; className?
- {unread}
+ {isList ? (
+
+ ) : (
+ unread
+ )}
)
}
diff --git a/apps/renderer/src/modules/modal/shortcuts.tsx b/apps/renderer/src/modules/modal/shortcuts.tsx
index 0ef56098d..66642d8dc 100644
--- a/apps/renderer/src/modules/modal/shortcuts.tsx
+++ b/apps/renderer/src/modules/modal/shortcuts.tsx
@@ -7,7 +7,7 @@ import { useUISettingKey } from "~/atoms/settings/ui"
import { MotionButtonBase } from "~/components/ui/button"
import { KbdCombined } from "~/components/ui/kbd/Kbd"
import { useCurrentModal, useModalStack } from "~/components/ui/modal"
-import { NoopChildren } from "~/components/ui/modal/stacked/utils"
+import { PlainModal } from "~/components/ui/modal/stacked/custom-modal"
import { ScrollArea } from "~/components/ui/scroll-area"
import { shortcuts } from "~/constants/shortcuts"
import { useSwitchHotKeyScope } from "~/hooks/common"
@@ -89,7 +89,7 @@ export const useShortcutsModal = () => {
overlay: false,
id: "shortcuts",
content: () =>
,
- CustomModalComponent: NoopChildren,
+ CustomModalComponent: PlainModal,
clickOutsideToDismiss: true,
})
}, [present])
diff --git a/apps/renderer/src/modules/panel/cmdk.tsx b/apps/renderer/src/modules/panel/cmdk.tsx
index 48498c4db..84e91f2a3 100644
--- a/apps/renderer/src/modules/panel/cmdk.tsx
+++ b/apps/renderer/src/modules/panel/cmdk.tsx
@@ -178,7 +178,7 @@ export const SearchCmdK: React.FC = () => {
feedId={entry.feedId}
entryId={entry.item.id}
id={entry.item.id}
- icon={feed?.siteUrl}
+ icon={feed?.type === "feed" ? feed?.siteUrl : undefined}
subtitle={feed?.title}
/>
)
@@ -203,7 +203,7 @@ export const SearchCmdK: React.FC = () => {
feedId={feed.item.id!}
entryId={ROUTE_ENTRY_PENDING}
id={feed.item.id!}
- icon={feed.item.siteUrl}
+ icon={feed.item.type === "feed" ? feed.item.siteUrl : undefined}
subtitle={useFeedUnreadStore.getState().data[feed.item.id!]?.toString()}
/>
))}
diff --git a/apps/renderer/src/modules/panel/cmdn.tsx b/apps/renderer/src/modules/panel/cmdn.tsx
index 3c30d2b9c..6873454f7 100644
--- a/apps/renderer/src/modules/panel/cmdn.tsx
+++ b/apps/renderer/src/modules/panel/cmdn.tsx
@@ -9,7 +9,7 @@ import { getSidebarActiveView } from "~/atoms/sidebar"
import { m } from "~/components/common/Motion"
import { Form, FormControl, FormField, FormItem } from "~/components/ui/form"
import { useModalStack } from "~/components/ui/modal"
-import { NoopChildren } from "~/components/ui/modal/stacked/utils"
+import { PlainModal } from "~/components/ui/modal/stacked/custom-modal"
import { HotKeyScopeMap } from "~/constants"
import { tipcClient } from "~/lib/client"
import type { FeedViewType } from "~/lib/enum"
@@ -108,7 +108,7 @@ export const CmdNTrigger = () => {
present({
title: "Quick Follow",
content: CmdNPanel,
- CustomModalComponent: NoopChildren,
+ CustomModalComponent: PlainModal,
overlay: false,
id: "quick-add",
clickOutsideToDismiss: true,
diff --git a/apps/renderer/src/modules/profile/hooks.ts b/apps/renderer/src/modules/profile/hooks.ts
index 7e697d50f..b17fbf8ef 100644
--- a/apps/renderer/src/modules/profile/hooks.ts
+++ b/apps/renderer/src/modules/profile/hooks.ts
@@ -2,7 +2,7 @@ import { createElement, useCallback } from "react"
import { parse } from "tldts"
import { useModalStack } from "~/components/ui/modal"
-import { NoopChildren } from "~/components/ui/modal/stacked/utils"
+import { PlainModal } from "~/components/ui/modal/stacked/custom-modal"
import { useAuthQuery } from "~/hooks/common"
import { apiClient } from "~/lib/api-fetch"
import { defineQuery } from "~/lib/defineQuery"
@@ -19,7 +19,7 @@ export const useUserSubscriptionsQuery = (userId: string | undefined) => {
const groupFolder = {} as Record
for (const subscription of res.data || []) {
- if (!subscription.category && subscription.feeds) {
+ if (!subscription.category && "feeds" in subscription) {
const { siteUrl } = subscription.feeds
if (!siteUrl) continue
const parsed = parse(siteUrl)
@@ -55,7 +55,7 @@ export const usePresentUserProfileModal = (variant: "drawer" | "dialog" = "dialo
userId,
variant,
}),
- CustomModalComponent: NoopChildren,
+ CustomModalComponent: PlainModal,
clickOutsideToDismiss: true,
modal: variant === "dialog",
overlay: variant === "dialog",
diff --git a/apps/renderer/src/modules/profile/profile-setting-form.tsx b/apps/renderer/src/modules/profile/profile-setting-form.tsx
index d334b7edd..0a299a669 100644
--- a/apps/renderer/src/modules/profile/profile-setting-form.tsx
+++ b/apps/renderer/src/modules/profile/profile-setting-form.tsx
@@ -102,14 +102,17 @@ export const ProfileSettingForm = () => {
{t("profile.avatar.label")}
-
+
+
+ {field.value && (
+
+
+
+ )}
+
-
-
-
-
)}
/>
diff --git a/apps/renderer/src/modules/profile/user-profile-modal.tsx b/apps/renderer/src/modules/profile/user-profile-modal.tsx
index 5cefbbff0..6dfb1a9b0 100644
--- a/apps/renderer/src/modules/profile/user-profile-modal.tsx
+++ b/apps/renderer/src/modules/profile/user-profile-modal.tsx
@@ -366,6 +366,7 @@ const SubscriptionItem: FC<{
const isFollowed = !!useSubscriptionStore((state) => state.data[subscription.feedId])
const { present } = useModalStack()
const isLoose = variant === "loose"
+ if (!("feeds" in subscription)) return null
return (