feat: deeplinks

This commit is contained in:
neoapps-dev
2026-06-16 19:20:50 +03:00
parent 6312fb4540
commit 38fca607fd
18 changed files with 1003 additions and 392 deletions
+18 -2
View File
@@ -17,7 +17,14 @@ import { TauriService } from "../../services/TauriService";
import ChooseInstanceModal from "../modals/ChooseInstanceModal";
import QRCode from "qrcode";
const LceLiveView = memo(function LceLiveView() {
interface LceLiveViewProps {
addFriendTarget?: string | null;
onClearAddFriendTarget?: () => void;
}
const LceLiveView = memo(function LceLiveView({
addFriendTarget,
onClearAddFriendTarget,
}: LceLiveViewProps) {
const { setActiveView } = useUI();
const { animationsEnabled } = useConfig();
const { playPressSound, playBackSound } = useAudio();
@@ -37,7 +44,7 @@ const LceLiveView = memo(function LceLiveView() {
);
const [linkError, setLinkError] = useState<string | null>(null);
const [isHosting, setIsHosting] = useState(false);
const [hostStatus, setHostStatus] = useState("");
const [_hostStatus, setHostStatus] = useState("");
const [hostIp, setHostIp] = useState("");
const [hostPort, setHostPort] = useState(19132);
const [isDiscovering, setIsDiscovering] = useState(false);
@@ -392,6 +399,15 @@ const LceLiveView = memo(function LceLiveView() {
showHostMethodPicker,
]);
useEffect(() => {
if (!addFriendTarget) return;
setCurrentTab("friends");
handleAction(() =>
lceLiveService.sendFriendRequest(addFriendTarget),
);
onClearAddFriendTarget?.();
}, [addFriendTarget, onClearAddFriendTarget]);
const tabs: ("friends" | "requests" | "invites")[] = [
"friends",
"requests",
File diff suppressed because it is too large Load Diff