Updated Wrapper component, added queue for all ttp requests, updated some desktop app configuration,
This commit is contained in:
parent
e15ec4bb3f
commit
0903f96ba3
10 changed files with 207 additions and 106 deletions
|
|
@ -6,9 +6,11 @@ export default {
|
|||
app: {
|
||||
name: "tensamin",
|
||||
identifier: "client.tensamin.net",
|
||||
version: version,
|
||||
version,
|
||||
urlSchemes: ["tensamin"],
|
||||
},
|
||||
build: {
|
||||
useAsar: true,
|
||||
views: {
|
||||
mainview: {
|
||||
entrypoint: "src/mainview/index.ts",
|
||||
|
|
@ -16,12 +18,17 @@ export default {
|
|||
},
|
||||
copy: {
|
||||
"../web/dist/": "views/mainview/",
|
||||
"../mobile/src-tauri/icons": "views/mainview/icons/",
|
||||
},
|
||||
mac: {
|
||||
icons: "",
|
||||
bundleWGPU: false,
|
||||
defaultRenderer: "cef",
|
||||
bundleCEF: true,
|
||||
},
|
||||
linux: {
|
||||
icon: "../mobile/src-tauri/icons/icon.png",
|
||||
bundleWGPU: false,
|
||||
defaultRenderer: "cef",
|
||||
bundleCEF: true,
|
||||
chromiumFlags: {
|
||||
|
|
@ -30,6 +37,8 @@ export default {
|
|||
},
|
||||
},
|
||||
win: {
|
||||
icon: "../mobile/src-tauri/icons/icon.ico",
|
||||
bundleWGPU: false,
|
||||
defaultRenderer: "cef",
|
||||
bundleCEF: true,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"scripts": {
|
||||
"format": "bunx prettier --write .",
|
||||
"lint": "echo desktop lint skipped",
|
||||
"build": "echo desktop build skipped",
|
||||
"build": "electrobun build",
|
||||
"start": "electrobun dev",
|
||||
"dev": "electrobun dev --watch"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,8 +1,14 @@
|
|||
import { BrowserWindow } from "electrobun/bun";
|
||||
import { BrowserWindow, Tray } from "electrobun/bun";
|
||||
|
||||
const tray = new Tray({
|
||||
title: "Tensamin",
|
||||
image: "views://mainview/icons/64x64.png",
|
||||
height: 64,
|
||||
width: 64,
|
||||
});
|
||||
|
||||
// Create the main application window
|
||||
const mainWindow = new BrowserWindow({
|
||||
title: "Hello Electrobun!",
|
||||
title: "Tensamin",
|
||||
url: "views://mainview/index.html",
|
||||
renderer: "cef",
|
||||
frame: {
|
||||
|
|
@ -15,4 +21,8 @@ const mainWindow = new BrowserWindow({
|
|||
|
||||
mainWindow.url = "views://mainview/index.html";
|
||||
|
||||
console.log("Hello Electrobun app started!");
|
||||
tray.on("tray-clicked", () => {
|
||||
console.log("Tray clicked");
|
||||
});
|
||||
|
||||
console.log("Started desktop app");
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
import { useStorage } from "@tensamin/storage/context";
|
||||
import Wrapper from "@tensamin/user/wrapper";
|
||||
import * as React from "react";
|
||||
import { Basic, Loading } from "./modals/basic";
|
||||
import List from "@/features/conversation/list/body";
|
||||
|
||||
|
|
@ -19,14 +17,7 @@ import { useLocation } from "@tanstack/react-router";
|
|||
* @returns Sidebar JSX.
|
||||
*/
|
||||
export default function Sidebar() {
|
||||
const [userId, setUserId] = React.useState<undefined | number>(undefined);
|
||||
const { load } = useStorage();
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
React.useEffect(() => {
|
||||
load("user_id").then(setUserId);
|
||||
}, [load]);
|
||||
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
|
|
@ -38,7 +29,7 @@ export default function Sidebar() {
|
|||
<div>
|
||||
<Wrapper
|
||||
loading={<Loading />}
|
||||
userId={userId}
|
||||
userId={"own"}
|
||||
component={(user) => <Basic user={user} />}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue