From f4bed1e6cbba39e62329fc859037d8a754ce855a Mon Sep 17 00:00:00 2001 From: Adam R Grey Date: Mon, 8 Apr 2024 15:00:55 -0400 Subject: [PATCH] contain web interface stuff --- Program.cs | 7 +++++++ {Views => WebInterface/Views}/Channels/Index.cshtml | 0 {Views => WebInterface/Views}/Home/Index.cshtml | 0 {Views => WebInterface/Views}/Shared/Error.cshtml | 0 {Views => WebInterface/Views}/Shared/_Layout.cshtml | 0 {Views => WebInterface/Views}/Shared/_Layout.cshtml.css | 0 .../Views}/Shared/_ValidationScriptsPartial.cshtml | 0 {Views => WebInterface/Views}/Users/Details.cshtml | 0 {Views => WebInterface/Views}/Users/Index.cshtml | 0 {Views => WebInterface/Views}/_ViewImports.cshtml | 0 {Views => WebInterface/Views}/_ViewStart.cshtml | 0 11 files changed, 7 insertions(+) rename {Views => WebInterface/Views}/Channels/Index.cshtml (100%) rename {Views => WebInterface/Views}/Home/Index.cshtml (100%) rename {Views => WebInterface/Views}/Shared/Error.cshtml (100%) rename {Views => WebInterface/Views}/Shared/_Layout.cshtml (100%) rename {Views => WebInterface/Views}/Shared/_Layout.cshtml.css (100%) rename {Views => WebInterface/Views}/Shared/_ValidationScriptsPartial.cshtml (100%) rename {Views => WebInterface/Views}/Users/Details.cshtml (100%) rename {Views => WebInterface/Views}/Users/Index.cshtml (100%) rename {Views => WebInterface/Views}/_ViewImports.cshtml (100%) rename {Views => WebInterface/Views}/_ViewStart.cshtml (100%) diff --git a/Program.cs b/Program.cs index cc937bf..39428cd 100644 --- a/Program.cs +++ b/Program.cs @@ -1,3 +1,4 @@ +using Microsoft.AspNetCore.Mvc.Razor; using Microsoft.EntityFrameworkCore; using vassago.Models; @@ -7,6 +8,11 @@ var builder = WebApplication.CreateBuilder(args); builder.Services.AddControllersWithViews(); builder.Services.AddSingleton(); builder.Services.AddDbContext(); +builder.Services.Configure(o => { + o.ViewLocationFormats.Clear(); + o.ViewLocationFormats.Add("/WebInterface/Views/{1}/{0}" + RazorViewEngine.ViewExtension); + o.ViewLocationFormats.Add("/WebInterface/Views/Shared/{0}" + RazorViewEngine.ViewExtension); +}); var app = builder.Build(); @@ -23,4 +29,5 @@ app.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); + app.Run(); diff --git a/Views/Channels/Index.cshtml b/WebInterface/Views/Channels/Index.cshtml similarity index 100% rename from Views/Channels/Index.cshtml rename to WebInterface/Views/Channels/Index.cshtml diff --git a/Views/Home/Index.cshtml b/WebInterface/Views/Home/Index.cshtml similarity index 100% rename from Views/Home/Index.cshtml rename to WebInterface/Views/Home/Index.cshtml diff --git a/Views/Shared/Error.cshtml b/WebInterface/Views/Shared/Error.cshtml similarity index 100% rename from Views/Shared/Error.cshtml rename to WebInterface/Views/Shared/Error.cshtml diff --git a/Views/Shared/_Layout.cshtml b/WebInterface/Views/Shared/_Layout.cshtml similarity index 100% rename from Views/Shared/_Layout.cshtml rename to WebInterface/Views/Shared/_Layout.cshtml diff --git a/Views/Shared/_Layout.cshtml.css b/WebInterface/Views/Shared/_Layout.cshtml.css similarity index 100% rename from Views/Shared/_Layout.cshtml.css rename to WebInterface/Views/Shared/_Layout.cshtml.css diff --git a/Views/Shared/_ValidationScriptsPartial.cshtml b/WebInterface/Views/Shared/_ValidationScriptsPartial.cshtml similarity index 100% rename from Views/Shared/_ValidationScriptsPartial.cshtml rename to WebInterface/Views/Shared/_ValidationScriptsPartial.cshtml diff --git a/Views/Users/Details.cshtml b/WebInterface/Views/Users/Details.cshtml similarity index 100% rename from Views/Users/Details.cshtml rename to WebInterface/Views/Users/Details.cshtml diff --git a/Views/Users/Index.cshtml b/WebInterface/Views/Users/Index.cshtml similarity index 100% rename from Views/Users/Index.cshtml rename to WebInterface/Views/Users/Index.cshtml diff --git a/Views/_ViewImports.cshtml b/WebInterface/Views/_ViewImports.cshtml similarity index 100% rename from Views/_ViewImports.cshtml rename to WebInterface/Views/_ViewImports.cshtml diff --git a/Views/_ViewStart.cshtml b/WebInterface/Views/_ViewStart.cshtml similarity index 100% rename from Views/_ViewStart.cshtml rename to WebInterface/Views/_ViewStart.cshtml