13 | You have come to a desert of knowledge where there is nothing. 14 |
15 |
16 | Current path: {location.pathname}
17 |
20 | 21 |
22 |├── .github └── workflows │ └── build.yml ├── .gitignore ├── .million └── store.json ├── .prettierrc.mjs ├── .vscode └── settings.json ├── debug_proxy.html ├── eslint.config.mjs ├── index.html ├── package.json ├── patches └── @tanstack__react-virtual@3.10.9.patch ├── plugins ├── css-plugin.js └── eslint-recursive-sort.js ├── pnpm-lock.yaml ├── postcss.config.cjs ├── readme.md ├── renovate.json ├── setup-file.ts ├── src ├── App.tsx ├── assets │ └── fonts │ │ └── GeistVF.woff2 ├── atoms │ ├── app.ts │ ├── context-menu.ts │ ├── dom.ts │ ├── helper │ │ └── setting.ts │ ├── route.ts │ ├── settings │ │ ├── general.ts │ │ └── ui.ts │ ├── sidebar.ts │ └── user.ts ├── components │ ├── common │ │ ├── ErrorElement.tsx │ │ ├── LoadRemixAsyncComponent.tsx │ │ ├── NotFound.tsx │ │ └── ProviderComposer.tsx │ ├── layout │ │ └── sidebar │ │ │ ├── atoms.ts │ │ │ └── index.tsx │ └── ui │ │ ├── avatar │ │ └── index.tsx │ │ ├── button │ │ ├── Button.tsx │ │ ├── MotionButton.tsx │ │ └── index.ts │ │ ├── context-menu │ │ ├── context-menu.tsx │ │ └── index.ts │ │ ├── datetime │ │ └── index.tsx │ │ ├── divider │ │ ├── Divider.tsx │ │ ├── PanelSpliter.tsx │ │ └── index.ts │ │ ├── dropdown-menu │ │ └── DropdownMenu.tsx │ │ ├── icons │ │ └── ActivityType.tsx │ │ ├── input │ │ ├── Input.tsx │ │ ├── TextArea.tsx │ │ └── index.ts │ │ ├── kbd │ │ └── Kbd.tsx │ │ ├── loading.tsx │ │ ├── markdown │ │ └── index.tsx │ │ ├── portal │ │ ├── index.tsx │ │ └── provider.tsx │ │ ├── scroll-area │ │ ├── ScrollArea.tsx │ │ ├── ctx.ts │ │ ├── hooks.ts │ │ ├── index.module.css │ │ └── index.ts │ │ ├── tabs │ │ └── index.tsx │ │ ├── toast │ │ └── index.tsx │ │ └── tooltip │ │ ├── index.tsx │ │ └── styles.ts ├── database │ ├── constants.ts │ ├── db.ts │ ├── db_schema.ts │ ├── global.d.ts │ ├── index.ts │ ├── schemas │ │ ├── base.ts │ │ └── index.ts │ └── services │ │ ├── base.ts │ │ ├── issue.ts │ │ ├── meta.ts │ │ ├── notification.ts │ │ ├── pull-request.ts │ │ ├── repo-pin.ts │ │ ├── repo.ts │ │ └── user.ts ├── framer-lazy-feature.ts ├── global.d.ts ├── hooks │ ├── biz │ │ └── useRouter.ts │ └── common │ │ ├── index.ts │ │ ├── useDark.ts │ │ ├── useInputComposition.ts │ │ ├── useIsOnline.ts │ │ ├── useMeasure.ts │ │ ├── usePrevious.ts │ │ ├── useRefValue.ts │ │ ├── useTitle.ts │ │ └── useTypescriptHappyCallback.ts ├── initialize │ ├── hydrate.ts │ ├── index.ts │ └── jobs │ │ ├── index.ts │ │ └── polling.ts ├── lib │ ├── cn.ts │ ├── dev.tsx │ ├── dom.ts │ ├── gh.ts │ ├── i18n.ts │ ├── jotai.ts │ ├── log.ts │ ├── ns.ts │ ├── octokit.ts │ ├── parser.ts │ ├── query-client.ts │ ├── route-builder.ts │ └── utils.ts ├── main.tsx ├── modules │ └── notification │ │ ├── IssueDetail.tsx │ │ ├── NotificationItem.tsx │ │ ├── PullRequestDetail.tsx │ │ ├── atom.ts │ │ ├── list.tsx │ │ └── peek.tsx ├── pages │ └── (main) │ │ ├── index.tsx │ │ ├── layout.tsx │ │ └── notifications │ │ ├── (type) │ │ ├── [repo].tsx │ │ └── all.tsx │ │ └── layout.tsx ├── providers │ ├── context-menu-provider.tsx │ ├── root-providers.tsx │ ├── setting-sync.tsx │ └── stable-router-provider.tsx ├── router.tsx ├── scan.ts ├── store │ ├── issue │ │ ├── hooks.ts │ │ └── store.ts │ ├── notification │ │ ├── helper.ts │ │ ├── hooks.ts │ │ ├── selectors.ts │ │ └── store.ts │ ├── pull-request │ │ ├── hooks.ts │ │ └── store.ts │ ├── repo-pin │ │ ├── getters.ts │ │ ├── hooks.ts │ │ └── store.ts │ ├── repo │ │ ├── getters.ts │ │ ├── hooks.ts │ │ ├── selectors.ts │ │ └── store.ts │ └── utils │ │ ├── helper.test.ts │ │ ├── helper.ts │ │ └── queue.ts ├── styles │ ├── index.css │ ├── layer.css │ ├── tailwind.css │ └── theme.css └── vite-env.d.ts ├── tailwind.config.ts ├── todo.md ├── tsconfig.json ├── vercel.json ├── vite.config.ts └── vitest.config.ts /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Build 5 | 6 | on: 7 | push: 8 | branches: [main, master] 9 | pull_request: 10 | branches: [main, master] 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | 16 | strategy: 17 | matrix: 18 | node-version: [20.x] 19 | 20 | steps: 21 | - uses: actions/checkout@v4 22 | - name: Use Node.js ${{ matrix.node-version }} 23 | uses: actions/setup-node@v4 24 | with: 25 | node-version: ${{ matrix.node-version }} 26 | 27 | - name: Cache pnpm modules 28 | uses: actions/cache@v4 29 | env: 30 | cache-name: cache-pnpm-modules 31 | with: 32 | path: ~/.pnpm-store 33 | key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }} 34 | restore-keys: | 35 | ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}- 36 | 37 | - name: Setup pnpm 38 | uses: pnpm/action-setup@v4 39 | with: 40 | run_install: true 41 | - run: pnpm run build 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | dist 4 | dist-ssr 5 | *.local 6 | 7 | # Million Lint 8 | .million 9 | -------------------------------------------------------------------------------- /.prettierrc.mjs: -------------------------------------------------------------------------------- 1 | import { factory } from '@innei/prettier' 2 | 3 | export default factory({ 4 | importSort: false, 5 | }) 6 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true, 3 | "[javascript][javascriptreact][typescript][typescriptreact][json][jsonc]": { 4 | "editor.codeActionsOnSave": { 5 | "source.fixAll.eslint": "explicit" 6 | } 7 | }, 8 | // If you do not want to autofix some rules on save 9 | // You can put this in your user settings or workspace settings 10 | "eslint.codeActionsOnSave.rules": [ 11 | "!unused-imports/no-unused-imports", 12 | "*" 13 | ], 14 | 15 | // If you want to silent stylistic rules 16 | // You can put this in your user settings or workspace settings 17 | "eslint.rules.customizations": [ 18 | { "rule": "@stylistic/*", "severity": "off", "fixable": true }, 19 | { "rule": "antfu/consistent-list-newline", "severity": "off" }, 20 | { "rule": "hyoban/jsx-attribute-spacing", "severity": "off" }, 21 | { "rule": "simple-import-sort/*", "severity": "off" }, 22 | { "rule": "unused-imports/no-unused-imports", "severity": "off" } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /debug_proxy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |51 | The App has a temporary problem, click the button below to try reloading 52 | the app or another solution? 53 |
54 | 55 |60 | Still having this issue? Please give feedback in Github, thanks! 61 | 71 | Submit Issue 72 | 73 |
74 | 75 |13 | You have come to a desert of knowledge where there is nothing. 14 |
15 |
16 | Current path: {location.pathname}
17 |
20 | 21 |
22 |42 | {children} 43 |44 |
53 | {children}
54 |
55 | )
56 | const match = /language-(\w+)/.exec(className || '')
57 | const lang = match ? match[1] : ''
58 | const code = String(children).replace(/\n$/, '')
59 |
60 | return (
61 | = FC = {
5 | className?: string
6 | } & PropsWithChildren &
7 | P
8 | export type Nullable(
4 | value: S,
5 | ): Readonly<{
6 | current: Readonly
7 | }> => {
8 | const ref = useRef(value)
9 |
10 | useLayoutEffect(() => {
11 | ref.current = value
12 | })
13 | return ref
14 | }
15 |
--------------------------------------------------------------------------------
/src/hooks/common/useTitle.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useRef } from 'react'
2 |
3 | const titleTemplate = `%s | ${APP_NAME}`
4 | export const useTitle = (title?: Nullable{issue.title}
51 |
59 | {issue.user?.login}
60 | opened this issue
61 |
64 |
{pullRequest.title}
53 |
61 | {pullRequest.user?.login}
62 | opened this pull request
63 |
66 |
item.id}
69 | data={notifications}
70 | renderItem={Render}
71 | /> */}
72 |
= StateCreator>(
37 | name: string,
38 | ) =>
39 | (store: T) => {
40 | if (import.meta.env.DEV && window[`store_${name}`]) {
41 | import.meta.hot?.send(
42 | 'message',
43 | 'The store has been changed, reloading...',
44 | )
45 | globalThis.location.reload()
46 | }
47 |
48 | const newStore = createWithEqualityFn(store, shallow)
49 |
50 | storeMap[name] = newStore
51 |
52 | window.store =
53 | window.store ||
54 | new Proxy(
55 | {},
56 | {
57 | get(_, prop) {
58 | if (prop in storeMap) {
59 | return storeMap[prop as string].getState()
60 | }
61 | return
62 | },
63 | },
64 | )
65 |
66 | window[`store_${name}`] = newStore
67 |
68 | return newStore
69 | }
70 | type FunctionKeys = (snapshot: S, ctx: Ctx) => SyncOrAsync {
108 | private _snapshot: S
109 | private _ctx: Ctx
110 | private onRollback?: ExecutorFn
111 | private executorFn?: ExecutorFn
112 | private optimisticExecutor?: ExecutorFn
113 | private onPersist?: ExecutorFn
114 |
115 | constructor(snapshot?: S, ctx?: Ctx) {
116 | this._snapshot = snapshot || ({} as S)
117 | this._ctx = ctx || ({} as Ctx)
118 | }
119 |
120 | rollback(fn: ExecutorFn): this {
121 | this.onRollback = fn
122 | return this
123 | }
124 |
125 | execute(executor: ExecutorFn): this {
126 | this.executorFn = executor
127 | return this
128 | }
129 |
130 | optimistic(executor: ExecutorFn): this {
131 | this.optimisticExecutor = executor
132 | return this
133 | }
134 |
135 | persist(fn: ExecutorFn): this {
136 | this.onPersist = fn
137 | return this
138 | }
139 |
140 | async run(): Promise(
174 | snapshot?: S,
175 | ctx?: Ctx,
176 | ): Transaction => {
177 | return new Transaction(snapshot, ctx)
178 | }
179 |
180 | export const createSelectorHelper =