diff --git a/.gitignore b/.gitignore index 7352bae..cc9b627 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,10 @@ backend-0.1.2-218.zip backend-0.1.2.zip postgresql-17.2-3-windows-x64.exe jsTesting +dotnetwrapper/bin +dotnetwrapper/obj +dotnetwrapper/wwwroot +prodBuild # ---> Node diff --git a/dotnetwrapper/Program.cs b/dotnetwrapper/Program.cs new file mode 100644 index 0000000..35dd6b8 --- /dev/null +++ b/dotnetwrapper/Program.cs @@ -0,0 +1,26 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. +builder.Services.AddControllersWithViews(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +// if (!app.Environment.IsDevelopment()) +// { +// // app.UseExceptionHandler("/Home/Error"); +// // app.UseHsts(); +// } + +// app.UseHttpsRedirection(); // to force https + +app.UseStaticFiles(); +app.UseRouting(); +app.MapFallbackToFile("index.html"); + +app.Run(); \ No newline at end of file diff --git a/dotnetwrapper/Properties/launchSettings.json b/dotnetwrapper/Properties/launchSettings.json new file mode 100644 index 0000000..3a712cd --- /dev/null +++ b/dotnetwrapper/Properties/launchSettings.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:3000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:3000;http://localhost:3000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/dotnetwrapper/appsettings.json b/dotnetwrapper/appsettings.json new file mode 100644 index 0000000..23160a4 --- /dev/null +++ b/dotnetwrapper/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/dotnetwrapper/lst-wrapper.csproj b/dotnetwrapper/lst-wrapper.csproj new file mode 100644 index 0000000..124a4b0 --- /dev/null +++ b/dotnetwrapper/lst-wrapper.csproj @@ -0,0 +1,27 @@ + + + + net9.0 + enable + enable + + + + + + + + + + + + + + diff --git a/dotnetwrapper/lst-wrapper.sln b/dotnetwrapper/lst-wrapper.sln new file mode 100644 index 0000000..fe8ea86 --- /dev/null +++ b/dotnetwrapper/lst-wrapper.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.2.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lst-wrapper", "lst-wrapper.csproj", "{073770C2-0E50-484C-BB72-0A7B602D10B7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {073770C2-0E50-484C-BB72-0A7B602D10B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {073770C2-0E50-484C-BB72-0A7B602D10B7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {073770C2-0E50-484C-BB72-0A7B602D10B7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {073770C2-0E50-484C-BB72-0A7B602D10B7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {39D31A4B-FECC-425A-9AD5-95EF563F5BE7} + EndGlobalSection +EndGlobal \ No newline at end of file diff --git a/frontend/src/components/layout/side-components/header.tsx b/frontend/src/components/layout/side-components/header.tsx index 9ca8efd..4564ab9 100644 --- a/frontend/src/components/layout/side-components/header.tsx +++ b/frontend/src/components/layout/side-components/header.tsx @@ -1,5 +1,10 @@ -import {Link} from "@tanstack/react-router"; -import {SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem} from "../../ui/sidebar"; +import { Link } from "@tanstack/react-router"; +import { + SidebarHeader, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, +} from "../../ui/sidebar"; export function Header() { return ( @@ -9,10 +14,16 @@ export function Header() {
- Description + Description
- Logistics Support Tool + + Logistics Support Tool + v2.0.0
diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index d5d1475..7c02ed1 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -1,16 +1,19 @@ import React from "react"; import ReactDOM from "react-dom/client"; import "./styles.css"; -import {RouterProvider, createRouter} from "@tanstack/react-router"; +import { RouterProvider, createRouter } from "@tanstack/react-router"; // Import the generated route tree -import {routeTree} from "./routeTree.gen"; -import {QueryClient, QueryClientProvider} from "@tanstack/react-query"; +import { routeTree } from "./routeTree.gen"; +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; // Create a client const queryClient = new QueryClient(); // Create a new router instance -const router = createRouter({routeTree}); +const router = createRouter({ + routeTree, + //basepath: import.meta.env.BASE_URL, // This is the key part! +}); // Register the router instance for type safety declare module "@tanstack/react-router" { diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 42a9318..e9ee1c9 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -17,6 +17,7 @@ export default defineConfig({ tailwindcss(), TanStackRouterVite({ target: "react", autoCodeSplitting: true }), ], + // base: "/lst", // this is whats showing in the ssl version and we need this to work on both versions that also have a port on them. resolve: { alias: { "@": path.resolve(__dirname, "./src"), diff --git a/server/scripts/zipUpBuild.ts b/server/scripts/zipUpBuild.ts index 00e2ec7..82313c5 100644 --- a/server/scripts/zipUpBuild.ts +++ b/server/scripts/zipUpBuild.ts @@ -37,6 +37,7 @@ const ignoreList = [ "frontend/components.json", //misc files "jsTesting", + "dotnetwrapper", ]; const shouldIgnore = (itemPath: any) => {