From 15c6290587521abd6ce4a6325fc13456d1b10f42 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sat, 13 Jul 2024 16:41:41 +0800 Subject: [PATCH] refactor: improve display in feed channel list --- src/client/routes/feed/$channelId/index.tsx | 1 + src/server/trpc/routers/feed/integration.ts | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client/routes/feed/$channelId/index.tsx b/src/client/routes/feed/$channelId/index.tsx index e666684..4b7b54d 100644 --- a/src/client/routes/feed/$channelId/index.tsx +++ b/src/client/routes/feed/$channelId/index.tsx @@ -38,6 +38,7 @@ function PageComponent() { channelId, }, { + refetchOnWindowFocus: false, getNextPageParam: (lastPage) => lastPage.nextCursor, } ); diff --git a/src/server/trpc/routers/feed/integration.ts b/src/server/trpc/routers/feed/integration.ts index b7c0837..1d1f87c 100644 --- a/src/server/trpc/routers/feed/integration.ts +++ b/src/server/trpc/routers/feed/integration.ts @@ -59,7 +59,7 @@ export const feedIntegrationRouter = router({ data: { channelId: channelId, eventName: eventType, - eventContent: `[${pusherName}](${pusherEmail}) push commit **${commits}** to [${ref}] in [${fullName}](${repoUrl})`, + eventContent: `[${pusherName}](mailto:${pusherEmail}) push commit **${commits}** to [${ref}] in [${fullName}](${repoUrl})`, tags: [], source: 'github', senderId, @@ -81,12 +81,13 @@ export const feedIntegrationRouter = router({ const repoUrl = _.get(data, 'repository.html_url'); const senderId = String(_.get(data, 'sender.id')); const senderName = String(_.get(data, 'sender.login')); + const senderUrl = String(_.get(data, 'sender.html_url')); const url = String(_.get(data, 'compare')); const event = await prisma.feedEvent.create({ data: { channelId: channelId, eventName: eventType, - eventContent: `${senderName} star repo [${fullName}](${repoUrl}), now is ${starCount}.`, + eventContent: `[${senderName}](${senderUrl}) star repo [${fullName}](${repoUrl}), now is ${starCount}.`, tags: [], source: 'github', senderId,