Merge branch 'main' of https://github.com/RSSNext/follow
This commit is contained in:
+6
-88
@@ -3139,15 +3139,6 @@ declare const _routes: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
||||
status: 200;
|
||||
};
|
||||
};
|
||||
} & {
|
||||
[x: `/import/${string}`]: {
|
||||
[x: `$${Lowercase<string>}`]: {
|
||||
input: Partial<hono.ValidationTargets>;
|
||||
output: any;
|
||||
outputFormat: string;
|
||||
status: hono_utils_http_status.StatusCode;
|
||||
};
|
||||
};
|
||||
} & {
|
||||
[x: `/entries/read-histories/${string}`]: {
|
||||
[x: `$${Lowercase<string>}`]: {
|
||||
@@ -3361,85 +3352,12 @@ declare const _routes: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
||||
};
|
||||
};
|
||||
} & {
|
||||
"/subscriptions": {
|
||||
$get: {
|
||||
input: {
|
||||
query: {
|
||||
view?: string | undefined;
|
||||
userId?: string | undefined;
|
||||
};
|
||||
};
|
||||
output: {
|
||||
data: {
|
||||
title: string | null;
|
||||
view: number;
|
||||
userId: string;
|
||||
feeds: {
|
||||
description: string | null;
|
||||
title: string | null;
|
||||
id: string;
|
||||
image: string | null;
|
||||
url: string;
|
||||
siteUrl: string | null;
|
||||
checkedAt: string;
|
||||
lastModifiedHeader: string | null;
|
||||
etagHeader: string | null;
|
||||
ttl: number | null;
|
||||
errorMessage: string | null;
|
||||
errorAt: string | null;
|
||||
ownerUserId: string | null;
|
||||
};
|
||||
feedId: string;
|
||||
category: string | null;
|
||||
isPrivate: boolean;
|
||||
}[];
|
||||
code: 0;
|
||||
};
|
||||
outputFormat: "json";
|
||||
status: 200;
|
||||
};
|
||||
$post: {
|
||||
input: {
|
||||
json: {
|
||||
view: number;
|
||||
url: string;
|
||||
category?: string | null | undefined;
|
||||
isPrivate?: boolean | undefined;
|
||||
};
|
||||
};
|
||||
output: {
|
||||
code: 0;
|
||||
};
|
||||
outputFormat: "json";
|
||||
status: 200;
|
||||
};
|
||||
$delete: {
|
||||
input: {
|
||||
json: {
|
||||
url?: string | undefined;
|
||||
feedId?: string | undefined;
|
||||
};
|
||||
};
|
||||
output: {
|
||||
code: 0;
|
||||
};
|
||||
outputFormat: "json";
|
||||
status: 200;
|
||||
};
|
||||
$patch: {
|
||||
input: {
|
||||
json: {
|
||||
view: number;
|
||||
feedId: string;
|
||||
category?: string | null | undefined;
|
||||
isPrivate?: boolean | undefined;
|
||||
};
|
||||
};
|
||||
output: {
|
||||
code: 0;
|
||||
};
|
||||
outputFormat: "json";
|
||||
status: 200;
|
||||
[x: `/subscriptions/${string}`]: {
|
||||
[x: `$${Lowercase<string>}`]: {
|
||||
input: Partial<hono.ValidationTargets>;
|
||||
output: any;
|
||||
outputFormat: string;
|
||||
status: hono_utils_http_status.StatusCode;
|
||||
};
|
||||
};
|
||||
}, "/">;
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ export function createWindow(
|
||||
{ role: "selectAll", accelerator: "CmdOrCtrl+A" },
|
||||
])
|
||||
|
||||
window.webContents.on("context-menu", (e, props) => {
|
||||
window.webContents.on("context-menu", (_e, props) => {
|
||||
const { selectionText, isEditable } = props
|
||||
if (isEditable) {
|
||||
inputMenu.popup({
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import pkg, { repository } from "@pkg"
|
||||
import pkg from "@pkg"
|
||||
import { attachOpenInEditor } from "@renderer/lib/dev"
|
||||
import { getNewIssueUrl } from "@renderer/lib/issues"
|
||||
import { clearLocalPersistStoreData } from "@renderer/store/utils/clear"
|
||||
import { useEffect, useRef } from "react"
|
||||
import { isRouteErrorResponse, useRouteError } from "react-router-dom"
|
||||
@@ -63,8 +64,8 @@ export function ErrorElement() {
|
||||
<p className="my-8">
|
||||
{APP_NAME}
|
||||
{" "}
|
||||
has a temporary problem, click the button below to try reloading
|
||||
the app or another solution?
|
||||
has a temporary problem, click the button below to try
|
||||
reloading the app or another solution?
|
||||
</p>
|
||||
|
||||
<div className="center gap-4">
|
||||
@@ -86,11 +87,11 @@ export function ErrorElement() {
|
||||
Still having this issue? Please give feedback in Github, thanks!
|
||||
<a
|
||||
className="ml-2 cursor-pointer text-theme-accent-500 duration-200 hover:text-theme-accent"
|
||||
href={`${repository.url}/issues/new?title=${encodeURIComponent(
|
||||
`Error: ${message}`,
|
||||
)}&body=${encodeURIComponent(
|
||||
`### Error\n\n${message}\n\n### Stack\n\n\`\`\`\n${stack}\n\`\`\``,
|
||||
)}&label=bug`}
|
||||
href={getNewIssueUrl({
|
||||
title: `Error: ${message}`,
|
||||
body: `### Error\n\n${message}\n\n### Stack\n\n\`\`\`\n${stack}\n\`\`\``,
|
||||
label: "bug",
|
||||
})}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { repository } from "@pkg"
|
||||
import { attachOpenInEditor } from "@renderer/lib/dev"
|
||||
import { getNewIssueUrl } from "@renderer/lib/issues"
|
||||
import type { FallbackRender } from "@sentry/react"
|
||||
import type { FC } from "react"
|
||||
|
||||
@@ -53,11 +53,11 @@ export const ModalErrorFallback: FC<Parameters<FallbackRender>[0]> = (
|
||||
Still having this issue? Please give feedback in Github, thanks!
|
||||
<a
|
||||
className="ml-2 cursor-pointer text-theme-accent-500 duration-200 hover:text-theme-accent"
|
||||
href={`${repository.url}/issues/new?title=${encodeURIComponent(
|
||||
`Error: ${message}`,
|
||||
)}&body=${encodeURIComponent(
|
||||
`### Error\n\n${message}\n\n### Stack\n\n\`\`\`\n${stack}\n\`\`\``,
|
||||
)}&label=bug`}
|
||||
href={getNewIssueUrl({
|
||||
title: `Error: ${message}`,
|
||||
body: `### Error\n\n${message}\n\n### Stack\n\n\`\`\`\n${stack}\n\`\`\``,
|
||||
label: "bug",
|
||||
})}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import { repository } from "@pkg"
|
||||
|
||||
interface IssueOptions {
|
||||
title: string
|
||||
body: string
|
||||
label: string
|
||||
}
|
||||
export const getNewIssueUrl = ({
|
||||
body,
|
||||
label,
|
||||
title,
|
||||
}: Partial<IssueOptions> = {}) => {
|
||||
const baseUrl = `${repository.url}/issues/new`
|
||||
|
||||
const searchParams = new URLSearchParams()
|
||||
if (body) searchParams.set("body", (body))
|
||||
if (label) searchParams.set("label", label)
|
||||
if (title) searchParams.set("title", (title))
|
||||
|
||||
return `${baseUrl}?${searchParams.toString()}`
|
||||
}
|
||||
@@ -67,7 +67,7 @@ export function DiscoverImport() {
|
||||
conflictItems: FeedResponseList
|
||||
parsedErrorItems: FeedResponseList
|
||||
}
|
||||
}>("/import", {
|
||||
}>("/subscriptions/import", {
|
||||
method: "POST",
|
||||
body: formData,
|
||||
})
|
||||
|
||||
@@ -11,6 +11,7 @@ import { useFeedActions } from "@renderer/hooks/biz/useFeedActions"
|
||||
import { useNavigateEntry } from "@renderer/hooks/biz/useNavigateEntry"
|
||||
import { useRouteParamsSelector } from "@renderer/hooks/biz/useRouteParams"
|
||||
import { nextFrame } from "@renderer/lib/dom"
|
||||
import { getNewIssueUrl } from "@renderer/lib/issues"
|
||||
import { showNativeMenu } from "@renderer/lib/native-menu"
|
||||
import { cn } from "@renderer/lib/utils"
|
||||
import { useFeedById } from "@renderer/store/feed"
|
||||
@@ -74,7 +75,36 @@ const FeedItemImpl = ({
|
||||
window.open(`${WEB_URL}/feed/${feedId}?view=${view}`, "_blank")
|
||||
}}
|
||||
onContextMenu={(e) => {
|
||||
showNativeMenu(items, e)
|
||||
const nextItems = items.concat()
|
||||
if (feed.errorAt && feed.errorMessage) {
|
||||
nextItems.push(
|
||||
{
|
||||
type: "separator",
|
||||
disabled: false,
|
||||
},
|
||||
{
|
||||
label: "Feedback",
|
||||
type: "text",
|
||||
click: () => {
|
||||
window.open(
|
||||
getNewIssueUrl({
|
||||
body:
|
||||
`### Error\n\nError Message: ${feed.errorMessage}\n\n### Info\n\n` +
|
||||
`\`\`\`json\n${
|
||||
JSON.stringify(feed, null, 2)
|
||||
}\n\`\`\``,
|
||||
label: "bug",
|
||||
title: `Feed Error: ${feed.title}, ${feed.errorMessage}`,
|
||||
}),
|
||||
)
|
||||
},
|
||||
},
|
||||
)
|
||||
}
|
||||
showNativeMenu(
|
||||
nextItems,
|
||||
e,
|
||||
)
|
||||
}}
|
||||
>
|
||||
<div
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Logo } from "@renderer/components/icons/logo"
|
||||
import { Button, StyledButton } from "@renderer/components/ui/button"
|
||||
import { Divider } from "@renderer/components/ui/divider"
|
||||
import { SocialMediaLinks } from "@renderer/constants/social"
|
||||
import { getNewIssueUrl } from "@renderer/lib/issues"
|
||||
|
||||
export const SettingAbout = () => (
|
||||
<div>
|
||||
@@ -46,7 +47,9 @@ export const SettingAbout = () => (
|
||||
</p>
|
||||
<p className="mt-3 text-balance text-sm">
|
||||
The icon library used by Follow is mgc which is copyrighted by
|
||||
<a href="https://mgc.mingcute.com/" target="_blank" rel="noreferrer">https://mgc.mingcute.com/</a>
|
||||
<a href="https://mgc.mingcute.com/" target="_blank" rel="noreferrer">
|
||||
https://mgc.mingcute.com/
|
||||
</a>
|
||||
{" "}
|
||||
and cannot be redistributed.
|
||||
</p>
|
||||
@@ -62,7 +65,7 @@ export const SettingAbout = () => (
|
||||
{" "}
|
||||
<a
|
||||
className="inline-flex cursor-pointer items-center gap-1 hover:underline"
|
||||
href={`${repository.url}/issues/new`}
|
||||
href={getNewIssueUrl()}
|
||||
target="_blank"
|
||||
>
|
||||
open an issue
|
||||
|
||||
Reference in New Issue
Block a user