about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Pages/About.razor
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-07-12 00:18:56 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-07-12 00:18:56 +0200
commit0e43e947ca8be0e529f2505a66143cb8b1fcbb8e (patch)
tree6fc7af3f8b7387ff5e10401f521946316f1fe5f5 /MatrixRoomUtils.Web/Pages/About.razor
parentLocal changes (diff)
downloadMatrixUtils-0e43e947ca8be0e529f2505a66143cb8b1fcbb8e.tar.xz
Changes
Diffstat (limited to 'MatrixRoomUtils.Web/Pages/About.razor')
-rw-r--r--MatrixRoomUtils.Web/Pages/About.razor32
1 files changed, 31 insertions, 1 deletions
diff --git a/MatrixRoomUtils.Web/Pages/About.razor b/MatrixRoomUtils.Web/Pages/About.razor
index cf43c4f..b8d9c4a 100644
--- a/MatrixRoomUtils.Web/Pages/About.razor
+++ b/MatrixRoomUtils.Web/Pages/About.razor
@@ -1,7 +1,9 @@
 @page "/About"
 @using System.Net
+@using System.Net.Sockets
 @inject NavigationManager NavigationManager
 @inject ILocalStorageService LocalStorage
+@using XtermBlazor
 
 <PageTitle>About</PageTitle>
 
@@ -20,6 +22,9 @@
     <p>This deployment also serves a copy of the compiled, hosting-ready binaries at <a href="MRU-SRC.tar.xz">/MRU-SRC.tar.xz</a>!</p>
 }
 
+<Xterm @ref="_terminal" Options="_options" OnFirstRender="@OnFirstRender"  style="max-width: fit-content; overflow-x: hidden;"/>
+
+
 
 @code {
     private bool showBinDownload { get; set; }
@@ -34,4 +39,29 @@
         await base.OnInitializedAsync();
     }
 
-}
\ No newline at end of file
+
+    private Xterm _terminal;
+
+    private TerminalOptions _options = new TerminalOptions
+    {
+        CursorBlink = true,
+        CursorStyle = CursorStyle.Block,
+        Theme =
+        {
+            Background = "#17615e",
+        },
+    };
+
+    private async Task OnFirstRender() {
+        var message = "Hello, World!\nThis is a terminal emulator!\n\nYou can type stuff here, and it will be sent to the server!\n\nThis is a test of the emergency broadcast system.\n\nThis is only a t";
+        _terminal.Options.RendererType = RendererType.Dom;
+        _terminal.Options.ScreenReaderMode = true;
+        TcpClient.
+        for (var i = 0; i < message.Length; i++) {
+            await _terminal.Write(message[i].ToString());
+
+            await Task.Delay(50);
+            _terminal.Options.Theme.Background = $"#{(i * 2):X6}";
+        }
+    }
+}