feat: child webview

This commit is contained in:
2024-03-16 15:05:06 +07:00
parent 16e6d234e5
commit 46cc01e0ee
37 changed files with 1686 additions and 1403 deletions

View File

@@ -18,17 +18,17 @@
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-popover": "^1.0.7",
"@tanstack/query-sync-storage-persister": "^5.24.1",
"@tanstack/react-query": "^5.24.1",
"@tanstack/react-query-persist-client": "^5.24.1",
"@tanstack/react-router": "^1.18.1",
"i18next": "^23.10.0",
"@tanstack/query-sync-storage-persister": "^5.28.4",
"@tanstack/react-query": "^5.28.4",
"@tanstack/react-query-persist-client": "^5.28.4",
"@tanstack/react-router": "^1.20.0",
"i18next": "^23.10.1",
"i18next-resources-to-backend": "^1.2.0",
"nostr-tools": "^2.3.1",
"react": "^18.2.0",
"react-currency-input-field": "^3.8.0",
"react-dom": "^18.2.0",
"react-i18next": "^14.0.5",
"react-i18next": "^14.1.0",
"slate": "^0.101.5",
"slate-react": "^0.101.6",
"sonner": "^1.4.3",
@@ -38,17 +38,17 @@
"@lume/tailwindcss": "workspace:^",
"@lume/tsconfig": "workspace:^",
"@lume/types": "workspace:^",
"@tanstack/router-devtools": "^1.18.1",
"@tanstack/router-vite-plugin": "^1.18.1",
"@types/react": "^18.2.61",
"@types/react-dom": "^18.2.19",
"@tanstack/router-devtools": "^1.20.0",
"@tanstack/router-vite-plugin": "^1.20.0",
"@types/react": "^18.2.66",
"@types/react-dom": "^18.2.22",
"@vitejs/plugin-react-swc": "^3.6.0",
"autoprefixer": "^10.4.18",
"postcss": "^8.4.35",
"tailwindcss": "^3.4.1",
"typescript": "^5.3.3",
"vite": "^5.1.4",
"typescript": "^5.4.2",
"vite": "^5.1.6",
"vite-plugin-top-level-await": "^1.4.1",
"vite-tsconfig-paths": "^4.3.1"
"vite-tsconfig-paths": "^4.3.2"
}
}

View File

@@ -1,23 +1,36 @@
import { Newsfeed } from "@/components/newsfeed";
import { LumeColumn } from "@lume/types";
import { Column } from "@lume/ui";
import { createLazyFileRoute } from "@tanstack/react-router";
import { VList } from "virtua";
import { useState } from "react";
const DEFAULT_COLUMNS: LumeColumn[] = [
{ name: "Tauri v2", content: "https://beta.tauri.app" },
{ name: "Tauri v1", content: "https://tauri.app" },
{ name: "Lume", content: "https://lume.nu" },
{ name: "Snort", content: "https://snort.social" },
];
export const Route = createLazyFileRoute("/$account/home")({
component: Screen,
});
function Screen() {
const [isScroll, setIsScroll] = useState(false);
return (
<div className="relative h-full w-full">
<VList
className="scrollbar-none h-full w-full overflow-x-auto pb-2 pt-1.5 focus:outline-none"
itemSize={420}
tabIndex={0}
horizontal
<div
onScroll={() => setIsScroll((state) => !state)}
className="flex h-full w-full flex-nowrap gap-3 overflow-x-auto px-3 pb-3 pt-1.5 focus:outline-none"
>
<Newsfeed />
<div className="mx-2 h-full w-[420px] rounded-xl bg-white">todo!</div>
</VList>
{DEFAULT_COLUMNS.map((column, index) => (
<Column
key={column.name + index}
column={column}
isScroll={isScroll}
/>
))}
</div>
</div>
);
}