about summary refs log tree commit diff
path: root/BugMine.Web/Pages
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-04-06 08:39:22 +0200
committerRory& <root@rory.gay>2024-04-06 08:39:22 +0200
commitc390119f0ec50591c0623e6a1a063c09b965d9cc (patch)
tree5e769d08103a53a36ffa7516ec4fa8f7ffac4a7f /BugMine.Web/Pages
parentInitial commit (diff)
downloadBugMine-c390119f0ec50591c0623e6a1a063c09b965d9cc.tar.xz
Start adding pages
Diffstat (limited to 'BugMine.Web/Pages')
-rw-r--r--BugMine.Web/Pages/Counter.razor19
-rw-r--r--BugMine.Web/Pages/Home.razor7
-rw-r--r--BugMine.Web/Pages/Index.razor20
-rw-r--r--BugMine.Web/Pages/Projects/Index.razor22
-rw-r--r--BugMine.Web/Pages/Projects/NewProject.razor25
-rw-r--r--BugMine.Web/Pages/Weather.razor60
6 files changed, 67 insertions, 86 deletions
diff --git a/BugMine.Web/Pages/Counter.razor b/BugMine.Web/Pages/Counter.razor
deleted file mode 100644
index 372905f..0000000
--- a/BugMine.Web/Pages/Counter.razor
+++ /dev/null
@@ -1,19 +0,0 @@
-@page "/counter"
-
-<PageTitle>Counter</PageTitle>
-
-<h1>Counter</h1>
-
-<p role="status">Current count: @currentCount</p>
-
-<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
-
-@code {
-    private int currentCount = 0;
-
-    private void IncrementCount()
-    {
-        currentCount++;
-    }
-
-}
\ No newline at end of file
diff --git a/BugMine.Web/Pages/Home.razor b/BugMine.Web/Pages/Home.razor
deleted file mode 100644
index dfcdf75..0000000
--- a/BugMine.Web/Pages/Home.razor
+++ /dev/null
@@ -1,7 +0,0 @@
-@page "/"
-
-<PageTitle>Home</PageTitle>
-
-<h1>Hello, world!</h1>
-
-Welcome to your new app.
\ No newline at end of file
diff --git a/BugMine.Web/Pages/Index.razor b/BugMine.Web/Pages/Index.razor
new file mode 100644
index 0000000..02f9cd2
--- /dev/null
+++ b/BugMine.Web/Pages/Index.razor
@@ -0,0 +1,20 @@
+@page "/"
+
+<PageTitle>Home</PageTitle>
+
+<h1>Welcome to BugMine!</h1>
+<p>BugMine is a bug/TODO tracker, built ontop of the <a href="https://matrix.org">[Matrix]</a> protocol.</p>
+
+@if (_debug) {
+    <p>Beware! This is a DEBUG build, here be dragons!</p>
+}
+
+@code {
+
+#if DEBUG
+    bool _debug = true;
+#else
+    bool _debug = false;
+#endif
+
+}
\ No newline at end of file
diff --git a/BugMine.Web/Pages/Projects/Index.razor b/BugMine.Web/Pages/Projects/Index.razor
new file mode 100644
index 0000000..a24747c
--- /dev/null
+++ b/BugMine.Web/Pages/Projects/Index.razor
@@ -0,0 +1,22 @@
+@page "/Projects"
+<h3>Projects</h3>
+
+@if (true) {
+    <p>There are no projects to display.</p>
+}
+
+<p>Did not find the project board you are looking for?</p>
+<LinkButton href="/Projects/New">Create new board</LinkButton>
+
+@code {
+
+    private List<Project> projects = new List<Project>();
+
+    
+
+    protected override async Task OnInitializedAsync() {
+        
+    }
+    
+    private class Project { }
+}
\ No newline at end of file
diff --git a/BugMine.Web/Pages/Projects/NewProject.razor b/BugMine.Web/Pages/Projects/NewProject.razor
new file mode 100644
index 0000000..529813e
--- /dev/null
+++ b/BugMine.Web/Pages/Projects/NewProject.razor
@@ -0,0 +1,25 @@
+@page "/Projects/New"
+@using LibMatrix.Responses
+@using BugMine.Web.Classes
+@using ArcaneLibs.Extensions
+<h3>New project</h3>
+
+<span>Project name: </span>
+<FancyTextBox bind-Value="@request.Name"></FancyTextBox>
+<br/>
+<span>Shortname: </span>
+<FancyTextBox bind-Value="@request.RoomAliasName"></FancyTextBox>
+<br/>
+
+@if (Constants.Debug) {
+    <span>Debug: </span>
+    <pre>
+        @request.ToJson()
+    </pre>
+    <br/>
+}
+
+@code {
+    private CreateRoomRequest request = new CreateRoomRequest();
+
+}
\ No newline at end of file
diff --git a/BugMine.Web/Pages/Weather.razor b/BugMine.Web/Pages/Weather.razor
deleted file mode 100644
index 6770b4c..0000000
--- a/BugMine.Web/Pages/Weather.razor
+++ /dev/null
@@ -1,60 +0,0 @@
-@page "/weather"
-@inject HttpClient Http
-
-<PageTitle>Weather</PageTitle>
-
-<h1>Weather</h1>
-
-<p>This component demonstrates fetching data from the server.</p>
-
-@if (forecasts == null)
-{
-    <p>
-        <em>Loading...</em>
-    </p>
-}
-else
-{
-    <table class="table">
-        <thead>
-        <tr>
-            <th>Date</th>
-            <th>Temp. (C)</th>
-            <th>Temp. (F)</th>
-            <th>Summary</th>
-        </tr>
-        </thead>
-        <tbody>
-        @foreach (var forecast in forecasts)
-        {
-            <tr>
-                <td>@forecast.Date.ToShortDateString()</td>
-                <td>@forecast.TemperatureC</td>
-                <td>@forecast.TemperatureF</td>
-                <td>@forecast.Summary</td>
-            </tr>
-        }
-        </tbody>
-    </table>
-}
-
-@code {
-    private WeatherForecast[]? forecasts;
-
-    protected override async Task OnInitializedAsync()
-    {
-        forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("sample-data/weather.json");
-    }
-
-    public class WeatherForecast
-    {
-        public DateOnly Date { get; set; }
-
-        public int TemperatureC { get; set; }
-
-        public string? Summary { get; set; }
-
-        public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
-    }
-
-}
\ No newline at end of file