Updated a lot of stuff

This commit is contained in:
Alois 2026-03-14 19:36:23 +01:00
commit c0102df54f
44 changed files with 1610 additions and 707 deletions

View file

@ -1,8 +1,8 @@
import Input from "@tensamin/markdown/input";
import { Card, CardHeader } from "@tensamin/ui/card";
import { Card, CardHeader } from "@tensamin/ui/cmp/card";
import { useStorage } from "@tensamin/storage/context";
import * as React from "react";
import { Button } from "@tensamin/ui/button";
import { Button } from "@tensamin/ui/cmp/button";
import { Plus, Laugh, Clapperboard } from "lucide-react";
import { useChat } from "../context";

View file

@ -41,20 +41,27 @@ export default function Provider(
let active = true;
void get(recipientId).then(async (recipientData) => {
const ownId = await load("user_id");
const privateKey = await load("private_key");
const ownData = await get(ownId);
const sharedSecret = await get_shared_secret(
privateKey,
ownData.public_key,
recipientData.public_key,
);
void (async () => {
try {
const recipientData = await get(recipientId);
const ownId = await load("user_id");
const privateKey = await load("private_key");
const ownData = await get(ownId);
const sharedSecret = await get_shared_secret(
privateKey,
ownData.public_key,
recipientData.public_key,
);
if (active) {
setCurrentSharedSecret(sharedSecret);
if (active) {
setCurrentSharedSecret(sharedSecret);
}
} catch {
if (active) {
setCurrentSharedSecret("");
}
}
});
})();
return () => {
active = false;