Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions PiperChat01
Submodule PiperChat01 added at 9f9015
15 changes: 11 additions & 4 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions frontend/src/components/friends/header/TopnavDashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
Clock,
Ban,
CircleDot,
Globe2,
} from "lucide-react";
import { useDispatch, useSelector } from "react-redux";
import { useTheme } from "../../../context/ThemeContext";
Expand Down Expand Up @@ -149,6 +150,27 @@ function TopnavDashboard({button_status, onToggleSidebar}) {
Blocked
</button>

<button
type="button"
onClick={() =>
change_option_value(
5,
"STRANGER CONNECT",
true,
"Start anonymous conversations with random online users instantly."
)
}
className={[
"flex items-center gap-2 rounded-2xl border px-3 py-2 text-xs font-extrabold tracking-wider transition",
active === 5
? "border-cyan-400/40 bg-cyan-500/10 text-cyan-200"
: "border-white/10 bg-white/5 text-white/60 hover:bg-white/10 hover:text-white",
].join(" ")}
>
<Globe2 className="h-4 w-4" />
Stranger Connect
</button>

<button
type="button"
onClick={() =>
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/components/friends/main/MainDashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { open_direct_message } from "../../../store/directMessageSlice";
import { API_BASE_URL } from "../../../config";
import { Input } from "../../ui/input";
import { Button } from "../../ui/button";
import StrangerConnect from "./StrangerConnect";

const OPTION_IMAGES = [
online_wumpus,
Expand Down Expand Up @@ -295,6 +296,10 @@ function MainDashboard({ user_relations }) {
const shouldShowList =
option_check === 0 ? filteredOptionData.length > 0 : option_status;

if (option_check === 5) {
return <StrangerConnect />;
}

return (
<>
{shouldShowList === false ? (
Expand Down
Loading
Loading