Updated icons, new identification

This commit is contained in:
Alois 2026-04-06 00:22:30 +02:00
commit 7adb2dee05
34 changed files with 331 additions and 402 deletions

View file

@ -1,6 +1,6 @@
import type { ElectrobunConfig } from "electrobun";
import { version } from "@tensamin/shared/package.json";
import { version } from "../../package.json";
export default {
app: {

View file

@ -1,7 +1,7 @@
{
"name": "@tensamin/mobile",
"private": true,
"version": "0.1.0",
"version": "0.0.0",
"type": "module",
"exports": {
"./context": "./src/context.tsx"

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<background android:drawable="@color/ic_launcher_background"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before After
Before After

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#fff</color>
</resources>

View file

@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "tensamin",
"version": "0.1.0",
"version": "../../../package.json",
"identifier": "net.tensamin.client",
"build": {
"beforeDevCommand": "cd ../web && bun run dev && cd -",

View file

@ -4,7 +4,6 @@ import { useLocation, useNavigate, useSearch } from "@tanstack/react-router";
import { useCall } from "@tensamin/call/context";
import Wrapper from "@tensamin/user/wrapper";
import { Skeleton } from "@tensamin/ui/cmp/skeleton";
import { useConversation } from "@/features/conversation/context";
import {
Select,
SelectContent,
@ -14,16 +13,17 @@ import {
import { displayCallId } from "@tensamin/call/utils";
import { useState } from "react";
import { SidebarTrigger, useSidebar } from "@tensamin/ui/cmp/sidebar";
import { useTTP } from "@tensamin/ttp/context";
export default function Navbar({ forMobile }: { forMobile: boolean }) {
const navigate = useNavigate();
const { joinCall, state } = useCall();
const { conversations } = useConversation();
const { contacts } = useTTP();
const { pathname } = useLocation();
const { id } = useSearch({ strict: false });
const currentCalls = id ? conversations?.[id]?.calls || [] : [];
const currentCalls = id ? contacts?.[id]?.calls || [] : [];
//const currentCalls = ["leck", "schleck", "und", "eck"];
const [selectOpen, setSelectOpen] = useState(false);

View file

@ -3,7 +3,6 @@ import { Input } from "@tensamin/ui/cmp/input";
import { Label } from "@tensamin/ui/cmp/label";
import { useStorage } from "@tensamin/storage/context";
import { log, toast } from "@tensamin/shared/log";
import { useNavigate } from "@tanstack/react-router";
import { Upload } from "lucide-react";
import * as React from "react";
import { z } from "zod";
@ -55,7 +54,6 @@ function parseTuFileContent(rawFileContent: string): {
export default function Form() {
const uploadRef = React.useRef<HTMLInputElement | null>(null);
const { save } = useStorage();
const navigate = useNavigate();
/**
* Handles uploaded .tu files and stores resolved credentials.
@ -73,16 +71,17 @@ export default function Form() {
const raw = await file.text();
const parsed = parseTuFileContent(raw);
await save("session_id", Date.now());
await save("user_id", parsed.userId);
await save("private_key", parsed.privateKey);
void navigate({ to: "/" });
location.href = "/";
} catch (error) {
log(0, "Login", "red", error);
toast("error", "Failed to load file");
}
},
[navigate, save],
[save],
);
/**
@ -123,16 +122,17 @@ export default function Form() {
const user = parse.data;
await save("session_id", Date.now());
await save("user_id", user.user_id);
await save("private_key", inputParse.data.private_key);
navigate({ to: "/" });
location.href = "/";
} catch (error) {
log(0, "Login", "red", error);
toast("error", "Failed to fetch user data");
}
},
[navigate, save],
[save],
);
return (

View file

@ -1,102 +0,0 @@
import { useTTP } from "@tensamin/ttp/context";
import {
createContext,
useContext,
useEffect,
useState,
type ReactNode,
} from "react";
import { toast } from "@tensamin/shared/log";
import type {
Community,
Conversation,
} from "@tensamin/shared/features/conversation/schema";
interface contextValue {
conversations: Conversation[] | null;
communities: Community[] | null;
}
const ConversationContext = createContext<contextValue | undefined>(undefined);
/**
* Executes ConversationProvider.
* @param props Parameter props.
* @returns unknown.
*/
export default function ConversationProvider(props: { children: ReactNode }) {
const [conversations, setConversations] = useState<Conversation[] | null>(
null,
);
const [communities, setCommunities] = useState<Community[] | null>(null);
const { send } = useTTP();
useEffect(() => {
let active = true;
send("get_conversations", {})
.then((data) => {
if (active) {
setConversations(data.data.user_ids);
}
})
.catch(() => {
setConversations([
{
last_message_at: 0,
user_id: 0,
},
]);
toast("error", "Failed to load conversations");
});
send("get_communities", {})
.then((data) => {
if (active) {
setCommunities(data.data.communities);
}
})
.catch(() => {
setCommunities([
{
community_address: "none",
community_title: "Failed",
position: "",
},
]);
toast("error", "Failed to load communities");
});
return () => {
active = false;
};
}, [send]);
return (
<ConversationContext.Provider
value={{
conversations,
communities,
}}
>
{props.children}
</ConversationContext.Provider>
);
}
/**
* Executes useConversation.
* @param none This function has no parameters.
* @returns contextValue.
*/
export function useConversation(): contextValue {
const context = useContext(ConversationContext);
if (!context) {
throw new Error(
"useConversation must be used within a ConversationProvider",
);
}
return context;
}

View file

@ -1,6 +1,6 @@
import * as React from "react";
import { useVirtualizer } from "@tanstack/react-virtual";
import { useConversation } from "../context";
import { useTTP } from "@tensamin/ttp/context";
import Switch from "./switch";
import ConversationModal from "../modal/conversation";
@ -17,8 +17,8 @@ export default function List() {
"conversations" | "communities"
>("conversations");
const { conversations, communities } = useConversation();
const items = category === "conversations" ? conversations : communities;
const { contacts, communities } = useTTP();
const items = category === "conversations" ? contacts : communities;
const scrollRef = React.useRef<HTMLDivElement | null>(null);
@ -66,14 +66,14 @@ export default function List() {
}}
>
{category === "conversations" ? (
conversations?.[virtualItem.index] ? (
contacts?.[virtualItem.index] ? (
<ConversationModal
userId={conversations[virtualItem.index].user_id}
userId={contacts[virtualItem.index].user_id}
/>
) : null
) : communities?.[virtualItem.index] ? (
<CommunityModal
community={communities[virtualItem.index]}
//community={communities[virtualItem.index]}
/>
) : null}
</div>

View file

@ -1,10 +1,3 @@
import type { Community } from "@tensamin/shared/features/conversation/schema";
/**
* Executes CommunityModal.
* @param props Parameter props.
* @returns unknown.
*/
export default function CommunityModal(props: { community: Community }) {
return <div>{props.community.community_title}</div>;
export default function CommunityModal() {
return <div>Not implemented</div>;
}

View file

@ -109,7 +109,7 @@
--chart-3: oklch(0.6 0.118 184.704);
--chart-4: oklch(0.511 0.096 186.391);
--chart-5: oklch(0.437 0.078 188.216);
--sidebar: oklch(0.190 0 0);
--sidebar: oklch(0.19 0 0);
--sidebar-foreground: oklch(0.985 0 0);
--sidebar-primary: oklch(0.704 0.14 182.503);
--sidebar-primary-foreground: oklch(0.277 0.046 192.524);

View file

@ -19,7 +19,6 @@ import CallScreen from "@tensamin/call/screen";
import Login from "@/routes/screens/login";
import Signup from "@/routes/screens/signup";
import ConversationContext from "@/features/conversation/context";
import ChatContext from "@tensamin/chat/context";
import CallContext from "@tensamin/call/context";
import SocketContext from "@tensamin/ttp/context";
@ -57,11 +56,9 @@ function AppShell() {
<SocketContext>
<UserContext>
<CallContext>
<ConversationContext>
<AppLayout>
<Outlet />
</AppLayout>
</ConversationContext>
<AppLayout>
<Outlet />
</AppLayout>
</CallContext>
</UserContext>
</SocketContext>