Generate(
string org,
string app,
BootstrapGlobalResponse appGlobalState,
- string? frontendVersionOverride = null
+ string? appFrontendAssetBaseUrl = null
)
{
- var frontendUrl = frontendVersionOverride ?? "https://altinncdn.no/toolkits/altinn-app-frontend/4";
+ if (appFrontendAssetBaseUrl is null)
+ {
+ var htmlContentError = $$"""
+
+
+
+
+
+
+ {{org}} - {{app}}
+
+
+
+ Not implemented yet
+ Sorry, loading our built-in frontend is not yet supported. Please build and host frontend from the monorepo code yourself.
+ To serve a production-level/faster build with no hot-reloads:
+ cd src/App/frontend; yarn build; yarn serve 8080
+ To serve a slightly slower build with hot-reloads tailored for development:
+ cd src/App/frontend; yarn start
+ Then make sure to restart this app with:
+ studioctl run --dev-frontend
+
+
+ """;
+ return htmlContentError;
+ }
var featureToggles = await _frontendFeatures.GetFrontendFeatures();
var featureTogglesJson = JsonSerializer.Serialize(featureToggles, _jsonSerializerOptions);
@@ -71,7 +96,7 @@ public async Task Generate(
{{org}} - {{app}}
-
+
{{externalStylesheets}}{{customCssLinks}}
@@ -81,7 +106,7 @@ public async Task Generate(
window.featureToggles = {{featureTogglesJson}};
window.altinnAppGlobalData = {{globalDataJson}};
-
+
{{externalScripts}}{{customJsScripts}}