Release v4.1 (#229)

* refactor: remove custom icon packs

* fix: command not work on windows

* fix: make open_window command async

* feat: improve commands

* feat: improve

* refactor: column

* feat: improve thread column

* feat: improve

* feat: add stories column

* feat: improve

* feat: add search column

* feat: add reset password

* feat: add subscription

* refactor: settings

* chore: improve commands

* fix: crash on production

* feat: use tauri store plugin for cache

* feat: new icon

* chore: update icon for windows

* chore: improve some columns

* chore: polish code
This commit is contained in:
雨宮蓮
2024-08-27 19:37:30 +07:00
committed by GitHub
parent 26ae473521
commit 61ad96ca63
318 changed files with 5564 additions and 8458 deletions

View File

@@ -1,7 +1,10 @@
import { events } from "@/commands.gen";
import { appSettings } from "@/commons";
import { Spinner } from "@/components";
import type { QueryClient } from "@tanstack/react-query";
import { Outlet, createRootRouteWithContext } from "@tanstack/react-router";
import type { OsType } from "@tauri-apps/plugin-os";
import { useEffect } from "react";
interface RouterContext {
queryClient: QueryClient;
@@ -9,10 +12,26 @@ interface RouterContext {
}
export const Route = createRootRouteWithContext<RouterContext>()({
component: () => <Outlet />,
component: Screen,
pendingComponent: Pending,
});
function Screen() {
useEffect(() => {
const unlisten = events.newSettings.listen((data) => {
appSettings.setState((state) => {
return { ...state, ...data.payload };
});
});
return () => {
unlisten.then((f) => f());
};
}, []);
return <Outlet />;
}
function Pending() {
return (
<div className="flex flex-col items-center justify-center w-screen h-screen">