- Elsa.Studio.Wasm project (net9.0): WASM shell with Login/Dashboard/Workflows modules,
reads its backend URL from a JS-injected window.getClientConfig() so the same build
can point at any origin without a rebuild.
- Elsa.CustomServer:
- references Elsa.Studio.Wasm as a project so `dotnet publish` emits its wwwroot/
- UseBlazorFrameworkFiles + MapFallbackToPage('/_Host') serve the WASM app + SPA routes
- Pages/_Host.cshtml renders the Studio shell and injects apiUrl at request time
- Bumped Elsa server packages to 3.5.3, Studio packages to 3.7.0 (Studio release train
moved ahead of server; 3.7 Studio is compatible with 3.5 server API)
- Dockerfile: SDK/runtime 9.0, restores both csprojs before copying sources
60 lines
3.0 KiB
Plaintext
60 lines
3.0 KiB
Plaintext
@page "/"
|
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@inject IConfiguration Configuration
|
|
@{
|
|
// The Studio talks to the API on the same origin. HTTP__BASEURL sets the public URL;
|
|
// Hosting:ApiPrefix defaults to /elsa/api which is where AddWorkflowsApi mounts.
|
|
var baseUrl = Configuration["Hosting:BaseUrl"] ?? Configuration["Http:BaseUrl"] ?? "";
|
|
var apiPrefix = (Configuration["Hosting:ApiPrefix"] ?? "elsa/api").TrimStart('/');
|
|
var apiUrl = string.IsNullOrEmpty(baseUrl)
|
|
? "/" + apiPrefix
|
|
: baseUrl.TrimEnd('/') + "/" + apiPrefix;
|
|
}
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
<title>Elsa Studio</title>
|
|
<base href="/" />
|
|
<link rel="apple-touch-icon" sizes="180x180" href="_content/Elsa.Studio.Shell/apple-touch-icon.png">
|
|
<link rel="icon" type="image/png" sizes="32x32" href="_content/Elsa.Studio.Shell/favicon-32x32.png">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="_content/Elsa.Studio.Shell/favicon-16x16.png">
|
|
<link rel="manifest" href="_content/Elsa.Studio.Shell/site.webmanifest">
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
|
|
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap" rel="stylesheet">
|
|
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
|
|
<link href="_content/CodeBeam.MudBlazor.Extensions/MudExtensions.min.css" rel="stylesheet" />
|
|
<link href="_content/Radzen.Blazor/css/material-base.css" rel="stylesheet">
|
|
<link href="_content/Elsa.Studio.Shell/css/shell.css" rel="stylesheet">
|
|
<link href="_content/Elsa.Studio.Workflows.Designer/designer.css" rel="stylesheet">
|
|
</head>
|
|
<body>
|
|
<div id="app">
|
|
<div class="loading-splash mud-container mud-container-maxwidth-false">
|
|
<h5 class="mud-typography mud-typography-h5 mud-primary-text my-6">Loading...</h5>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="blazor-error-ui">
|
|
An unhandled error has occurred.
|
|
<a href="" class="reload">Reload</a>
|
|
<a class="dismiss">🗙</a>
|
|
</div>
|
|
<script src="_content/BlazorMonaco/jsInterop.js"></script>
|
|
<script src="_content/BlazorMonaco/lib/monaco-editor/min/vs/loader.js"></script>
|
|
<script src="_content/BlazorMonaco/lib/monaco-editor/min/vs/editor/editor.main.js"></script>
|
|
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
|
|
<script src="_content/CodeBeam.MudBlazor.Extensions/MudExtensions.min.js"></script>
|
|
<script src="_content/Radzen.Blazor/Radzen.Blazor.js"></script>
|
|
<script>
|
|
window.getClientConfig = function () { return { "apiUrl": "@apiUrl" }; };
|
|
</script>
|
|
<script src="_framework/blazor.webassembly.js"></script>
|
|
</body>
|
|
</html>
|