Skip to content

Commit

Permalink
added send over internet option with webrtc
Browse files Browse the repository at this point in the history
  • Loading branch information
visnkmr committed Dec 14, 2023
1 parent b80236a commit e6ce73a
Show file tree
Hide file tree
Showing 3 changed files with 459 additions and 1 deletion.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"class-variance-authority": "^0.7.0",
"fastest-levenshtein": "^1.0.16",
"fuse.js": "^7.0.0",
"js-file-download": "^0.4.12",
"next-optimized-images": "3.0.0-canary.10",
"next-pwa": "^5.6.0",
"react-fast-marquee": "^1.6.0",
Expand All @@ -78,6 +79,7 @@
"react-lazy-load-image-component": "^1.6.0",
"react-toastify": "^9.1.3",
"react-wrap-balancer": "^1.0.0",
"simple-peer": "^9.11.1",
"toast-notification-js": "^1.0.3"
}
}
10 changes: 9 additions & 1 deletion src/components/initui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import axios from "axios"
import { Appslist } from './appslist';
import { DataTable } from './commits/data-table';
import { columns_full } from './commits/columns_full';
import Sow from './sow';
// let ft = (ipaddress:string):returnedjson=>{
// let { data,isError } = useQuery({
// // enabled:false,
Expand Down Expand Up @@ -52,7 +53,8 @@ export default function InitUI(){
const [toastv] = useGlobalState("toast-visible");
const [tablev] = useGlobalState("table-visible");
const [toastcontent] = useGlobalState("toast");
const [ufvis,setufvis] = useState(true);
const [ufvis,setufvis] = useState(false);
const [sowvis,setsowvis] = useState(false);
const [salvis,setsalvis] = useState(false);
// const [helpvis,sethvis] = useState(false);
const searchParams = useSearchParams();
Expand Down Expand Up @@ -272,6 +274,7 @@ export default function InitUI(){
</div>
<div className='flex justify-center'>
<div className='grid-flow-row m-5 gap-2'>
<Button className="rounded-md border shadow-md m-2" onClick={()=>{setsowvis(!sowvis)}}><Globe className='mr-2 h-4 w-4' />Send over internet</Button>
<Button variant={"destructive"} className="rounded-md border shadow-md m-2" onClick={()=>{setufvis(!ufvis)}}><Upload className='mr-2 h-4 w-4' />Upload</Button>
<Button className="rounded-md border shadow-md m-2 " onClick={()=>{forceUpdate}}><RefreshCcw className='mr-2 h-4 w-4' />Reload</Button>
<Button className="rounded-md border shadow-md m-2" onClick={()=>{setipvis(!ipvis)}}><Globe className='mr-2 h-4 w-4' />IP</Button>
Expand Down Expand Up @@ -327,6 +330,11 @@ export default function InitUI(){
</form>
</div>

</div>
<div className={`flex justify-center ${sowvis ? '' : 'hidden'}`}>

<Sow/>

</div>
<div className={`flex justify-center ${salvis ? '' : 'hidden'}`}>
<Appslist url={url}/>
Expand Down
Loading

0 comments on commit e6ce73a

Please sign in to comment.