-
Notifications
You must be signed in to change notification settings - Fork 669
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add discover feed form from rsshub (#89)
* feat: regexp path parser Signed-off-by: Innei <i@innei.in> * feat: markdown Signed-off-by: Innei <i@innei.in> * fix: shirk Signed-off-by: Innei <i@innei.in> * feat: discover form Signed-off-by: Innei <i@innei.in> * fix: modal overlay zindex Signed-off-by: Innei <i@innei.in> * feat: fill path Signed-off-by: Innei <i@innei.in> * feat: modal Signed-off-by: Innei <i@innei.in> * fix: card style Signed-off-by: Innei <i@innei.in> * fix: parser Signed-off-by: Innei <i@innei.in> * feat: add maintainers Signed-off-by: Innei <i@innei.in> * fix: select zindex Signed-off-by: Innei <i@innei.in> * fix: dismiss all Signed-off-by: Innei <i@innei.in> * feat: optimize a11y Signed-off-by: Innei <i@innei.in> * fix: dark mode style Signed-off-by: Innei <i@innei.in> --------- Signed-off-by: Innei <i@innei.in>
- Loading branch information
Showing
38 changed files
with
2,483 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,5 @@ jobs: | |
run: | | ||
pnpm run typecheck | ||
npm run lint | ||
pnpm run test | ||
- name: Run test | ||
run: pnpm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { createAtomHooks } from "@renderer/lib/jotai" | ||
import { atom } from "jotai" | ||
|
||
export const [ | ||
, | ||
useSidebarActiveView, | ||
useSidebarActiveViewValue, | ||
useSetSidebarActiveView, | ||
getSidebarActiveView, | ||
setSidebarActiveView, | ||
] = createAtomHooks(atom(0)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* eslint-disable @eslint-react/dom/no-dangerously-set-innerhtml */ | ||
import { cn } from "@renderer/lib/utils" | ||
import markdownit from "markdown-it" | ||
import { useMemo } from "react" | ||
|
||
import styles from "./index.module.css" | ||
import { createContainer } from "./plugins/container" | ||
|
||
const md = markdownit() | ||
.use(...createContainer("tip", "TIP", () => md)) | ||
.use(...createContainer("info", "INFO", () => md)) | ||
.use(...createContainer("warning", "WARNING", () => md)) | ||
.use(...createContainer("danger", "DANGER", () => md)) | ||
.use(...createContainer("details", "Details", () => md)) | ||
|
||
export const Markdown: Component<{ | ||
children: string | ||
}> = (props) => ( | ||
<div | ||
className={cn(styles.markdown, props.className, "prose dark:prose-invert prose-th:text-left")} | ||
dangerouslySetInnerHTML={useMemo( | ||
() => ({ | ||
__html: md.render(props.children as string), | ||
}), | ||
[props.children], | ||
)} | ||
/> | ||
) |
Oops, something went wrong.