why do messenger style all of a sudden? I need omni search that glows up screen in modal
This commit is contained in:
@@ -16,6 +16,8 @@ export default function Terminal() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col flex-1">
|
<div className="flex flex-col flex-1">
|
||||||
|
<NavBar />
|
||||||
|
|
||||||
<div className="flex flex-row flex-1">
|
<div className="flex flex-row flex-1">
|
||||||
<SidePanel />
|
<SidePanel />
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Avatar, Dropdown, Menu } from 'antd';
|
import { Avatar, Dropdown, Menu } from 'antd';
|
||||||
import { FiLogOut } from 'react-icons/fi';
|
import { FiLogOut, FiSearch } from 'react-icons/fi';
|
||||||
import React, { useMemo, useRef, useState } from 'react';
|
import React, { useMemo, useRef, useState } from 'react';
|
||||||
|
|
||||||
import { FaSearch } from 'react-icons/fa';
|
import { FaPlus, FaSearch } from 'react-icons/fa';
|
||||||
import useAuth from '../../../../providers/AuthProvider';
|
import useAuth from '../../../../providers/AuthProvider';
|
||||||
import useElectron from '../../../../providers/ElectronProvider';
|
import useElectron from '../../../../providers/ElectronProvider';
|
||||||
import useSockets from '../../../../providers/SocketProvider';
|
import useSockets from '../../../../providers/SocketProvider';
|
||||||
@@ -19,7 +19,7 @@ export default function NavBar() {
|
|||||||
const { handleFlowState } = useSockets();
|
const { handleFlowState } = useSockets();
|
||||||
|
|
||||||
const inputRef = useRef<HTMLInputElement>(null);
|
const inputRef = useRef<HTMLInputElement>(null);
|
||||||
const [searchInput, setSearchInput] = useState<string>('');
|
const [searchQuery, setSearchQuery] = useState<string>('');
|
||||||
|
|
||||||
/** hide the search bar in the header so that it's cleaner for these two modes */
|
/** hide the search bar in the header so that it's cleaner for these two modes */
|
||||||
const shouldHideSearch = useMemo(() => {
|
const shouldHideSearch = useMemo(() => {
|
||||||
@@ -32,10 +32,6 @@ export default function NavBar() {
|
|||||||
inputRef.current?.focus();
|
inputRef.current?.focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSearchChange = (e) => {
|
|
||||||
setSearchInput(e.target.value);
|
|
||||||
};
|
|
||||||
|
|
||||||
// todo: do I need a mute mode? isn't that just flow state
|
// todo: do I need a mute mode? isn't that just flow state
|
||||||
// might confuse user overall
|
// might confuse user overall
|
||||||
const profileMenu = (
|
const profileMenu = (
|
||||||
@@ -100,14 +96,46 @@ export default function NavBar() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-row items-center bg-gray-100 p-4" id="titlebar">
|
<div
|
||||||
|
className="flex flex-row gap-3 items-center bg-gray-100 border-b border-b-200 p-4"
|
||||||
|
id="titlebar"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
onKeyDown={() => {
|
||||||
|
//
|
||||||
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
console.log('opening main app');
|
||||||
|
}}
|
||||||
|
role="presentation"
|
||||||
|
>
|
||||||
|
<NoTextLogo type="small" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="mx-auto flex flex-row items-center space-x-2 bg-gray-200 p-2 rounded w-[400px]">
|
||||||
|
<FiSearch className="text-xs text-gray-300" />
|
||||||
|
<input
|
||||||
|
placeholder="Search for people, channels, clips..."
|
||||||
|
className="flex-1 bg-transparent placeholder-gray-300 placeholder:text-xs focus:outline-none"
|
||||||
|
onChange={(e) => setSearchQuery(e.target.value)}
|
||||||
|
value={searchQuery}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
onClick={handleFlowState}
|
||||||
|
className="text-gray-300 text-xs p-3 transition-all hover:bg-gray-200"
|
||||||
|
>
|
||||||
|
flow state
|
||||||
|
</button>
|
||||||
|
|
||||||
<Dropdown overlay={profileMenu}>
|
<Dropdown overlay={profileMenu}>
|
||||||
<div className={'cursor-pointer'}>
|
<div className={'cursor-pointer'}>
|
||||||
{user.picture && (
|
{user.picture && (
|
||||||
<Avatar
|
<Avatar
|
||||||
key={`userHeaderProfilePicture`}
|
key={`userHeaderProfilePicture`}
|
||||||
className="shadow-md hover:scale-110 transition-all"
|
className="shadow-md hover:scale-110 transition-all"
|
||||||
size={'default'}
|
size={'large'}
|
||||||
alt={user.name}
|
alt={user.name}
|
||||||
src={user.picture}
|
src={user.picture}
|
||||||
shape="square"
|
shape="square"
|
||||||
@@ -116,28 +144,6 @@ export default function NavBar() {
|
|||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|
||||||
<span className="text-gray-600 font-semibold mx-auto">Channels</span>
|
|
||||||
|
|
||||||
{/* {!shouldHideSearch && (
|
|
||||||
<div className="mx-auto flex flex-row items-center space-x-2">
|
|
||||||
<FaSearch className="text-xs text-gray-300" />
|
|
||||||
<input
|
|
||||||
placeholder="Type / to search"
|
|
||||||
className="bg-transparent placeholder-gray-300 placeholder:text-xs focus:outline-none"
|
|
||||||
ref={inputRef}
|
|
||||||
onChange={onSearchChange}
|
|
||||||
value={searchInput}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)} */}
|
|
||||||
|
|
||||||
<button
|
|
||||||
onClick={handleFlowState}
|
|
||||||
className="text-gray-300 text-xs p-3 transition-all hover:bg-gray-200"
|
|
||||||
>
|
|
||||||
flow
|
|
||||||
</button>
|
|
||||||
|
|
||||||
{/* menu for the output options */}
|
{/* menu for the output options */}
|
||||||
{/* <Menu
|
{/* <Menu
|
||||||
open={menuOpen}
|
open={menuOpen}
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ export default function SidePanel() {
|
|||||||
// using merely for loading state...better to add to realtimeroom context?
|
// using merely for loading state...better to add to realtimeroom context?
|
||||||
const { rooms: initialRoomsFetch } = useRooms();
|
const { rooms: initialRoomsFetch } = useRooms();
|
||||||
|
|
||||||
const [searchQuery, setSearchQuery] = useState<string>('');
|
|
||||||
|
|
||||||
const { roomsMap, handleSelectLine, selectedLineId } = useRealTimeRooms();
|
const { roomsMap, handleSelectLine, selectedLineId } = useRealTimeRooms();
|
||||||
|
|
||||||
const [toggleTunedLines, allLines] = useMemo(() => {
|
const [toggleTunedLines, allLines] = useMemo(() => {
|
||||||
@@ -36,29 +34,8 @@ export default function SidePanel() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col w-[400px] relative group shadow-xl bg-white">
|
<div className="flex flex-col w-[400px] relative group shadow-xl bg-white">
|
||||||
<NavBar />
|
|
||||||
|
|
||||||
<div className="px-4 flex flex-row items-center gap-2 bg-gray-100">
|
|
||||||
<div className="flex flex-row items-center space-x-2 bg-gray-200 p-2 rounded flex-1">
|
|
||||||
<FiSearch className="text-xs text-gray-300" />
|
|
||||||
<input
|
|
||||||
placeholder="Search for people, channels, clips..."
|
|
||||||
className="flex-1 bg-transparent placeholder-gray-300 placeholder:text-xs focus:outline-none"
|
|
||||||
onChange={(e) => setSearchQuery(e.target.value)}
|
|
||||||
value={searchQuery}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button
|
|
||||||
className="flex flex-row gap-2 items-center justify-evenly
|
|
||||||
shadow-xl bg-gray-800 p-2 text-white text-xs"
|
|
||||||
>
|
|
||||||
<FaPlus />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* tuned in lines block */}
|
{/* tuned in lines block */}
|
||||||
<div className="flex flex-col border-b border-b-gray-100 pt-5 bg-gray-100 shadow-xl">
|
<div className="flex flex-col border-b border-b-gray-100 bg-gray-100 shadow-xl">
|
||||||
{/* tuned in header + general controls */}
|
{/* tuned in header + general controls */}
|
||||||
|
|
||||||
<Tooltip placement="right" title={'These are your active rooms...'}>
|
<Tooltip placement="right" title={'These are your active rooms...'}>
|
||||||
@@ -72,6 +49,13 @@ export default function SidePanel() {
|
|||||||
toggleTunedLines?.length || 0
|
toggleTunedLines?.length || 0
|
||||||
}/3`}</p>
|
}/3`}</p>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
<button
|
||||||
|
className="ml-auto flex flex-row items-center justify-evenly
|
||||||
|
shadow-xl bg-gray-800 p-2 text-white text-xs"
|
||||||
|
>
|
||||||
|
<FaPlus />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
@@ -109,19 +93,6 @@ export default function SidePanel() {
|
|||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
|
||||||
onKeyDown={() => {
|
|
||||||
//
|
|
||||||
}}
|
|
||||||
onClick={() => {
|
|
||||||
console.log('opening main app');
|
|
||||||
}}
|
|
||||||
role="presentation"
|
|
||||||
className="absolute bottom-5 left-5"
|
|
||||||
>
|
|
||||||
<NoTextLogo type="small" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user