revert wrong merge for installer

This commit is contained in:
Bjarke Berg
2023-11-01 12:22:52 +01:00
parent 985799068b
commit 2856dc19a4

View File

@@ -1,64 +1,80 @@
@using Microsoft.Extensions.Options;
@using Umbraco.Cms.Core
@using Umbraco.Cms.Core.Configuration
@using Umbraco.Cms.Core.Configuration.Models
@using Umbraco.Cms.Core.Hosting
@using Umbraco.Cms.Core.WebAssets
@using Umbraco.Cms.Infrastructure.WebAssets
@using Umbraco.Cms.Web.BackOffice.Controllers
@using Umbraco.Cms.Web.BackOffice.Security
@using Umbraco.Extensions
@inject BackOfficeServerVariables backOfficeServerVariables
@inject IUmbracoVersion umbracoVersion
@inject IHostingEnvironment hostingEnvironment
@inject IOptions<GlobalSettings> globalSettings
@inject IBackOfficeExternalLoginProviders externalLogins
@inject IRuntimeMinifier runtimeMinifier
@{
var backOfficePath = globalSettings.Value.GetBackOfficePath(hostingEnvironment);
Layout = null;
}
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<base href="@backOfficePath.EnsureEndsWith('/')" />
<base href="@ViewData.GetUmbracoBaseFolder()/" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Umbraco</title>
@Html.Raw(await runtimeMinifier.RenderCssHereAsync(BackOfficeWebAssets.UmbracoUpgradeCssBundleName))
@*Because we're lazy loading angular js, the embedded cloak style will not be loaded initially, but we need it*@
<style>
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
display: none !important;
}
</style>
<title>Install Umbraco</title>
<link rel="stylesheet" href="assets/css/installer.min.css" />
<link rel="stylesheet" href="lib/nouislider/nouislider.min.css" />
</head>
<body id="umbracoMainPageBody" ng-controller="Umbraco.AuthorizeUpgradeController" class="login-only">
<umb-login on-login="loginAndRedirect()"></umb-login>
<body ng-class="{loading:installer.loading}" ng-controller="Umbraco.InstallerController" id="umbracoInstallPageBody">
<umb-notifications></umb-notifications>
<img src="assets/img/application/umbraco_logomark_white.svg" width="32" height="32" alt="Umbraco" draggable="false" id="logo" />
@{
var externalLoginUrl = Url.Action("ExternalLogin", "BackOffice", new
{
area = ViewData.GetUmbracoPath(),
//Custom redirect URL since we don't want to just redirect to the back office since this is for authing upgrades
redirectUrl = Url.Action("AuthorizeUpgrade", "BackOffice")
});
}
<umb-loader position="bottom"
class="umb-installer-loader"
ng-if="installer.loading"
ng-style="{'width': installer.progress}">
</umb-loader>
@await Html.BareMinimumServerVariablesScriptAsync(backOfficeServerVariables)
<div id="overlay" ng-cloak ng-animate="'fade'" ng-show="installer.done"></div>
@*And finally we can load in our angular app*@
<script type="text/javascript" src="lib/lazyload-js/LazyLoad.min.js"></script>
<script src="@Url.GetUrlWithCacheBust("Application", "BackOffice", null!, hostingEnvironment, umbracoVersion, runtimeMinifier)"></script>
<div id="installer"
ng-cloak
ng-animate="'fade'"
ng-show="installer.configuring">
<div id="contentwrapper" ng-if="installer.current" ng-switch on="installer.current.view">
<div ng-switch-when="ysod">
<h1>A server error occurred</h1>
<p>This is most likely due to an error during application startup</p>
<iframe id="ysod" title="Error details"></iframe>
</div>
<div ng-switch-default>
<div ng-include="installer.current.view"></div>
</div>
</div>
</div>
<div ng-cloak ng-animate="'fade'" id="fact" class="absolute-center clearfix" ng-show="installer.fact">
<h2>Did you know</h2>
<p ng-bind-html="installer.fact"></p>
</div>
<h3 ng-cloak ng-animate="'fade'" id="feedback" ng-show="installer.feedback">{{installer.feedback}}</h3>
<div id="missinglazyload" style="display: none;">
<h3>There has been a problem with the build.</h3>
<p>This might be because you could be offline or on a slow connection. Please try the following steps</p>
<ol>
<li>Make sure you have <a href="https://nodejs.org" target="_blank">Node.js</a> installed.</li>
<li>Open command prompt and cd to \src\Umbraco.Web.UI.Client.</li>
<li>Check to see if \src\Umbraco.Web.UI.Client\node_modules folder exists (this could be hidden); if so, delete it.</li>
<li>Run npm ci; if successfull the node_modules folder should be created in the Umbraco.Web.UI.Client directory.</li>
<li>Run \build\build.ps1.</li>
</ol>
</div>
<script type="text/javascript">
var Umbraco = {};
Umbraco.Sys = {};
Umbraco.Sys.ServerVariables = {
"installApiBaseUrl": "@ViewData.GetInstallApiBaseUrl()",
"umbracoBaseUrl": "@ViewData.GetUmbracoBaseFolder()",
"application": {
version: "@ViewData.GetUmbracoVersion()?.Major"
}
};
</script>
<script src="lib/lazyload-js/LazyLoad.min.js"></script>
<script src="js/install.loader.min.js"></script>
</body>
</html>