mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 15:39:46 +00:00
Refactored main components
This commit is contained in:
parent
426dbf27b3
commit
54191cb7da
30
app/MindWork AI Studio/App.razor
Normal file
30
app/MindWork AI Studio/App.razor
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
|
|
||||||
|
@* ReSharper disable Html.PathError *@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>MindWork AI Studio</title>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<base href="/"/>
|
||||||
|
|
||||||
|
<link rel="icon" type="image/png" href="favicon.png"/>
|
||||||
|
<link href="system/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
|
||||||
|
<link href="system/MudBlazor.Markdown/MudBlazor.Markdown.min.css" rel="stylesheet" />
|
||||||
|
<link href="app.css" rel="stylesheet" />
|
||||||
|
<HeadOutlet/>
|
||||||
|
<script src="diff.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body style="overflow: hidden;">
|
||||||
|
<Routes @rendermode="new InteractiveServerRenderMode(prerender: false)"/>
|
||||||
|
<script src="_framework/blazor.web.js" autostart="false"></script>
|
||||||
|
<script src="boot.js"></script>
|
||||||
|
<script src="system/MudBlazor/MudBlazor.min.js"></script>
|
||||||
|
<script src="system/MudBlazor.Markdown/MudBlazor.Markdown.min.js"></script>
|
||||||
|
<script src="app.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -1,28 +0,0 @@
|
|||||||
@* ReSharper disable Html.PathError *@
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<title>MindWork AI Studio</title>
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
||||||
<base href="/"/>
|
|
||||||
|
|
||||||
<link rel="icon" type="image/png" href="favicon.png"/>
|
|
||||||
<link href="system/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
|
|
||||||
<link href="system/MudBlazor.Markdown/MudBlazor.Markdown.min.css" rel="stylesheet" />
|
|
||||||
<link href="app.css" rel="stylesheet" />
|
|
||||||
<HeadOutlet/>
|
|
||||||
<script src="diff.js"></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="overflow: hidden;">
|
|
||||||
<Routes @rendermode="new InteractiveServerRenderMode(prerender: false)"/>
|
|
||||||
<script src="_framework/blazor.web.js" autostart="false"></script>
|
|
||||||
<script src="boot.js"></script>
|
|
||||||
<script src="system/MudBlazor/MudBlazor.min.js"></script>
|
|
||||||
<script src="system/MudBlazor.Markdown/MudBlazor.Markdown.min.js"></script>
|
|
||||||
<script src="app.js"></script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
@ -1,4 +1,4 @@
|
|||||||
using AIStudio.Components.Layout;
|
using AIStudio.Layout;
|
||||||
using AIStudio.Tools;
|
using AIStudio.Tools;
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
namespace AIStudio.Components.Layout;
|
|
||||||
|
|
||||||
public record NavBarItem(string Name, string Icon, Color IconColor, string Path, bool MatchAll);
|
|
@ -1,4 +1,7 @@
|
|||||||
@using AIStudio.Settings.DataModel
|
@using AIStudio.Settings.DataModel
|
||||||
|
@using Microsoft.AspNetCore.Components.Routing
|
||||||
|
@using MudBlazor
|
||||||
|
|
||||||
@inherits LayoutComponentBase
|
@inherits LayoutComponentBase
|
||||||
|
|
||||||
<MudPaper Height="calc(100vh);" Elevation="0">
|
<MudPaper Height="calc(100vh);" Elevation="0">
|
@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Components.Routing;
|
|||||||
|
|
||||||
using DialogOptions = AIStudio.Dialogs.DialogOptions;
|
using DialogOptions = AIStudio.Dialogs.DialogOptions;
|
||||||
|
|
||||||
namespace AIStudio.Components.Layout;
|
namespace AIStudio.Layout;
|
||||||
|
|
||||||
public partial class MainLayout : LayoutComponentBase, IMessageBusReceiver, IDisposable
|
public partial class MainLayout : LayoutComponentBase, IMessageBusReceiver, IDisposable
|
||||||
{
|
{
|
3
app/MindWork AI Studio/Layout/NavBarItem.cs
Normal file
3
app/MindWork AI Studio/Layout/NavBarItem.cs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
namespace AIStudio.Layout;
|
||||||
|
|
||||||
|
public record NavBarItem(string Name, string Icon, Color IconColor, string Path, bool MatchAll);
|
@ -1,6 +1,5 @@
|
|||||||
using AIStudio;
|
using AIStudio;
|
||||||
using AIStudio.Agents;
|
using AIStudio.Agents;
|
||||||
using AIStudio.Components;
|
|
||||||
using AIStudio.Settings;
|
using AIStudio.Settings;
|
||||||
using AIStudio.Tools;
|
using AIStudio.Tools;
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
<Router AppAssembly="typeof(Program).Assembly">
|
@using Microsoft.AspNetCore.Components.Routing
|
||||||
|
@using MudBlazor
|
||||||
|
|
||||||
|
<Router AppAssembly="typeof(Program).Assembly">
|
||||||
<Found Context="routeData">
|
<Found Context="routeData">
|
||||||
<RouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)"/>
|
<RouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)"/>
|
||||||
<FocusOnNavigate RouteData="routeData" Selector="h1"/>
|
<FocusOnNavigate RouteData="routeData" Selector="h1"/>
|
Loading…
Reference in New Issue
Block a user