Skip to content

Commit

Permalink
feat: rename to follow
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed May 4, 2024
1 parent 120d26a commit 74c19d0
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<img src="https://raw.githubusercontent.com/RSSNext/ReadOK/main/src/renderer/public/icon.svg" alt="RSSHub" width="100">
<img src="https://raw.githubusercontent.com/RSSNext/Follow/main/src/renderer/public/icon.svg" alt="RSSHub" width="100">
</p>
<h1 align="center">ReadOK</h1>
<h1 align="center">Follow</h1>

> [WIP] Next generation information browser
2 changes: 1 addition & 1 deletion dev-app-update.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
provider: generic
url: https://example.com/auto-updates
updaterCacheDirName: readok-updater
updaterCacheDirName: follow-updater
2 changes: 1 addition & 1 deletion docker-compose.deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ services:
- IMGPROXY_ENABLE_AVIF_DETECTION=true
- IMGPROXY_READ_TIMEOUT=30
- IMGPROXY_DOWNLOAD_TIMEOUT=30
- IMGPROXY_TRUSTED_SIGNATURES=readok
- IMGPROXY_TRUSTED_SIGNATURES=follow
- IMGPROXY_IGNORE_SSL_VERIFICATION=true
10 changes: 5 additions & 5 deletions electron-builder.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
appId: io.readok
productName: readok
appId: io.follow
productName: follow
directories:
buildResources: build
files:
Expand All @@ -12,7 +12,7 @@ files:
asarUnpack:
- resources/**
win:
executableName: readok
executableName: follow
nsis:
artifactName: ${name}-${version}-setup.${ext}
shortcutName: ${productName}
Expand Down Expand Up @@ -42,7 +42,7 @@ publish:
provider: generic
url: https://example.com/auto-updates
protocols:
name: ReadOK
name: Follow
schemes:
- readok
- follow
- feed
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "readok",
"name": "follow",
"version": "0.0.1",
"description": "An Electron application with React and TypeScript",
"main": "./out/main/index.js",
Expand Down
6 changes: 3 additions & 3 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import { createWindow } from "./window"

if (process.defaultApp) {
if (process.argv.length >= 2) {
app.setAsDefaultProtocolClient("readok", process.execPath, [
app.setAsDefaultProtocolClient("follow", process.execPath, [
path.resolve(process.argv[1]),
])
}
} else {
app.setAsDefaultProtocolClient("readok")
app.setAsDefaultProtocolClient("follow")
}

app.dock.setIcon(path.join(__dirname, "../../resources/icon.png"))
Expand All @@ -21,7 +21,7 @@ app.dock.setIcon(path.join(__dirname, "../../resources/icon.png"))
// Some APIs can only be used after this event occurs.
app.whenReady().then(() => {
// Set app user model id for windows
electronApp.setAppUserModelId("io.readok")
electronApp.setAppUserModelId("re.follow")

// Default open or close DevTools by F12 in development
// and ignore CommandOrControl + R in production.
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="referrer" content="no-referrer" />
<title>ReadOK</title>
<title>Follow</title>
</head>
<body>
<div id="root"></div>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/components/feed-column/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function FeedColumn({
<div className="mx-5 flex items-center justify-between">
<div className="font-bold text-xl flex items-center gap-1">
<img src="./icon.svg" alt="logo" className="h-5 w-5" />
ReadOK
Follow
</div>
<div className="flex items-center gap-2">
<Link to={`/profile`} className="flex">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const formSchema = z.object({
url: z.string().min(1),
})

export function ReadOKUserForm() {
export function FollowUserForm() {
const form = useForm<z.infer<typeof formSchema>>({
resolver: zodResolver(formSchema),
defaultValues: {
Expand All @@ -30,9 +30,9 @@ export function ReadOKUserForm() {

const url = form.watch("url")
useEffect(() => {
if (!url.startsWith("readok://")) {
form.setValue("url", "readok://")
} else if (url.startsWith("readok://readok://")) {
if (!url.startsWith("follow://")) {
form.setValue("url", "follow://")
} else if (url.startsWith("follow://follow://")) {
form.setValue("url", url.slice(9))
}
}, [url])
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/lib/img-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export const getProxyUrl = ({
width: number
height: number
}) => {
return `https://img.readok.local/readok/rs:fill:${width}:${height}/plain/${url}`
return `https://img.follow.local/follow/rs:fill:${width}:${height}/plain/${url}`
}
6 changes: 3 additions & 3 deletions src/renderer/src/pages/(main)/subscribe/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { Recommendations } from "@renderer/components/subscribe/recommendations"
import { RSSForm } from "@renderer/components/subscribe/rss-form"
import { RSSHubForm } from "@renderer/components/subscribe/rsshub-form"
import { ReadOKUserForm } from "@renderer/components/subscribe/readok-user-form"
import { FollowUserForm } from "@renderer/components/subscribe/follow-user-form"

export function Component() {
const tabs = [
Expand All @@ -20,8 +20,8 @@ export function Component() {
content: <RSSHubForm />,
},
{
name: "ReadOK User",
content: <ReadOKUserForm />,
name: "Follow User",
content: <FollowUserForm />,
},
{
name: "RSS3",
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/src/pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { Button } from "@renderer/components/ui/button"
import { signIn } from "@hono/auth-js/react"

export function Component() {
const callbackUrl = `${import.meta.env.VITE_ELECTRON_REMOTE_URL}/redirect?app=readok`
const callbackUrl = `${import.meta.env.VITE_ELECTRON_REMOTE_URL}/redirect?app=follow`

return (
<div className="h-screen w-full flex items-center justify-center flex-col gap-10">
<img src="./icon.svg" alt="logo" className="h-20 w-20" />
<h1 className="text-3xl font-bold">Log in to ReadOK</h1>
<h1 className="text-3xl font-bold">Log in to Follow</h1>
<div className="flex flex-col gap-3">
<Button
className="text-lg"
Expand Down
10 changes: 5 additions & 5 deletions src/renderer/src/pages/redirect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@ export function Component() {
},
)
).json()
return `readok://auth?token=${response.data.sessionToken}`
return `follow://auth?token=${response.data.sessionToken}`
}

return (
<div className="h-screen w-full flex items-center justify-center flex-col gap-10">
<img src="./icon.svg" alt="logo" className="h-20 w-20" />
<UserButton className="text-2xl bg-stone-100 px-10 py-4" />
<h1 className="text-3xl font-bold">
Successfully connected to ReadOK Account
Successfully connected to Follow Account
</h1>
<h2>
You have successfully connected to ReadOK Account. Now is the time to
open ReadOK and safely close this page.
You have successfully connected to Follow Account. Now is the time to
open Follow and safely close this page.
</h2>
<Button
className="text-lg"
size="xl"
onClick={async () => window.open(await getCallbackUrl())}
>
Open ReadOK
Open Follow
</Button>
</div>
)
Expand Down

0 comments on commit 74c19d0

Please sign in to comment.