Forráskód Böngészése

Add customize cross-linking messages between main WebVM and Alpine

Alessandro Pignotti 8 hónapja
szülő
commit
2222951621

+ 1 - 0
src/lib/InformationTab.svelte

@@ -8,3 +8,4 @@
 	<li>Local/private <a class="underline" target="_blank" href="https://cheerpx.io/docs/guides/File-System-support">file storage</a></li>
 	<li><a class="underline" target="_blank" href="https://cheerpx.io/docs/guides/Networking">Networking</a> via <a class="underline" target="_blank" href="https://tailscale.com/">Tailscale</a></li>
 </ul>
+<slot></slot>

+ 3 - 1
src/lib/SideBar.svelte

@@ -48,7 +48,9 @@
 	</div>
 	<div class="flex flex-col gap-5 shrink-0 w-60 h-full z-10 p-2 bg-neutral-600 text-gray-100" class:hidden={!activeInfo}>
 		{#if activeInfo === 'Information'}
-			<InformationTab/>
+			<InformationTab>
+				<slot></slot>
+			</InformationTab>
 		{:else if activeInfo === 'Networking'}
 			<NetworkingTab on:connect/>
 		{:else if activeInfo === 'CPU'}

+ 3 - 1
src/lib/WebVM.svelte

@@ -327,7 +327,9 @@
 <main class="relative w-full h-full">
 	<Nav />
 	<div class="absolute top-10 bottom-0 left-0 right-0">
-		<SideBar on:connect={handleConnect} on:reset={handleReset}/>
+		<SideBar on:connect={handleConnect} on:reset={handleReset}>
+			<slot></slot>
+		</SideBar>
 		{#if configObj.needsDisplay}
 			<div class="absolute top-0 bottom-0 left-14 right-0">
 				<canvas class="w-full h-full cursor-none" id="display"></canvas>

+ 3 - 1
src/routes/+page.svelte

@@ -11,4 +11,6 @@ function handleProcessCreated(processCount)
 }
 </script>
 
-<WebVM configObj={configObj} processCallback={handleProcessCreated} cacheId="blocks_terminal" />
+<WebVM configObj={configObj} processCallback={handleProcessCreated} cacheId="blocks_terminal">
+	<p>Looking for a complete desktop experience? Try the new <a class="underline" href="/alpine.html" target="_blank">Alpine Linux</a> graphical WebVM</p>
+</WebVM>

+ 3 - 1
src/routes/alpine/+page.svelte

@@ -11,4 +11,6 @@ function handleProcessCreated(processCount)
 }
 </script>
 
-<WebVM configObj={configObj} processCallback={handleProcessCreated} cacheId="blocks_alpine" />
+<WebVM configObj={configObj} processCallback={handleProcessCreated} cacheId="blocks_alpine">
+	<p>Looking for something different? Try the classic <a class="underline" href="/" target="_blank">Debian Linux</a> terminal-based WebVM</p>
+</WebVM>