(feat): big call and chatting stuff #23
54 changed files with 71 additions and 87 deletions
(fix): actually migrate all the imports from tensamin/ui to methanium/ui
(feat): update legal loading screen
commit
25c7ee7c26
|
|
@ -7,7 +7,7 @@ import {
|
||||||
} from "react";
|
} from "react";
|
||||||
import { getCurrent, onOpenUrl } from "@tauri-apps/plugin-deep-link";
|
import { getCurrent, onOpenUrl } from "@tauri-apps/plugin-deep-link";
|
||||||
import { isTauri } from "@tauri-apps/api/core";
|
import { isTauri } from "@tauri-apps/api/core";
|
||||||
import { useIsMobile } from "@tensamin/ui";
|
import { useIsMobile } from "@methanium/ui";
|
||||||
|
|
||||||
type DeeplinkContextValue = {
|
type DeeplinkContextValue = {
|
||||||
deeplinks: readonly string[];
|
deeplinks: readonly string[];
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import {
|
||||||
Format,
|
Format,
|
||||||
requestPermissions,
|
requestPermissions,
|
||||||
} from "@tauri-apps/plugin-barcode-scanner";
|
} from "@tauri-apps/plugin-barcode-scanner";
|
||||||
import { Button } from "@tensamin/ui";
|
import { Button } from "@methanium/ui";
|
||||||
|
|
||||||
import { toast } from "@tensamin/shared/log";
|
import { toast } from "@tensamin/shared/log";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@ import {
|
||||||
Tooltip,
|
Tooltip,
|
||||||
TooltipTrigger,
|
TooltipTrigger,
|
||||||
TooltipContent,
|
TooltipContent,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import { Card, CardHeader } from "@tensamin/ui";
|
import { Card, CardHeader } from "@methanium/ui";
|
||||||
import { Skeleton } from "@tensamin/ui";
|
import { Skeleton } from "@methanium/ui";
|
||||||
import { getStatusColor } from "@tensamin/shared/data";
|
import { getStatusColor } from "@tensamin/shared/data";
|
||||||
|
|
||||||
export function Basic({
|
export function Basic({
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import type { User } from "@tensamin/user/context";
|
import type { User } from "@tensamin/user/context";
|
||||||
import { Avatar, AvatarFallback, AvatarImage, Button } from "@tensamin/ui";
|
import { Avatar, AvatarFallback, AvatarImage, Button } from "@methanium/ui";
|
||||||
import Text from "@tensamin/markdown/text";
|
import Text from "@tensamin/markdown/text";
|
||||||
import { ChevronDown, ChevronUp } from "lucide-react";
|
import { ChevronDown, ChevronUp } from "lucide-react";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
|
||||||
|
|
@ -4,17 +4,17 @@ import {
|
||||||
PopoverContent,
|
PopoverContent,
|
||||||
PopoverTrigger,
|
PopoverTrigger,
|
||||||
useIsMobile,
|
useIsMobile,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import { ArrowLeft, House, Phone, Settings, User } from "lucide-react";
|
import { ArrowLeft, House, Phone, Settings, User } from "lucide-react";
|
||||||
import { useLocation, useNavigate, useSearch } from "@tanstack/react-router";
|
import { useLocation, useNavigate, useSearch } from "@tanstack/react-router";
|
||||||
import { joinCall, useCall } from "@tensamin/call/store";
|
import { joinCall, useCall } from "@tensamin/call/store";
|
||||||
import Wrapper from "@tensamin/user/wrapper";
|
import Wrapper from "@tensamin/user/wrapper";
|
||||||
import { Skeleton } from "@tensamin/ui";
|
import { Skeleton } from "@methanium/ui";
|
||||||
import { Select, SelectContent, SelectItem, SelectTrigger } from "@tensamin/ui";
|
import { Select, SelectContent, SelectItem, SelectTrigger } from "@methanium/ui";
|
||||||
import { displayCallId } from "@tensamin/call/utils";
|
import { displayCallId } from "@tensamin/call/utils";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { SidebarTrigger, useSidebar } from "@tensamin/ui";
|
import { SidebarTrigger, useSidebar } from "@methanium/ui";
|
||||||
import { WindowControls as Controls } from "@tensamin/ui";
|
import { WindowControls as Controls } from "@methanium/ui";
|
||||||
import { useSession } from "@tensamin/storage/session";
|
import { useSession } from "@tensamin/storage/session";
|
||||||
import Profile from "./modals/profile";
|
import Profile from "./modals/profile";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Button, cn, useIsMobile } from "@tensamin/ui";
|
import { Button, cn, useIsMobile } from "@methanium/ui";
|
||||||
import { Input } from "@tensamin/ui";
|
import { Input } from "@methanium/ui";
|
||||||
import { Label } from "@tensamin/ui";
|
import { Label } from "@methanium/ui";
|
||||||
import { useStorage } from "@tensamin/storage/context";
|
import { useStorage } from "@tensamin/storage/context";
|
||||||
import { log, toast } from "@tensamin/shared/log";
|
import { log, toast } from "@tensamin/shared/log";
|
||||||
import { File } from "lucide-react";
|
import { File } from "lucide-react";
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,9 @@ import {
|
||||||
SelectValue,
|
SelectValue,
|
||||||
SelectContent,
|
SelectContent,
|
||||||
SelectItem,
|
SelectItem,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import { isTauri } from "@tauri-apps/api/core";
|
import { isTauri } from "@tauri-apps/api/core";
|
||||||
import { useIsMobile } from "@tensamin/ui";
|
import { useIsMobile } from "@methanium/ui";
|
||||||
import { MobileNavbar } from "./navbar";
|
import { MobileNavbar } from "./navbar";
|
||||||
|
|
||||||
import SidebarBox from "@tensamin/call/sidebarBox";
|
import SidebarBox from "@tensamin/call/sidebarBox";
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@ import {
|
||||||
ContextMenuGroup,
|
ContextMenuGroup,
|
||||||
ContextMenuItem,
|
ContextMenuItem,
|
||||||
ContextMenuTrigger,
|
ContextMenuTrigger,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import { useNavigate } from "@tanstack/react-router";
|
import { useNavigate } from "@tanstack/react-router";
|
||||||
import { useSidebar } from "@tensamin/ui";
|
import { useSidebar } from "@methanium/ui";
|
||||||
|
|
||||||
export default function ConversationModal({ userId }: { userId: number }) {
|
export default function ConversationModal({ userId }: { userId: number }) {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import {
|
||||||
} from "@tanstack/react-router";
|
} from "@tanstack/react-router";
|
||||||
|
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
import "@tensamin/ui/index.css";
|
import "@methanium/ui/index.css";
|
||||||
|
|
||||||
import NotFound from "@/routes/404";
|
import NotFound from "@/routes/404";
|
||||||
|
|
||||||
|
|
@ -33,7 +33,7 @@ import NotificationsProvider from "@tensamin/notifications/context";
|
||||||
|
|
||||||
import TAuthWrapper from "@tensamin/tauth/context";
|
import TAuthWrapper from "@tensamin/tauth/context";
|
||||||
|
|
||||||
import { ErrorScreen, ThemeProvider, useTheme } from "@tensamin/ui";
|
import { ErrorScreen, ThemeProvider, useTheme } from "@methanium/ui";
|
||||||
import z from "zod";
|
import z from "zod";
|
||||||
|
|
||||||
import { useEffect, useRef, useState, type ReactNode } from "react";
|
import { useEffect, useRef, useState, type ReactNode } from "react";
|
||||||
|
|
@ -48,7 +48,7 @@ import CacheSync from "@tensamin/cache/sync";
|
||||||
|
|
||||||
import { useStorage } from "@tensamin/storage/context";
|
import { useStorage } from "@tensamin/storage/context";
|
||||||
import { useLocation, useNavigate } from "@tanstack/react-router";
|
import { useLocation, useNavigate } from "@tanstack/react-router";
|
||||||
import { useIsMobile, Toaster, TooltipProvider } from "@tensamin/ui";
|
import { useIsMobile, Toaster, TooltipProvider } from "@methanium/ui";
|
||||||
import { isTauri } from "@tauri-apps/api/core";
|
import { isTauri } from "@tauri-apps/api/core";
|
||||||
|
|
||||||
const wrapper = document.getElementById("root");
|
const wrapper = document.getElementById("root");
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import {
|
||||||
Input,
|
Input,
|
||||||
Button,
|
Button,
|
||||||
useIsMobile,
|
useIsMobile,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import z from "zod";
|
import z from "zod";
|
||||||
import { useMTP } from "@tensamin/mtp";
|
import { useMTP } from "@tensamin/mtp";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import Sidebar from "@/components/sidebar";
|
||||||
import Navbar, { MobileNavbar } from "@/components/navbar";
|
import Navbar, { MobileNavbar } from "@/components/navbar";
|
||||||
import { useShowMobileNavbar } from "./useShowMobileNavbar";
|
import { useShowMobileNavbar } from "./useShowMobileNavbar";
|
||||||
|
|
||||||
import { useIsMobile, cn, SidebarProvider } from "@tensamin/ui";
|
import { useIsMobile, cn, SidebarProvider } from "@methanium/ui";
|
||||||
|
|
||||||
import { isTauri } from "@tauri-apps/api/core";
|
import { isTauri } from "@tauri-apps/api/core";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import Form from "@/components/screens/login/form";
|
import Form from "@/components/screens/login/form";
|
||||||
import { CreateScreen } from "@tensamin/ui";
|
import { CreateScreen } from "@methanium/ui";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes Page.
|
* Executes Page.
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import {
|
||||||
Tooltip,
|
Tooltip,
|
||||||
TooltipContent,
|
TooltipContent,
|
||||||
TooltipTrigger,
|
TooltipTrigger,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import MuteButton from "./buttons/mute";
|
import MuteButton from "./buttons/mute";
|
||||||
import DeafButton from "./buttons/deaf";
|
import DeafButton from "./buttons/deaf";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Button, withTooltip } from "@tensamin/ui";
|
import { Button, withTooltip } from "@methanium/ui";
|
||||||
import { toggleDeaf, useCall } from "../../store";
|
import { toggleDeaf, useCall } from "../../store";
|
||||||
import { HeadphoneOff, Headphones } from "lucide-react";
|
import { HeadphoneOff, Headphones } from "lucide-react";
|
||||||
import { type CallButtonProps, iconScale } from "./tooltipButton";
|
import { type CallButtonProps, iconScale } from "./tooltipButton";
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import {
|
||||||
Tooltip,
|
Tooltip,
|
||||||
TooltipContent,
|
TooltipContent,
|
||||||
TooltipTrigger,
|
TooltipTrigger,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import Wrapper from "@tensamin/user/wrapper";
|
import Wrapper from "@tensamin/user/wrapper";
|
||||||
import { Mail } from "lucide-react";
|
import { Mail } from "lucide-react";
|
||||||
import { sendCallInvite, useCall } from "../../store";
|
import { sendCallInvite, useCall } from "../../store";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { LeaveIcon } from "@livekit/components-react";
|
import { LeaveIcon } from "@livekit/components-react";
|
||||||
import { Button, withTooltip } from "@tensamin/ui";
|
import { Button, withTooltip } from "@methanium/ui";
|
||||||
import { disconnect, useCall } from "../../store";
|
import { disconnect, useCall } from "../../store";
|
||||||
import { type CallButtonProps, iconScale } from "./tooltipButton";
|
import { type CallButtonProps, iconScale } from "./tooltipButton";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Button, withTooltip } from "@tensamin/ui";
|
import { Button, withTooltip } from "@methanium/ui";
|
||||||
import { toggleMute, useCall } from "../../store";
|
import { toggleMute, useCall } from "../../store";
|
||||||
import { Mic, MicOff } from "lucide-react";
|
import { Mic, MicOff } from "lucide-react";
|
||||||
import { type CallButtonProps, iconScale } from "./tooltipButton";
|
import { type CallButtonProps, iconScale } from "./tooltipButton";
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import {
|
||||||
Tooltip,
|
Tooltip,
|
||||||
TooltipContent,
|
TooltipContent,
|
||||||
TooltipTrigger,
|
TooltipTrigger,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import { MonitorDot, ScreenShare } from "lucide-react";
|
import { MonitorDot, ScreenShare } from "lucide-react";
|
||||||
import { toast } from "@tensamin/shared/log";
|
import { toast } from "@tensamin/shared/log";
|
||||||
import { isTauri } from "@tauri-apps/api/core";
|
import { isTauri } from "@tauri-apps/api/core";
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import {
|
||||||
Button,
|
Button,
|
||||||
Dialog,
|
Dialog,
|
||||||
DialogContent,
|
DialogContent,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import Wrapper from "@tensamin/user/wrapper";
|
import Wrapper from "@tensamin/user/wrapper";
|
||||||
import { PhoneIncoming, X } from "lucide-react";
|
import { PhoneIncoming, X } from "lucide-react";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import {
|
||||||
Button,
|
Button,
|
||||||
ContextMenu as UIContextMenu,
|
ContextMenu as UIContextMenu,
|
||||||
ContextMenuTrigger,
|
ContextMenuTrigger,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import {
|
import {
|
||||||
focusParticipant,
|
focusParticipant,
|
||||||
getRoomMetadata,
|
getRoomMetadata,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import {
|
||||||
ContextMenuItem,
|
ContextMenuItem,
|
||||||
ContextMenuSeparator,
|
ContextMenuSeparator,
|
||||||
Slider,
|
Slider,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import type { User } from "@tensamin/user/context";
|
import type { User } from "@tensamin/user/context";
|
||||||
import { useCall } from "../../store";
|
import { useCall } from "../../store";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import VideoViewer from "./videoViewer";
|
||||||
import { useLocation } from "@tanstack/react-router";
|
import { useLocation } from "@tanstack/react-router";
|
||||||
import { getRoom, stopWatchingStream, useCall } from "../store";
|
import { getRoom, stopWatchingStream, useCall } from "../store";
|
||||||
import { useState, useRef, useEffect, useCallback } from "react";
|
import { useState, useRef, useEffect, useCallback } from "react";
|
||||||
import { Button, cn } from "@tensamin/ui";
|
import { Button, cn } from "@methanium/ui";
|
||||||
import { ScreenShareOff } from "lucide-react";
|
import { ScreenShareOff } from "lucide-react";
|
||||||
|
|
||||||
function getTrackPublicationBySource(
|
function getTrackPublicationBySource(
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import {
|
||||||
SelectTrigger,
|
SelectTrigger,
|
||||||
SelectValue,
|
SelectValue,
|
||||||
Switch,
|
Switch,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import {
|
import {
|
||||||
type DesktopScreenShareAudioOutput,
|
type DesktopScreenShareAudioOutput,
|
||||||
type DesktopScreenShareCapabilities,
|
type DesktopScreenShareCapabilities,
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import {
|
||||||
TooltipContent,
|
TooltipContent,
|
||||||
TooltipTrigger,
|
TooltipTrigger,
|
||||||
useIsMobile,
|
useIsMobile,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import ScreenshareButton from "./buttons/screenshare";
|
import ScreenshareButton from "./buttons/screenshare";
|
||||||
import MuteButton from "./buttons/mute";
|
import MuteButton from "./buttons/mute";
|
||||||
import DeafButton from "./buttons/deaf";
|
import DeafButton from "./buttons/deaf";
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import {
|
||||||
Tooltip,
|
Tooltip,
|
||||||
TooltipContent,
|
TooltipContent,
|
||||||
TooltipTrigger,
|
TooltipTrigger,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
|
|
||||||
export default function TopBar() {
|
export default function TopBar() {
|
||||||
const { get } = useUser();
|
const { get } = useUser();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { VideoTrack, useParticipantTracks } from "@livekit/components-react";
|
import { VideoTrack, useParticipantTracks } from "@livekit/components-react";
|
||||||
import { TrackPublication } from "livekit-client";
|
import { TrackPublication } from "livekit-client";
|
||||||
import { getRoom } from "../store";
|
import { getRoom } from "../store";
|
||||||
import { cn } from "@tensamin/ui";
|
import { cn } from "@methanium/ui";
|
||||||
import { Loader2 } from "lucide-react";
|
import { Loader2 } from "lucide-react";
|
||||||
|
|
||||||
export default function VideoViewer({
|
export default function VideoViewer({
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Button } from "@tensamin/ui";
|
import { Button } from "@methanium/ui";
|
||||||
import Emoji from "@tensamin/markdown/emoji";
|
import Emoji from "@tensamin/markdown/emoji";
|
||||||
import { getRecentEmojis, useEmojiRanks } from "./emojiRanks";
|
import { getRecentEmojis, useEmojiRanks } from "./emojiRanks";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import {
|
||||||
TabsContent,
|
TabsContent,
|
||||||
TabsList,
|
TabsList,
|
||||||
TabsTrigger,
|
TabsTrigger,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import { useStorage } from "@tensamin/storage/context";
|
import { useStorage } from "@tensamin/storage/context";
|
||||||
import { Loader2, Search } from "lucide-react";
|
import { Loader2, Search } from "lucide-react";
|
||||||
import MediaSaveButton from "./mediaSaveButton";
|
import MediaSaveButton from "./mediaSaveButton";
|
||||||
|
|
|
||||||
|
|
@ -9,16 +9,16 @@ import {
|
||||||
PopoverContent,
|
PopoverContent,
|
||||||
PopoverTrigger,
|
PopoverTrigger,
|
||||||
Skeleton,
|
Skeleton,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import { useStorage } from "@tensamin/storage/context";
|
import { useStorage } from "@tensamin/storage/context";
|
||||||
import React, { useEffect, useState, useRef } from "react";
|
import React, { useEffect, useState, useRef } from "react";
|
||||||
import { Button } from "@tensamin/ui";
|
import { Button } from "@methanium/ui";
|
||||||
|
|
||||||
import { Plus, Laugh, FileVideo, Forward, X } from "lucide-react";
|
import { Plus, Laugh, FileVideo, Forward, X } from "lucide-react";
|
||||||
import { useChat, useReplyMessage } from "../context";
|
import { useChat, useReplyMessage } from "../context";
|
||||||
import { useMTP } from "@tensamin/mtp";
|
import { useMTP } from "@tensamin/mtp";
|
||||||
import { log, toast } from "@tensamin/shared/log";
|
import { log, toast } from "@tensamin/shared/log";
|
||||||
import { cn, useIsMobile } from "@tensamin/ui";
|
import { cn, useIsMobile } from "@methanium/ui";
|
||||||
import { encryptChatText } from "@tensamin/crypto/chatSecret";
|
import { encryptChatText } from "@tensamin/crypto/chatSecret";
|
||||||
|
|
||||||
import { useSession } from "@tensamin/storage/session";
|
import { useSession } from "@tensamin/storage/session";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import Text from "@tensamin/markdown/text";
|
import Text from "@tensamin/markdown/text";
|
||||||
import { useStorage } from "@tensamin/storage/context";
|
import { useStorage } from "@tensamin/storage/context";
|
||||||
import { Tooltip, TooltipContent, TooltipTrigger } from "@tensamin/ui";
|
import { Tooltip, TooltipContent, TooltipTrigger } from "@methanium/ui";
|
||||||
import { TriangleAlert } from "lucide-react";
|
import { TriangleAlert } from "lucide-react";
|
||||||
import { useState, useMemo, useEffect } from "react";
|
import { useState, useMemo, useEffect } from "react";
|
||||||
import MediaSaveButton from "./mediaSaveButton";
|
import MediaSaveButton from "./mediaSaveButton";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Button, cn } from "@tensamin/ui";
|
import { Button, cn } from "@methanium/ui";
|
||||||
import { useStorage } from "@tensamin/storage/context";
|
import { useStorage } from "@tensamin/storage/context";
|
||||||
import { Save } from "lucide-react";
|
import { Save } from "lucide-react";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import {
|
||||||
Button,
|
Button,
|
||||||
cn,
|
cn,
|
||||||
Skeleton,
|
Skeleton,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import MessageContextMenu from "./messageContextMenu";
|
import MessageContextMenu from "./messageContextMenu";
|
||||||
import Media from "./media";
|
import Media from "./media";
|
||||||
import { useStorage } from "@tensamin/storage/context";
|
import { useStorage } from "@tensamin/storage/context";
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import {
|
||||||
TooltipContent,
|
TooltipContent,
|
||||||
TooltipTrigger,
|
TooltipTrigger,
|
||||||
useIsMobile,
|
useIsMobile,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import {
|
import {
|
||||||
Clipboard,
|
Clipboard,
|
||||||
Ellipsis,
|
Ellipsis,
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import {
|
||||||
type RawMessage,
|
type RawMessage,
|
||||||
} from "./values";
|
} from "./values";
|
||||||
import Wrapper from "@tensamin/user/wrapper";
|
import Wrapper from "@tensamin/user/wrapper";
|
||||||
import { Skeleton } from "@tensamin/ui";
|
import { Skeleton } from "@methanium/ui";
|
||||||
|
|
||||||
type MessageChunk = {
|
type MessageChunk = {
|
||||||
key: string;
|
key: string;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { describe, expect, it, vi } from "vitest";
|
import { describe, expect, it, vi } from "vitest";
|
||||||
import type { ReactNode } from "react";
|
import type { ReactNode } from "react";
|
||||||
|
|
||||||
vi.mock("@tensamin/ui", () => ({
|
vi.mock("@methanium/ui", () => ({
|
||||||
Tooltip: ({ children }: { children: ReactNode }) => children,
|
Tooltip: ({ children }: { children: ReactNode }) => children,
|
||||||
TooltipContent: ({ children }: { children: ReactNode }) => children,
|
TooltipContent: ({ children }: { children: ReactNode }) => children,
|
||||||
TooltipTrigger: ({ render }: { render: ReactNode }) => render,
|
TooltipTrigger: ({ render }: { render: ReactNode }) => render,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import twemoji from "@twemoji/api";
|
import twemoji from "@twemoji/api";
|
||||||
import { Tooltip, TooltipContent, TooltipTrigger } from "@tensamin/ui";
|
import { Tooltip, TooltipContent, TooltipTrigger } from "@methanium/ui";
|
||||||
import { resolveEmoji } from "./emojiData";
|
import { resolveEmoji } from "./emojiData";
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import { MTPClient } from "mtp";
|
||||||
import { type z } from "zod";
|
import { type z } from "zod";
|
||||||
import { ConnectionState } from "mtp";
|
import { ConnectionState } from "mtp";
|
||||||
import createAsyncQueue from "@tensamin/shared/asyncQueue";
|
import createAsyncQueue from "@tensamin/shared/asyncQueue";
|
||||||
import { toast as sonnerToast } from "@tensamin/ui";
|
import { toast as sonnerToast } from "@methanium/ui";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
type Calls,
|
type Calls,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { useChat } from "@tensamin/chat/context";
|
||||||
import { useMTP } from "@tensamin/mtp";
|
import { useMTP } from "@tensamin/mtp";
|
||||||
import { createContext, useEffect, useContext } from "react";
|
import { createContext, useEffect, useContext } from "react";
|
||||||
import { toast as sonnerToast } from "sonner";
|
import { toast as sonnerToast } from "sonner";
|
||||||
import { Avatar, AvatarFallback, AvatarImage } from "@tensamin/ui";
|
import { Avatar, AvatarFallback, AvatarImage } from "@methanium/ui";
|
||||||
import { isTauri } from "@tauri-apps/api/core";
|
import { isTauri } from "@tauri-apps/api/core";
|
||||||
import { useSession } from "@tensamin/storage/session";
|
import { useSession } from "@tensamin/storage/session";
|
||||||
import { useNavigate } from "@tanstack/react-router";
|
import { useNavigate } from "@tanstack/react-router";
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
import { useCallback, useEffect, useState, type ReactNode } from "react";
|
import { useCallback, useEffect, useState, type ReactNode } from "react";
|
||||||
import {
|
import {
|
||||||
CreateScreen,
|
|
||||||
ErrorScreen,
|
ErrorScreen,
|
||||||
Link,
|
LoadingScreen,
|
||||||
OnboardingFlow,
|
OnboardingFlow,
|
||||||
Spinner,
|
|
||||||
type OnboardingStep,
|
type OnboardingStep,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import { useStorage } from "@tensamin/storage/context";
|
import { useStorage } from "@tensamin/storage/context";
|
||||||
import { legalDocsSchema } from "@tensamin/shared/features/legal/schema";
|
import { legalDocsSchema } from "@tensamin/shared/features/legal/schema";
|
||||||
import { log } from "@tensamin/shared/log";
|
import { log } from "@tensamin/shared/log";
|
||||||
|
|
@ -19,7 +17,7 @@ export {
|
||||||
useOnboardingStep,
|
useOnboardingStep,
|
||||||
type OnboardingStep,
|
type OnboardingStep,
|
||||||
type OnboardingStepControls,
|
type OnboardingStepControls,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
|
|
||||||
type LegalDocs = z.infer<typeof legalDocsSchema>;
|
type LegalDocs = z.infer<typeof legalDocsSchema>;
|
||||||
|
|
||||||
|
|
@ -137,20 +135,7 @@ export default function OnboardingGate({ children }: { children: ReactNode }) {
|
||||||
|
|
||||||
if (!state) {
|
if (!state) {
|
||||||
if (!showLoading) return null;
|
if (!showLoading) return null;
|
||||||
return (
|
return <LoadingScreen noProgress title="Fetching legal documents..." />;
|
||||||
<CreateScreen>
|
|
||||||
<div className="flex flex-col items-center gap-3">
|
|
||||||
<Spinner className="size-8" />
|
|
||||||
<p className="text-sm text-muted-foreground">
|
|
||||||
Fetching legal documents...
|
|
||||||
</p>
|
|
||||||
<Link
|
|
||||||
label="status.methanium.net"
|
|
||||||
link="https://status.methanium.net"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</CreateScreen>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const steps: OnboardingStep[] = [];
|
const steps: OnboardingStep[] = [];
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import { useCallback, useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
import { Checkbox, Label, Link } from "@tensamin/ui";
|
import { Checkbox, Label, Link } from "@methanium/ui";
|
||||||
import { legalDocsSchema } from "@tensamin/shared/features/legal/schema";
|
import { legalDocsSchema } from "@tensamin/shared/features/legal/schema";
|
||||||
import type { z } from "zod";
|
import type { z } from "zod";
|
||||||
|
|
||||||
import { useOnboardingStep } from "@tensamin/ui";
|
import { useOnboardingStep } from "@methanium/ui";
|
||||||
|
|
||||||
type LegalDocs = z.infer<typeof legalDocsSchema>;
|
type LegalDocs = z.infer<typeof legalDocsSchema>;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import type { OnboardingStep } from "@tensamin/ui";
|
import type { OnboardingStep } from "@methanium/ui";
|
||||||
import OnboardingPage from "./pages/onboarding";
|
import OnboardingPage from "./pages/onboarding";
|
||||||
|
|
||||||
// Add future onboarding pages here. Completed users skip this entire manifest.
|
// Add future onboarding pages here. Completed users skip this entire manifest.
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
- Make the legal loader use ldrs line wobble to better fit to the LoadingScreen from @tensamin/ui
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { EditableList, LabeledSwitch } from "@tensamin/ui";
|
import { EditableList, LabeledSwitch } from "@methanium/ui";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
import { storageDefaults, type Storage } from "@tensamin/shared/data";
|
import { storageDefaults, type Storage } from "@tensamin/shared/data";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { Outlet, useLocation, useNavigate } from "@tanstack/react-router";
|
import { Outlet, useLocation, useNavigate } from "@tanstack/react-router";
|
||||||
import { Button, ClearStorageButton, cn, useIsMobile } from "@tensamin/ui";
|
import { Button, ClearStorageButton, cn, useIsMobile } from "@methanium/ui";
|
||||||
|
|
||||||
import { settingsNavigation } from "./manifest";
|
import { settingsNavigation } from "./manifest";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { createCache } from "@tensamin/cache";
|
||||||
import { storageDefaults } from "@tensamin/shared/data";
|
import { storageDefaults } from "@tensamin/shared/data";
|
||||||
import { useStorage } from "@tensamin/storage/context";
|
import { useStorage } from "@tensamin/storage/context";
|
||||||
import { secureValueCodec } from "@tensamin/storage/secure";
|
import { secureValueCodec } from "@tensamin/storage/secure";
|
||||||
import { Button, Input, Label } from "@tensamin/ui";
|
import { Button, Input, Label } from "@methanium/ui";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
const validLimit = (value: number) => Number.isSafeInteger(value) && value >= 0;
|
const validLimit = (value: number) => Number.isSafeInteger(value) && value >= 0;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { storageDefaults } from "@tensamin/shared/data";
|
import { storageDefaults } from "@tensamin/shared/data";
|
||||||
import { useStorage } from "@tensamin/storage/context";
|
import { useStorage } from "@tensamin/storage/context";
|
||||||
import { Button, Kbd } from "@tensamin/ui";
|
import { Button, Kbd } from "@methanium/ui";
|
||||||
import { List, Switch } from "../components";
|
import { List, Switch } from "../components";
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useIsMobile } from "@tensamin/ui";
|
import { useIsMobile } from "@methanium/ui";
|
||||||
import { SettingsSidebar } from "../layout";
|
import { SettingsSidebar } from "../layout";
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogContent, DialogTrigger } from "@tensamin/ui";
|
import { Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogContent, DialogTrigger } from "@methanium/ui";
|
||||||
import { generatedAt, packageCount, packages } from "../../../../licenses/third-party-credits.json";
|
import { generatedAt, packageCount, packages } from "../../../../licenses/third-party-credits.json";
|
||||||
|
|
||||||
const licenseTexts = import.meta.glob("../../../../licenses/**/*", { eager: true, import: "default", query: "?raw" }) as Record<string, string>;
|
const licenseTexts = import.meta.glob("../../../../licenses/**/*", { eager: true, import: "default", query: "?raw" }) as Record<string, string>;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import MDInput from "@tensamin/markdown/input";
|
||||||
import { useMTP } from "@tensamin/mtp";
|
import { useMTP } from "@tensamin/mtp";
|
||||||
import { mtp } from "@tensamin/shared/data";
|
import { mtp } from "@tensamin/shared/data";
|
||||||
import { useStorage } from "@tensamin/storage/context";
|
import { useStorage } from "@tensamin/storage/context";
|
||||||
import { Avatar, AvatarFallback, AvatarImage, Button, cn, Input, useIsMobile } from "@tensamin/ui";
|
import { Avatar, AvatarFallback, AvatarImage, Button, cn, Input, useIsMobile } from "@methanium/ui";
|
||||||
import { useUser, type User } from "@tensamin/user/context";
|
import { useUser, type User } from "@tensamin/user/context";
|
||||||
import { Check } from "lucide-react";
|
import { Check } from "lucide-react";
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { useStorage } from "@tensamin/storage/context";
|
import { useStorage } from "@tensamin/storage/context";
|
||||||
import { Button, Input, Label } from "@tensamin/ui";
|
import { Button, Input, Label } from "@methanium/ui";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { StylePicker } from "@tensamin/ui";
|
import { StylePicker } from "@methanium/ui";
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return <div className="overflow-y-auto"><StylePicker /><div className="absolute bottom-0 right-0 mb-3 mr-2"><a className="block w-60 text-xs whitespace-pre-wrap" href="https://git.methanium.net/tensamin/client/issues/new" target="_blank" rel="noreferrer">Please open a Git issue to help us improve this feature. We want to get it right.</a></div></div>;
|
return <div className="overflow-y-auto"><StylePicker /><div className="absolute bottom-0 right-0 mb-3 mr-2"><a className="block w-60 text-xs whitespace-pre-wrap" href="https://git.methanium.net/tensamin/client/issues/new" target="_blank" rel="noreferrer">Please open a Git issue to help us improve this feature. We want to get it right.</a></div></div>;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { toast as sonnerToast } from "@tensamin/ui";
|
import { toast as sonnerToast } from "@methanium/ui";
|
||||||
import { Ban, Check, Info, TriangleAlert } from "lucide-react";
|
import { Ban, Check, Info, TriangleAlert } from "lucide-react";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import {
|
||||||
getDatabaseEntry,
|
getDatabaseEntry,
|
||||||
setDatabaseEntry,
|
setDatabaseEntry,
|
||||||
} from "@tensamin/shared/indexedDb";
|
} from "@tensamin/shared/indexedDb";
|
||||||
import { ErrorScreen } from "@tensamin/ui";
|
import { ErrorScreen } from "@methanium/ui";
|
||||||
import { log } from "@tensamin/shared/log";
|
import { log } from "@tensamin/shared/log";
|
||||||
import {
|
import {
|
||||||
decodeSecureValue,
|
decodeSecureValue,
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import {
|
||||||
DialogFooter,
|
DialogFooter,
|
||||||
DialogHeader,
|
DialogHeader,
|
||||||
DialogTitle,
|
DialogTitle,
|
||||||
} from "@tensamin/ui";
|
} from "@methanium/ui";
|
||||||
import { useLocation, useNavigate } from "@tanstack/react-router";
|
import { useLocation, useNavigate } from "@tanstack/react-router";
|
||||||
import { useDeeplinks } from "@tensamin/tauri/deeplinkHandler";
|
import { useDeeplinks } from "@tensamin/tauri/deeplinkHandler";
|
||||||
import { useMTP } from "@tensamin/mtp";
|
import { useMTP } from "@tensamin/mtp";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue