From 246163486ce2aeaabf3ad461526c71d6579367ab Mon Sep 17 00:00:00 2001 From: Alois Date: Tue, 28 Apr 2026 19:55:30 +0200 Subject: [PATCH] (feat): add basic voice buttons --- bun.lock | 4 +- licenses/THIRD_PARTY_NOTICES.md | 4 +- licenses/sbom.cyclonedx.json | 10 ++-- licenses/third-party-credits.json | 6 +-- package.json | 2 +- .../src/components/buttons/screenshare.tsx | 44 +++++++++++++++++ packages/call/src/components/sidebarBox.tsx | 28 +++++------ packages/call/src/context.tsx | 48 +++++++++++-------- 8 files changed, 99 insertions(+), 47 deletions(-) create mode 100644 packages/call/src/components/buttons/screenshare.tsx diff --git a/bun.lock b/bun.lock index e634e7c..dd2c2a9 100644 --- a/bun.lock +++ b/bun.lock @@ -242,7 +242,7 @@ }, "overrides": { "@tensamin/ttp-core": "https://git.methanium.net/tensamin/ttp/archive/0.0.12.tar.gz", - "@tensamin/ui": "https://git.methanium.net/tensamin/ui/archive/0.0.29.tar.gz", + "@tensamin/ui": "https://git.methanium.net/tensamin/ui/archive/0.0.30.tar.gz", }, "packages": { "@antfu/ni": ["@antfu/ni@25.0.0", "", { "dependencies": { "ansis": "^4.0.0", "fzf": "^0.5.2", "package-manager-detector": "^1.3.0", "tinyexec": "^1.0.1" }, "bin": { "na": "bin/na.mjs", "ni": "bin/ni.mjs", "nr": "bin/nr.mjs", "nci": "bin/nci.mjs", "nlx": "bin/nlx.mjs", "nun": "bin/nun.mjs", "nup": "bin/nup.mjs" } }, "sha512-9q/yCljni37pkMr4sPrI3G4jqdIk074+iukc5aFJl7kmDCCsiJrbZ6zKxnES1Gwg+i9RcDZwvktl23puGslmvA=="], @@ -695,7 +695,7 @@ "@tensamin/ttp-core": ["@tensamin/ttp-core@https://git.methanium.net/tensamin/ttp/archive/0.0.12.tar.gz", { "dependencies": { "@eslint/js": "^10.0.1", "@typescript-eslint/parser": "^8.58.1", "@webtransport-bun/webtransport": "^0.3.0", "globals": "^17.5.0", "typescript": "^6.0.2", "typescript-eslint": "^8.58.1", "zod": "^4.3.6" } }, "sha512-YdwOocPnNMoE0N/yqksJM9JizkhmNv7q8sc7JMI/TOKM/0wDlQqHLqJBMd7fAGkGLCSx+DKx5z8SJbrA9YlzVg=="], - "@tensamin/ui": ["@tensamin/ui@https://git.methanium.net/tensamin/ui/archive/0.0.29.tar.gz", { "dependencies": { "@base-ui/react": "^1.3.0", "@fontsource-variable/inter": "^5.2.6", "@tauri-apps/api": "^2", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1", "date-fns": "^4.1.0", "embla-carousel-react": "^8.6.0", "input-otp": "^1.4.2", "lucide-react": "^1.8.0", "next-themes": "^0.4.6", "react-day-picker": "^9.14.0", "react-resizable-panels": "^4.10.0", "recharts": "3.8.0", "shadcn": "^3.5.0", "sonner": "^2.0.7", "tailwind-merge": "^3.5.0", "tw-animate-css": "^1.3.0", "vaul": "^1.1.2" }, "peerDependencies": { "react": "^19.2.0", "react-dom": "^19.2.0" } }, "sha512-z83adnQtOLCr8ceVaUXZ7F7Hn/TrqsyqJM8hivhQxOX4OUNFaCBrbmfDpIK6OmtjRF/AnjqBNRua8FXAhJN35A=="], + "@tensamin/ui": ["@tensamin/ui@https://git.methanium.net/tensamin/ui/archive/0.0.30.tar.gz", { "dependencies": { "@base-ui/react": "^1.3.0", "@fontsource-variable/inter": "^5.2.6", "@tauri-apps/api": "^2", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1", "date-fns": "^4.1.0", "embla-carousel-react": "^8.6.0", "input-otp": "^1.4.2", "lucide-react": "^1.8.0", "next-themes": "^0.4.6", "react-day-picker": "^9.14.0", "react-resizable-panels": "^4.10.0", "recharts": "3.8.0", "shadcn": "^3.5.0", "sonner": "^2.0.7", "tailwind-merge": "^3.5.0", "tw-animate-css": "^1.3.0", "vaul": "^1.1.2" }, "peerDependencies": { "react": "^19.2.0", "react-dom": "^19.2.0" } }, "sha512-Eh/ko+4x4gF/25JyB38PNN2n/UVUIR6yxxZTpyZPx4maL00992pGmFt62kb1ejJQoooEpEfSo/ALtQDF5cjdoA=="], "@tensamin/user": ["@tensamin/user@workspace:packages/user"], diff --git a/licenses/THIRD_PARTY_NOTICES.md b/licenses/THIRD_PARTY_NOTICES.md index 5d0f077..8a00b6f 100644 --- a/licenses/THIRD_PARTY_NOTICES.md +++ b/licenses/THIRD_PARTY_NOTICES.md @@ -180,11 +180,11 @@ Generated from bun.lock and installed packages in workspace node_modules folders - Folder: `licenses/@tensamin_ttp-core@0.0.12` - Source package dir: `packages/ttp/node_modules/@tensamin/ttp-core` -## @tensamin/ui@0.0.26 +## @tensamin/ui@0.0.30 - License: UNKNOWN - Included files: none found -- Folder: `licenses/@tensamin_ui@0.0.26` +- Folder: `licenses/@tensamin_ui@0.0.30` - Source package dir: `apps/tauri/node_modules/@tensamin/ui` ## @types/node@25.6.0 diff --git a/licenses/sbom.cyclonedx.json b/licenses/sbom.cyclonedx.json index 544a6ca..dc9fa15 100644 --- a/licenses/sbom.cyclonedx.json +++ b/licenses/sbom.cyclonedx.json @@ -3,7 +3,7 @@ "specVersion": "1.5", "version": 1, "metadata": { - "timestamp": "2026-04-19T14:27:01.395Z", + "timestamp": "2026-04-28T17:49:46.479Z", "tools": [ { "vendor": "OpenAI", @@ -633,15 +633,15 @@ }, { "type": "library", - "bomRef": "pkg:npm/%40tensamin/ui@0.0.26", + "bomRef": "pkg:npm/%40tensamin/ui@0.0.30", "name": "@tensamin/ui", - "version": "0.0.26", - "purl": "pkg:npm/%40tensamin/ui@0.0.26", + "version": "0.0.30", + "purl": "pkg:npm/%40tensamin/ui@0.0.30", "externalReferences": [], "properties": [ { "name": "local:licenseFolder", - "value": "licenses/@tensamin_ui@0.0.26" + "value": "licenses/@tensamin_ui@0.0.30" }, { "name": "local:sourcePackageDir", diff --git a/licenses/third-party-credits.json b/licenses/third-party-credits.json index 6cd0a40..dc54f2f 100644 --- a/licenses/third-party-credits.json +++ b/licenses/third-party-credits.json @@ -1,5 +1,5 @@ { - "generatedAt": "2026-04-19T14:27:01.394Z", + "generatedAt": "2026-04-28T17:49:46.477Z", "packageCount": 57, "packages": [ { @@ -253,13 +253,13 @@ }, { "name": "@tensamin/ui", - "version": "0.0.26", + "version": "0.0.30", "license": "UNKNOWN", "homepage": null, "repository": null, "description": null, "files": [], - "licenseFolder": "licenses/@tensamin_ui@0.0.26", + "licenseFolder": "licenses/@tensamin_ui@0.0.30", "sourcePackageDir": "apps/tauri/node_modules/@tensamin/ui" }, { diff --git a/package.json b/package.json index 045b428..adbdc09 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "jsonc-parser": "^3.3.1" }, "overrides": { - "@tensamin/ui": "https://git.methanium.net/tensamin/ui/archive/0.0.29.tar.gz", + "@tensamin/ui": "https://git.methanium.net/tensamin/ui/archive/0.0.30.tar.gz", "@tensamin/ttp-core": "https://git.methanium.net/tensamin/ttp/archive/0.0.12.tar.gz" }, "dependencies": { diff --git a/packages/call/src/components/buttons/screenshare.tsx b/packages/call/src/components/buttons/screenshare.tsx new file mode 100644 index 0000000..a346375 --- /dev/null +++ b/packages/call/src/components/buttons/screenshare.tsx @@ -0,0 +1,44 @@ +import { Button, Popover, PopoverContent, PopoverTrigger } from "@tensamin/ui"; +import { MonitorDot, ScreenShare } from "lucide-react"; +import { useCall } from "../../context"; + +export default function ScreenshareButton({ + className, +}: { + className?: string; +}) { + const { room } = useCall(); + + const isScreensharing = room.localParticipant.isScreenShareEnabled; + + return ( + + + {isScreensharing ? : } + + } + /> + + + + + + + ); +} diff --git a/packages/call/src/components/sidebarBox.tsx b/packages/call/src/components/sidebarBox.tsx index fd14c09..0b0d4b8 100644 --- a/packages/call/src/components/sidebarBox.tsx +++ b/packages/call/src/components/sidebarBox.tsx @@ -1,4 +1,4 @@ -import { Lock, LockOpen } from "lucide-react"; +import { Expand, Lock, LockOpen } from "lucide-react"; import { useCall } from "../context"; import { Button, @@ -11,14 +11,17 @@ import { Tooltip, TooltipContent, TooltipTrigger, + useIsMobile, } from "@tensamin/ui"; import { LeaveIcon } from "@livekit/components-react"; +import ScreenshareButton from "./buttons/screenshare"; export default function SidebarBox() { - const { state, room, disconnect } = useCall(); + const { state, room, disconnect, openCallPage, callId } = useCall(); + const isMobile = useIsMobile(); return state === "closed" ? null : ( - +