feat(mobile): show analytics in feed form
This commit is contained in:
@@ -96,7 +96,7 @@ interface DiscoverFeedCardProps {
|
||||
export const DiscoverFeedCard: FC<DiscoverFeedCardProps> = memo(
|
||||
({ item, onSuccess, className }) => {
|
||||
const numberFormatter = useMemo(() => new Intl.NumberFormat("en-US", {}), [])
|
||||
const { t } = useTranslation()
|
||||
const { t } = useTranslation("common")
|
||||
|
||||
const isSubscribed = useIsSubscribed(item.feed?.id || item.list?.id || "")
|
||||
|
||||
|
||||
@@ -16,12 +16,16 @@ import {
|
||||
NavigationBlurEffectHeaderView,
|
||||
SafeNavigationScrollView,
|
||||
} from "@/src/components/layouts/views/SafeNavigationScrollView"
|
||||
import { RelativeDateTime } from "@/src/components/ui/datetime/RelativeDateTime"
|
||||
import { FormProvider } from "@/src/components/ui/form/FormProvider"
|
||||
import { FormLabel } from "@/src/components/ui/form/Label"
|
||||
import { FormSwitch } from "@/src/components/ui/form/Switch"
|
||||
import { TextField } from "@/src/components/ui/form/TextField"
|
||||
import { GroupedInsetListCard } from "@/src/components/ui/grouped/GroupedList"
|
||||
import { PlatformActivityIndicator } from "@/src/components/ui/loading/PlatformActivityIndicator"
|
||||
import { SafeAlertCuteReIcon } from "@/src/icons/safe_alert_cute_re"
|
||||
import { SafetyCertificateCuteReIcon } from "@/src/icons/safety_certificate_cute_re"
|
||||
import { User3CuteReIcon } from "@/src/icons/user_3_cute_re"
|
||||
import { useCanDismiss, useNavigation } from "@/src/lib/navigation/hooks"
|
||||
import { useSetModalScreenOptions } from "@/src/lib/navigation/ScreenOptionsContext"
|
||||
import { FeedSummary } from "@/src/modules/discover/FeedSummary"
|
||||
@@ -37,9 +41,9 @@ const formSchema = z.object({
|
||||
export function FollowFeed(props: { id: string }) {
|
||||
const { id } = props
|
||||
const feed = useFeed(id as string)
|
||||
const { isLoading } = usePrefetchFeed(id as string, { enabled: !feed })
|
||||
usePrefetchFeed(id as string)
|
||||
|
||||
if (isLoading) {
|
||||
if (!feed) {
|
||||
return (
|
||||
<View className="mt-24 flex-1 flex-row items-start justify-center">
|
||||
<PlatformActivityIndicator />
|
||||
@@ -172,7 +176,35 @@ function FollowImpl(props: { feedId: string }) {
|
||||
type: "feed",
|
||||
},
|
||||
}}
|
||||
/>
|
||||
>
|
||||
<View className="ml-11 mt-2 flex-row items-center gap-3 opacity-60">
|
||||
{!!feed.subscriptionCount && (
|
||||
<View className="flex-row items-center gap-1">
|
||||
<User3CuteReIcon width={12} height={12} />
|
||||
<Text className="text-text text-sm">
|
||||
{feed.subscriptionCount}{" "}
|
||||
{tCommon("feed.follower", { count: feed.subscriptionCount })}
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
{feed.updatesPerWeek ? (
|
||||
<View className="flex-row items-center gap-1">
|
||||
<SafetyCertificateCuteReIcon width={12} height={12} />
|
||||
<Text className="text-text text-sm">
|
||||
{tCommon("feed.entry_week", { count: feed.updatesPerWeek })}
|
||||
</Text>
|
||||
</View>
|
||||
) : feed.latestEntryPublishedAt ? (
|
||||
<View className="flex-row items-center gap-1">
|
||||
<SafeAlertCuteReIcon width={12} height={12} />
|
||||
<Text className="text-text text-sm">
|
||||
{tCommon("feed.updated_at")}
|
||||
<RelativeDateTime date={feed.latestEntryPublishedAt} />
|
||||
</Text>
|
||||
</View>
|
||||
) : null}
|
||||
</View>
|
||||
</FeedSummary>
|
||||
</GroupedInsetListCard>
|
||||
{/* Group 2 */}
|
||||
<GroupedInsetListCard className="gap-y-4 p-4">
|
||||
|
||||
@@ -189,14 +189,9 @@
|
||||
"entry_list_header.unread": "unread",
|
||||
"feed.actions.follow": "Follow",
|
||||
"feed.actions.followed": "Followed",
|
||||
"feed.entry_week_one": "{{count}} entry/week",
|
||||
"feed.entry_week_other": "{{count}} entries/week",
|
||||
"feed.follower_one": "follower",
|
||||
"feed.follower_other": "followers",
|
||||
"feed.followsAndFeeds": "{{subscriptionCount}} {{subscriptionNoun}} and {{feedsCount}} {{feedsNoun}} on {{appName}}",
|
||||
"feed.read_one": "read",
|
||||
"feed.read_other": "reads",
|
||||
"feed.updated_at": "Updated",
|
||||
"feed_claim_modal.choose_verification_method": "There are three ways to choose from, you can choose one of them to verify.",
|
||||
"feed_claim_modal.claim_button": "Claim",
|
||||
"feed_claim_modal.content_instructions": "Copy the content below and post it to your latest RSS feed.",
|
||||
|
||||
@@ -160,8 +160,6 @@
|
||||
"entry_list_header.switch_to_widemode": "ワイドモードに切り替え",
|
||||
"entry_list_header.unread": "未読",
|
||||
"feed.actions.followed": "フォロー済み",
|
||||
"feed.follower_one": "フォロワー",
|
||||
"feed.follower_other": "フォロワー",
|
||||
"feed.followsAndFeeds": "{{subscriptionCount}} {{subscriptionNoun}} と {{feedsCount}} {{feedsNoun}} on {{appName}}",
|
||||
"feed.read_one": "読む",
|
||||
"feed.read_other": "読む",
|
||||
|
||||
@@ -188,14 +188,9 @@
|
||||
"entry_list_header.unread": "未读",
|
||||
"feed.actions.follow": "订阅",
|
||||
"feed.actions.followed": "已订阅",
|
||||
"feed.entry_week_one": "{{count}} 条目/周",
|
||||
"feed.entry_week_other": "{{count}} 条目/周",
|
||||
"feed.follower_one": "订阅者",
|
||||
"feed.follower_other": "订阅者",
|
||||
"feed.followsAndFeeds": "在 {{appName}} 上有 {{subscriptionCount}} 个{{subscriptionNoun}}和 {{feedsCount}} 个{{feedsNoun}}",
|
||||
"feed.read_one": "阅读",
|
||||
"feed.read_other": "阅读",
|
||||
"feed.updated_at": "更新于",
|
||||
"feed_claim_modal.choose_verification_method": "有三种认证方式,可任选其中一种进行认证。",
|
||||
"feed_claim_modal.claim_button": "认证",
|
||||
"feed_claim_modal.content_instructions": "复制以下内容,发布到需要认证的订阅源。",
|
||||
|
||||
@@ -186,14 +186,9 @@
|
||||
"entry_list_header.unread": "未讀",
|
||||
"feed.actions.follow": "跟隨",
|
||||
"feed.actions.followed": "已跟隨",
|
||||
"feed.entry_week_one": "{{count}} 條目/週",
|
||||
"feed.entry_week_other": "{{count}} 條目/週",
|
||||
"feed.follower_one": "跟隨者",
|
||||
"feed.follower_other": "跟隨者",
|
||||
"feed.followsAndFeeds": "在 {{appName}} 上有 {{subscriptionCount}} 個 {{subscriptionNoun}} 和 {{feedsCount}} 個 {{feedsNoun}}",
|
||||
"feed.read_one": "閱讀",
|
||||
"feed.read_other": "閱讀",
|
||||
"feed.updated_at": "已更新",
|
||||
"feed_claim_modal.choose_verification_method": "有三種驗證方式,您可以選擇其中一種進行驗證。",
|
||||
"feed_claim_modal.claim_button": "認領",
|
||||
"feed_claim_modal.content_instructions": "複製以下內容,發佈到需要驗證的 RSS 摘要。",
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
"discover.category.traditional-media": "News",
|
||||
"discover.category.travel": "Travel",
|
||||
"discover.category.university": "University",
|
||||
"feed.entry_week_one": "{{count}} entry/week",
|
||||
"feed.entry_week_other": "{{count}} entries/week",
|
||||
"feed.follower_one": "follower",
|
||||
"feed.follower_other": "followers",
|
||||
"feed.updated_at": "Updated",
|
||||
"feed_view_type.articles": "Articles",
|
||||
"feed_view_type.audios": "Audios",
|
||||
"feed_view_type.notifications": "Notifications",
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
"discover.category.traditional-media": "ニュース",
|
||||
"discover.category.travel": "旅行",
|
||||
"discover.category.university": "大学",
|
||||
"feed.follower_one": "フォロワー",
|
||||
"feed.follower_other": "フォロワー",
|
||||
"feed_view_type.articles": "記事",
|
||||
"feed_view_type.audios": "オーディオ",
|
||||
"feed_view_type.notifications": "通知",
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
"discover.category.traditional-media": "传统媒体",
|
||||
"discover.category.travel": "出行旅游",
|
||||
"discover.category.university": "大学通知",
|
||||
"feed.entry_week_one": "{{count}} 条目/周",
|
||||
"feed.entry_week_other": "{{count}} 条目/周",
|
||||
"feed.follower_one": "订阅者",
|
||||
"feed.follower_other": "订阅者",
|
||||
"feed.updated_at": "更新于",
|
||||
"feed_view_type.articles": "文章",
|
||||
"feed_view_type.audios": "音频",
|
||||
"feed_view_type.notifications": "通知",
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
"discover.category.traditional-media": "傳統媒體",
|
||||
"discover.category.travel": "出行旅遊",
|
||||
"discover.category.university": "大學資訊",
|
||||
"feed.entry_week_one": "{{count}} 條目/週",
|
||||
"feed.entry_week_other": "{{count}} 條目/週",
|
||||
"feed.follower_one": "跟隨者",
|
||||
"feed.follower_other": "跟隨者",
|
||||
"feed.updated_at": "已更新",
|
||||
"feed_view_type.articles": "文章",
|
||||
"feed_view_type.audios": "音訊",
|
||||
"feed_view_type.notifications": "通知",
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE `feeds` ADD `subscription_count` integer;--> statement-breakpoint
|
||||
ALTER TABLE `feeds` ADD `updates_per_week` integer;--> statement-breakpoint
|
||||
ALTER TABLE `feeds` ADD `latest_entry_published_at` text;
|
||||
@@ -0,0 +1,743 @@
|
||||
{
|
||||
"version": "6",
|
||||
"dialect": "sqlite",
|
||||
"id": "61f98b38-f03a-4f57-beb4-8c219ac1331c",
|
||||
"prevId": "52d21c45-d498-48b7-8c8c-3775d72d16a4",
|
||||
"tables": {
|
||||
"collections": {
|
||||
"name": "collections",
|
||||
"columns": {
|
||||
"feed_id": {
|
||||
"name": "feed_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"entry_id": {
|
||||
"name": "entry_id",
|
||||
"type": "text",
|
||||
"primaryKey": true,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"view": {
|
||||
"name": "view",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
"foreignKeys": {},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"entries": {
|
||||
"name": "entries",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "text",
|
||||
"primaryKey": true,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"title": {
|
||||
"name": "title",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"url": {
|
||||
"name": "url",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"content": {
|
||||
"name": "content",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"source_content": {
|
||||
"name": "source_content",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"guid": {
|
||||
"name": "guid",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"author": {
|
||||
"name": "author",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"author_url": {
|
||||
"name": "author_url",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"author_avatar": {
|
||||
"name": "author_avatar",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"inserted_at": {
|
||||
"name": "inserted_at",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"published_at": {
|
||||
"name": "published_at",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"media": {
|
||||
"name": "media",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"categories": {
|
||||
"name": "categories",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"attachments": {
|
||||
"name": "attachments",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"extra": {
|
||||
"name": "extra",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"language": {
|
||||
"name": "language",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"feed_id": {
|
||||
"name": "feed_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"inbox_handle": {
|
||||
"name": "inbox_handle",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"read": {
|
||||
"name": "read",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"sources": {
|
||||
"name": "sources",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"settings": {
|
||||
"name": "settings",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
"foreignKeys": {},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"feeds": {
|
||||
"name": "feeds",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "text",
|
||||
"primaryKey": true,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"title": {
|
||||
"name": "title",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"url": {
|
||||
"name": "url",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"image": {
|
||||
"name": "image",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"error_at": {
|
||||
"name": "error_at",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"site_url": {
|
||||
"name": "site_url",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"owner_user_id": {
|
||||
"name": "owner_user_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"error_message": {
|
||||
"name": "error_message",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"subscription_count": {
|
||||
"name": "subscription_count",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"updates_per_week": {
|
||||
"name": "updates_per_week",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"latest_entry_published_at": {
|
||||
"name": "latest_entry_published_at",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
"foreignKeys": {},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"images": {
|
||||
"name": "images",
|
||||
"columns": {
|
||||
"url": {
|
||||
"name": "url",
|
||||
"type": "text",
|
||||
"primaryKey": true,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"colors": {
|
||||
"name": "colors",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false,
|
||||
"default": "(CURRENT_TIMESTAMP)"
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
"foreignKeys": {},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"inboxes": {
|
||||
"name": "inboxes",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "text",
|
||||
"primaryKey": true,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"title": {
|
||||
"name": "title",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
"foreignKeys": {},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"lists": {
|
||||
"name": "lists",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "text",
|
||||
"primaryKey": true,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"user_id": {
|
||||
"name": "user_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"title": {
|
||||
"name": "title",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"feed_ids": {
|
||||
"name": "feed_ids",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"view": {
|
||||
"name": "view",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"image": {
|
||||
"name": "image",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"fee": {
|
||||
"name": "fee",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"owner_user_id": {
|
||||
"name": "owner_user_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"subscription_count": {
|
||||
"name": "subscription_count",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"purchase_amount": {
|
||||
"name": "purchase_amount",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
"foreignKeys": {},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"subscriptions": {
|
||||
"name": "subscriptions",
|
||||
"columns": {
|
||||
"feed_id": {
|
||||
"name": "feed_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"list_id": {
|
||||
"name": "list_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"inbox_id": {
|
||||
"name": "inbox_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"user_id": {
|
||||
"name": "user_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"view": {
|
||||
"name": "view",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"is_private": {
|
||||
"name": "is_private",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"title": {
|
||||
"name": "title",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"category": {
|
||||
"name": "category",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"type": {
|
||||
"name": "type",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "text",
|
||||
"primaryKey": true,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
"foreignKeys": {},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"summaries": {
|
||||
"name": "summaries",
|
||||
"columns": {
|
||||
"entry_id": {
|
||||
"name": "entry_id",
|
||||
"type": "text",
|
||||
"primaryKey": true,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"summary": {
|
||||
"name": "summary",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"readability_summary": {
|
||||
"name": "readability_summary",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"language": {
|
||||
"name": "language",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"unq": {
|
||||
"name": "unq",
|
||||
"columns": ["entry_id", "language"],
|
||||
"isUnique": true
|
||||
}
|
||||
},
|
||||
"foreignKeys": {},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"translations": {
|
||||
"name": "translations",
|
||||
"columns": {
|
||||
"entry_id": {
|
||||
"name": "entry_id",
|
||||
"type": "text",
|
||||
"primaryKey": true,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"language": {
|
||||
"name": "language",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"title": {
|
||||
"name": "title",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"content": {
|
||||
"name": "content",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"readability_content": {
|
||||
"name": "readability_content",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"translation-unique-index": {
|
||||
"name": "translation-unique-index",
|
||||
"columns": ["entry_id", "language"],
|
||||
"isUnique": true
|
||||
}
|
||||
},
|
||||
"foreignKeys": {},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"unread": {
|
||||
"name": "unread",
|
||||
"columns": {
|
||||
"subscription_id": {
|
||||
"name": "subscription_id",
|
||||
"type": "text",
|
||||
"primaryKey": true,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"count": {
|
||||
"name": "count",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
"foreignKeys": {},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"users": {
|
||||
"name": "users",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "text",
|
||||
"primaryKey": true,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"email": {
|
||||
"name": "email",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"handle": {
|
||||
"name": "handle",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"name": {
|
||||
"name": "name",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"image": {
|
||||
"name": "image",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"is_me": {
|
||||
"name": "is_me",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"email_verified": {
|
||||
"name": "email_verified",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
"foreignKeys": {},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
}
|
||||
},
|
||||
"views": {},
|
||||
"enums": {},
|
||||
"_meta": {
|
||||
"schemas": {},
|
||||
"tables": {},
|
||||
"columns": {}
|
||||
},
|
||||
"internal": {
|
||||
"indexes": {}
|
||||
}
|
||||
}
|
||||
@@ -162,6 +162,13 @@
|
||||
"when": 1748331571730,
|
||||
"tag": "0022_tiny_northstar",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 23,
|
||||
"version": "6",
|
||||
"when": 1749121539199,
|
||||
"tag": "0023_pink_namor",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import m0019 from "./0019_wonderful_shape.sql"
|
||||
import m0020 from "./0020_little_marauders.sql"
|
||||
import m0021 from "./0021_wakeful_onslaught.sql"
|
||||
import m0022 from "./0022_tiny_northstar.sql"
|
||||
import m0023 from "./0023_pink_namor.sql"
|
||||
import journal from "./meta/_journal.json"
|
||||
|
||||
export default {
|
||||
@@ -51,5 +52,6 @@ export default {
|
||||
m0020,
|
||||
m0021,
|
||||
m0022,
|
||||
m0023,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -16,6 +16,9 @@ export const feedsTable = sqliteTable("feeds", {
|
||||
siteUrl: text("site_url"),
|
||||
ownerUserId: text("owner_user_id"),
|
||||
errorMessage: text("error_message"),
|
||||
subscriptionCount: integer("subscription_count"),
|
||||
updatesPerWeek: integer("updates_per_week"),
|
||||
latestEntryPublishedAt: text("latest_entry_published_at"),
|
||||
})
|
||||
|
||||
export const subscriptionsTable = sqliteTable("subscriptions", {
|
||||
|
||||
@@ -76,7 +76,12 @@ class FeedSyncServices {
|
||||
|
||||
const nonce = Math.random().toString(36).slice(2, 15)
|
||||
|
||||
const finalData = res.data.feed as FeedModel
|
||||
const finalData = {
|
||||
...res.data.feed,
|
||||
updatesPerWeek: res.data.analytics?.updatesPerWeek,
|
||||
subscriptionCount: res.data.analytics?.subscriptionCount,
|
||||
latestEntryPublishedAt: res.data.analytics?.latestEntryPublishedAt,
|
||||
} as FeedModel
|
||||
if (!finalData.id) {
|
||||
finalData["nonce"] = nonce
|
||||
}
|
||||
@@ -94,7 +99,12 @@ class FeedSyncServices {
|
||||
|
||||
const nonce = Math.random().toString(36).slice(2, 15)
|
||||
|
||||
const finalData = res.data.feed as FeedModel
|
||||
const finalData = {
|
||||
...res.data.feed,
|
||||
updatesPerWeek: res.data.analytics?.updatesPerWeek,
|
||||
subscriptionCount: res.data.analytics?.subscriptionCount,
|
||||
latestEntryPublishedAt: res.data.analytics?.latestEntryPublishedAt,
|
||||
} as FeedModel
|
||||
if (!finalData.id) {
|
||||
finalData["nonce"] = nonce
|
||||
finalData["id"] = nonce
|
||||
|
||||
Reference in New Issue
Block a user