forked from RSSNext/Follow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* init Signed-off-by: Innei <i@innei.in> * feat: feed column Signed-off-by: Innei <i@innei.in> * feat: float bar Signed-off-by: Innei <tukon479@gmail.com> * feat: profile button Signed-off-by: Innei <tukon479@gmail.com> * chore: comment Signed-off-by: Innei <tukon479@gmail.com> * feat: layout Signed-off-by: Innei <tukon479@gmail.com> * feat: split mobile entry content Signed-off-by: Innei <tukon479@gmail.com> * feat: add history stack Signed-off-by: Innei <tukon479@gmail.com> * feat: return back Signed-off-by: Innei <tukon479@gmail.com> * fix: return back position Signed-off-by: Innei <tukon479@gmail.com> * feat: entry list header Signed-off-by: Innei <tukon479@gmail.com> * feat: sync selector Signed-off-by: Innei <tukon479@gmail.com> * feat: modal stack mobile Signed-off-by: Innei <tukon479@gmail.com> * fix: modal selector Signed-off-by: Innei <tukon479@gmail.com> * cleanup Signed-off-by: Innei <tukon479@gmail.com> * fix: sheet and optimize entry readers Signed-off-by: Innei <tukon479@gmail.com> * fix: scroller Signed-off-by: Innei <tukon479@gmail.com> * feat: entry contents Signed-off-by: Innei <tukon479@gmail.com> * feat: entry content Signed-off-by: Innei <tukon479@gmail.com> * update Signed-off-by: Innei <tukon479@gmail.com> * feat: user profile sheet Signed-off-by: Innei <tukon479@gmail.com> * fix: entry content header Signed-off-by: Innei <tukon479@gmail.com> * fix: entry header Signed-off-by: Innei <tukon479@gmail.com> * chore: auto-fix linting and formatting issues * fix: return back Signed-off-by: Innei <tukon479@gmail.com> * feat: image view Signed-off-by: Innei <tukon479@gmail.com> * feat: audio Signed-off-by: Innei <tukon479@gmail.com> * feat: inline player Signed-off-by: Innei <tukon479@gmail.com> * feat: pull to refresh Signed-off-by: Innei <tukon479@gmail.com> * cleanup Signed-off-by: Innei <tukon479@gmail.com> * update Signed-off-by: Innei <tukon479@gmail.com> * chore: auto-fix linting and formatting issues * chore: fix import, remove no support display * chore: auto-fix linting and formatting issues * feat: achievement modal in mobile Signed-off-by: Innei <tukon479@gmail.com> * fix: subview mobile Signed-off-by: Innei <tukon479@gmail.com> * feat: power Signed-off-by: Innei <tukon479@gmail.com> * feat: wallet mobile design Signed-off-by: Innei <tukon479@gmail.com> * feat: pwa support (RSSNext#1575) Co-authored-by: hyoban <hyoban@users.noreply.github.com> * chore: auto-fix linting and formatting issues * fix import * discover * fix: border color Signed-off-by: Innei <tukon479@gmail.com> * fix: modal async Signed-off-by: Innei <tukon479@gmail.com> * feat: mobile setting Signed-off-by: Innei <tukon479@gmail.com> * fix: entry header width Signed-off-by: Innei <tukon479@gmail.com> * fix: remove unused hide filter * feat: settings Signed-off-by: Innei <tukon479@gmail.com> * feat: setting done Signed-off-by: Innei <tukon479@gmail.com> * action card * fix discover feed form * popular filter * inbox table * fix: picture masonry pull to refresh Signed-off-by: Innei <tukon479@gmail.com> * fix: scroll element Signed-off-by: Innei <tukon479@gmail.com> * fix: radio in mobile Signed-off-by: Innei <tukon479@gmail.com> * feat: to scientific notation Signed-off-by: Innei <tukon479@gmail.com> * fix: login Signed-off-by: Innei <tukon479@gmail.com> * ResponsiveSelect for action card * chore: remove theme color Signed-off-by: Innei <tukon479@gmail.com> * type check * type check * fix: setting import circular Signed-off-by: Innei <tukon479@gmail.com> * refactor: remove hijack pushState Signed-off-by: Innei <tukon479@gmail.com> * fix: float bar Signed-off-by: Innei <tukon479@gmail.com> * fix: scroll end trigger Signed-off-by: Innei <tukon479@gmail.com> * fix: dark theme color Signed-off-by: Innei <tukon479@gmail.com> * fix: overscroll-behavior only in destop Signed-off-by: Innei <tukon479@gmail.com> * fix: ux Signed-off-by: Innei <tukon479@gmail.com> * fix: color Signed-off-by: Innei <tukon479@gmail.com> * fix: list scroll area Signed-off-by: Innei <tukon479@gmail.com> * update Signed-off-by: Innei <tukon479@gmail.com> * merge * update * update favicon link * fix: reload prompt on mobile * test Signed-off-by: Innei <i@innei.in> * test Signed-off-by: Innei <i@innei.in> * fix: ios Signed-off-by: Innei <i@innei.in> * try patch precaching * try * try * build * try * try * feat: ctx menu on safari Signed-off-by: Innei <tukon479@gmail.com> * try * clear timeout Signed-off-by: Innei <tukon479@gmail.com> * try * fix * deny og * fix patch * pre cache exclude * feat: add all Signed-off-by: Innei <tukon479@gmail.com> * i18n Signed-off-by: Innei <tukon479@gmail.com> * feat: slide Signed-off-by: Innei <tukon479@gmail.com> * feat: ico Signed-off-by: Innei <tukon479@gmail.com> * fix: build Signed-off-by: Innei <tukon479@gmail.com> * test network first Signed-off-by: Innei <tukon479@gmail.com> * test Signed-off-by: Innei <tukon479@gmail.com> * fix: icon padding * test Signed-off-by: Innei <tukon479@gmail.com> * use react-ios-pwa-prompt * fix: icon path * update * fix: prompt Signed-off-by: Innei <tukon479@gmail.com> * feat: redesign toc Signed-off-by: Innei <tukon479@gmail.com> * ctx Signed-off-by: Innei <tukon479@gmail.com> * ready to prod Signed-off-by: Innei <tukon479@gmail.com> * feat: startup screen Signed-off-by: Innei <tukon479@gmail.com> * feat: floatbar Signed-off-by: Innei <tukon479@gmail.com> * fix: switch view Signed-off-by: Innei <tukon479@gmail.com> * fix: keep scroll map Signed-off-by: Innei <tukon479@gmail.com> * enable hoverOnlyWhenSupported * fix: count Signed-off-by: Innei <tukon479@gmail.com> * fix: hoverOnlyWhenSupported only in web Signed-off-by: Innei <tukon479@gmail.com> * fix Signed-off-by: Innei <tukon479@gmail.com> * chore: auto-fix linting and formatting issues --------- Signed-off-by: Innei <i@innei.in> Signed-off-by: Innei <tukon479@gmail.com> Co-authored-by: Innei <Innei@users.noreply.github.com> Co-authored-by: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Co-authored-by: hyoban <hyoban@users.noreply.github.com> Co-authored-by: lawvs <18554747+lawvs@users.noreply.github.com> Co-authored-by: lawvs <lawvs@users.noreply.github.com>
- Loading branch information
1 parent
78611bb
commit edd4f9e
Showing
229 changed files
with
9,853 additions
and
5,455 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 |
---|---|---|
|
@@ -20,4 +20,6 @@ vite.config.*.mjs | |
|
||
.generated | ||
.turbo | ||
|
||
apps/renderer/dev-dist | ||
tsconfig.tsbuildinfo |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,54 @@ | ||
import type { Preset } from "@vite-pwa/assets-generator/config" | ||
import { defineConfig } from "@vite-pwa/assets-generator/config" | ||
|
||
const minimal2023Preset: Preset = { | ||
transparent: { | ||
sizes: [64, 192, 512], | ||
favicons: [[48, "favicon.ico"]], | ||
padding: 0.05, | ||
// rgba(255, 92, 0, 1) | ||
resizeOptions: { | ||
fit: "contain", | ||
background: { | ||
r: 255, | ||
g: 92, | ||
b: 0, | ||
alpha: 1, | ||
}, | ||
}, | ||
}, | ||
maskable: { | ||
sizes: [512], | ||
padding: 0, | ||
resizeOptions: { | ||
fit: "contain", | ||
background: { | ||
r: 255, | ||
g: 92, | ||
b: 0, | ||
alpha: 1, | ||
}, | ||
}, | ||
}, | ||
apple: { | ||
sizes: [180], | ||
padding: 0, | ||
resizeOptions: { | ||
fit: "contain", | ||
background: { | ||
r: 255, | ||
g: 92, | ||
b: 0, | ||
alpha: 1, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
export default defineConfig({ | ||
headLinkOptions: { | ||
preset: "2023", | ||
}, | ||
preset: minimal2023Preset, | ||
images: ["public/logo.svg"], | ||
}) |
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
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,83 @@ | ||
import { useEffect } from "react" | ||
import { toast } from "sonner" | ||
import { useRegisterSW } from "virtual:pwa-register/react" | ||
|
||
// check for updates every hour | ||
const period = 60 * 60 * 1000 | ||
|
||
export function ReloadPrompt() { | ||
const { | ||
// offlineReady: [offlineReady, setOfflineReady], | ||
needRefresh: [needRefresh], | ||
updateServiceWorker, | ||
} = useRegisterSW({ | ||
onRegisteredSW(swUrl, r) { | ||
if (period <= 0) return | ||
if (r?.active?.state === "activated") { | ||
registerPeriodicSync(period, swUrl, r) | ||
} else if (r?.installing) { | ||
r.installing.addEventListener("statechange", (e) => { | ||
const sw = e.target as ServiceWorker | ||
if (sw.state === "activated") registerPeriodicSync(period, swUrl, r) | ||
}) | ||
} | ||
}, | ||
}) | ||
|
||
// const close = useCallback(() => { | ||
// setOfflineReady(false) | ||
// setNeedRefresh(false) | ||
// }, [setNeedRefresh, setOfflineReady]) | ||
|
||
// useEffect(() => { | ||
// if (offlineReady) { | ||
// toast.info("App is ready to work offline", { | ||
// action: { | ||
// label: "Close", | ||
// onClick: close, | ||
// }, | ||
// duration: Infinity, | ||
// }) | ||
// } | ||
// }, [offlineReady, close]) | ||
|
||
useEffect(() => { | ||
const isPwa = window.matchMedia("(display-mode: standalone)").matches | ||
if (!isPwa) return | ||
|
||
if (needRefresh) { | ||
toast.info("New version available", { | ||
action: { | ||
label: "Refresh", | ||
onClick: () => { | ||
updateServiceWorker(true) | ||
}, | ||
}, | ||
duration: Infinity, | ||
}) | ||
} | ||
}, [needRefresh, updateServiceWorker]) | ||
|
||
return null | ||
} | ||
|
||
/** | ||
* This function will register a periodic sync check every hour, you can modify the interval as needed. | ||
*/ | ||
function registerPeriodicSync(period: number, swUrl: string, r: ServiceWorkerRegistration) { | ||
if (period <= 0) return | ||
|
||
setInterval(async () => { | ||
if ("onLine" in navigator && !navigator.onLine) return | ||
|
||
const resp = await fetch(swUrl, { | ||
cache: "no-store", | ||
headers: { | ||
cache: "no-store", | ||
"cache-control": "no-cache", | ||
}, | ||
}) | ||
|
||
if (resp?.status === 200) await r.update() | ||
}, period) | ||
} |
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,13 @@ | ||
import { MotionButtonBase } from "@follow/components/ui/button/index.js" | ||
import { cn } from "@follow/utils/utils" | ||
|
||
export const HeaderTopReturnBackButton: Component<{ to?: string }> = ({ className, to }) => ( | ||
<MotionButtonBase | ||
onClick={() => window.history.returnBack(to)} | ||
className={cn("center size-8", className)} | ||
> | ||
<i className="i-mingcute-left-line size-6" /> | ||
|
||
<span className="sr-only">Back</span> | ||
</MotionButtonBase> | ||
) |
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
Oops, something went wrong.