File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 easyConnectServerIpDomain ,
44 easyConnectID ,
55 handleEasyConnectClient ,
6+ handleEasyConnectHost ,
67 DEFAULT_EASY_CONNECT_ID ,
78 DEFAULT_EASY_CONNECT_SERVER_IP_DOMAIN
89 } from ' $lib/easy_connect/easy_connect.svelte' ;
910
1011 import { _ } from ' svelte-i18n' ;
1112 import { onMount } from ' svelte' ;
1213
14+ const { role }: {role: " CLIENT" | " HOST" } = $props ()
15+
1316 onMount (() => {
1417 easyConnectID .value = DEFAULT_EASY_CONNECT_ID ;
1518 easyConnectServerIpDomain .value = DEFAULT_EASY_CONNECT_SERVER_IP_DOMAIN ;
1619 });
17-
20+
1821 </script >
1922
2023 <section
6669 />
6770 </div >
6871
69- <button onclick ={handleEasyConnectClient } class =" btn btn-primary"
70- >{$_ (' connect-to-host' )}</button
71- >
72+ {#if role === " CLIENT" }
73+ <button onclick ={handleEasyConnectClient } class =" btn btn-primary"
74+ >{$_ (' connect-to-host' )}</button >
75+ {:else }
76+ <button onclick ={handleEasyConnectHost } class =" btn btn-primary"
77+ >{$_ (' connect-to-client' )}</button >
78+ {/if }
79+
80+
7281 </section >
7382 </li >
7483 </ol >
Original file line number Diff line number Diff line change 7373</div >
7474
7575<div class =" mt-0 grid md:grid-cols-5 gap-4 card rounded-lg shadow-xl border border-gray-800 p-2" >
76- <EasyConnect />
76+ <EasyConnect role = " CLIENT " />
7777 <section class =" md:col-span-2 md:pt-8 card border rounded-lg shadow-xl bg-white border-gray-700" >
7878 <div class =" card-body" >
7979 <section class =" flex flex-col md:flex-row [& >ol]:px-4" >
Original file line number Diff line number Diff line change 7373</div >
7474
7575<div class =" mt-0 grid md:grid-cols-5 gap-4 card rounded-lg shadow-xl border border-gray-800 p-2" >
76- <EasyConnect />
76+ <EasyConnect role = " HOST " />
7777 <section class =" md:col-span-2 md:pt-8 card border rounded-lg shadow-xl bg-white border-gray-700" >
7878 <div class =" card-body" >
7979 <section class =" flex flex-col md:flex-row [& >ol]:px-4" >
You can’t perform that action at this time.
0 commit comments