Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Nov 9, 2024
2 parents 723cc43 + 612a6e8 commit 4beb1c8
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 14 deletions.
5 changes: 4 additions & 1 deletion apps/main/src/helper.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import path from "node:path"
import { fileURLToPath } from "node:url"

import { isMacOS } from "./env"

const __dirname = fileURLToPath(new URL(".", import.meta.url))
const iconMap = {
prod: path.join(__dirname, "../../resources/icon.png"),
dev: path.join(__dirname, "../../static/icon-dev.png"),
}
export const getIconPath = () => iconMap[process.env.NODE_ENV === "development" ? "dev" : "prod"]
export const getTrayIconPath = () => path.join(__dirname, "../../resources/tray-icon.png")
export const getTrayIconPath = () =>
isMacOS ? path.join(__dirname, "../../resources/tray-icon.png") : getIconPath()
2 changes: 1 addition & 1 deletion apps/main/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function bootstrap() {
app.on("second-instance", (_, commandLine) => {
if (mainWindow) {
if (mainWindow.isMinimized()) mainWindow.restore()
mainWindow.focus()
mainWindow.show()
}

const url = commandLine.pop()
Expand Down
1 change: 0 additions & 1 deletion apps/main/src/lib/tray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export const registerAppTray = () => {

const showWindow = () => {
const mainWindow = getMainWindowOrCreate()
if (!mainWindow) return
if (mainWindow.isMinimized()) {
mainWindow.restore()
} else {
Expand Down
4 changes: 2 additions & 2 deletions apps/renderer/src/hooks/biz/useSignOut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { signOut } from "@hono/auth-js/react"
import { useCallback } from "react"

import { setWhoami } from "~/atoms/user"
import { QUERY_PERSIST_KEY } from "~/constants"
import { isWebBuild, QUERY_PERSIST_KEY } from "~/constants"
import { tipcClient } from "~/lib/client"
import { clearLocalPersistStoreData } from "~/store/utils/clear"

Expand All @@ -23,6 +23,6 @@ export const useSignOut = () =>
await Promise.allSettled([clearLocalPersistStoreData(), tipcClient?.cleanAuthSessionToken()])
// Sign out
await signOut({
callbackUrl: env.VITE_WEB_URL,
callbackUrl: isWebBuild ? env.VITE_WEB_URL : undefined,
})
}, [])
7 changes: 2 additions & 5 deletions apps/renderer/src/modules/feed-column/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,7 @@ function FeedListImpl({ className, view }: { className?: string; view: number })
}}
mask={false}
flex
viewportClassName={cn(
"!px-3 [&>[data-radix-scroll-area-content]]:h-full",
isDragging && "!overflow-visible",
)}
viewportClassName={cn("!px-3", isDragging && "!overflow-visible")}
rootClassName={cn("h-full", isDragging && "overflow-visible")}
>
<div
Expand Down Expand Up @@ -251,7 +248,7 @@ function FeedListImpl({ className, view }: { className?: string; view: number })
)}

<DraggableContext.Provider value={draggableContextValue}>
<div className="h-full space-y-px" id="feeds-area" ref={setNodeRef}>
<div className="space-y-px" id="feeds-area" ref={setNodeRef}>
{(hasListData || hasInboxData) && (
<div
className={cn(
Expand Down
4 changes: 2 additions & 2 deletions apps/renderer/src/pages/(main)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { ErrorComponentType } from "~/components/errors/enum"
import { Kbd } from "~/components/ui/kbd/Kbd"
import { PlainModal } from "~/components/ui/modal/stacked/custom-modal"
import { DeclarativeModal } from "~/components/ui/modal/stacked/declarative-modal"
import { HotKeyScopeMap, isDev } from "~/constants"
import { HotKeyScopeMap, isDev, isWebBuild } from "~/constants"
import { shortcuts } from "~/constants/shortcuts"
import { useDailyTask } from "~/hooks/biz/useDailyTask"
import { useAuthQuery, useI18n } from "~/hooks/common"
Expand Down Expand Up @@ -63,7 +63,7 @@ const FooterInfo = () => {
</div>
)}

{!ELECTRON && (
{isWebBuild && (
<div className="center absolute inset-y-0 right-2">
<button
type="button"
Expand Down
2 changes: 2 additions & 0 deletions apps/renderer/src/queries/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export const useSession = (options?: { enabled?: boolean }) => {
return !!(3 - failureCount)
},
enabled: options?.enabled ?? true,
refetchOnMount: true,
staleTime: 0,
meta: {
persist: true,
},
Expand Down
2 changes: 1 addition & 1 deletion bump.hotfix.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const currentBranch = execSync("git rev-parse --abbrev-ref HEAD").toString().tri
export default defineConfig({
before: ["git pull --rebase"],
after: [
`gh pr create --title 'chore: Hotfix to release v\${NEW_VERSION}' --body 'v\${NEW_VERSION}' --base main --head ${currentBranch}`,
`gh pr create --title 'chore: Release v\${NEW_VERSION} for hotfix' --body 'v\${NEW_VERSION}' --base main --head ${currentBranch}`,
],
commit_message: "chore(release): hotfix to release v${NEW_VERSION}",
tag: false,
Expand Down
22 changes: 22 additions & 0 deletions changelog/0.2.0-beta.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# What's new in v0.2.0

## New Features

- Feed owners can now reset their feeds.
- Image Gallery: Clicking on the image button in the entry opens the Image gallery modal (only if there are multiple large images in the entry!).
- Now you can export the data from the local database.
- App: In consideration of your hard drive, now it supports clearing cache and limiting the size of cache.
- Added a new feature to allow minimizing to the system tray by enabling a switch in the settings.
- Discover Page: Enhance RSSHub recommendations with filters
- Quickly update views or categories at once by dragging and dropping.

## Improvements

- Optimized the Zen mode experience on macOS.
- Improvement web app global shortcuts.
- Optimized the Timeline's data cache, reducing data reloads within a short period of time. You can go to Settings -> General -> Timeline -> Reduce timeline refetch to control this feature, default is enabled.

## Bug Fixes

- Fixed the issue where the Volume of VideoPlayer was not clickable.
- While using arrow keys to switch between entries, the entry view will not scroll unexpexted.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Follow",
"type": "module",
"version": "0.2.0-beta.0",
"version": "0.2.0-beta.1",
"private": true,
"packageManager": "[email protected]",
"description": "Next generation information browser",
Expand Down

0 comments on commit 4beb1c8

Please sign in to comment.