V14: Remove old backoffice project. (#15752)
* Move magical route to management api * Move auth around * Remove "New" cookies, as they are no longer needed * Move all installer related * Remove BackOfficeServerVariables.cs and trees * Move webhooks to management api * Remove remainting controllers * Remove last services * Move preview to management api * Remove mroe extensions * Remove tours * Remove old Auth handlers * Remove server variables entirely * Remove old backoffice controller * Remove controllers namespace entirely * Move rest of preview * move last services * Move language file extension * Remove old backoffice entirely (Backoffice and Web.UI projects) * Clean up unused security classes * Fix up installer route * Remove obsolete tests * Fix up DI in integration test * Add missing property mapping * Move core mapping into core * Add composers to integration test * remove identity * Fix up DI * Outcomment failing test :) * Fix up remaining test * Update mapper * Remove the actual project files * Remove backoffice cs proj * Remove old backoffice from yml * Run belissima before login * Remove caching * Refactor file paths * Remove belle from static assets * Dont refer to old project in templates * update gitignore * Add missing files * Remove install view as its no longer used * Fix up failing test * Remove outcommented code * Update submodule to latest * fix build --------- Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
@@ -9,23 +9,16 @@
|
||||
<ItemGroup>
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
<ProjectReference Include="..\Umbraco.Cms.Api.Management\Umbraco.Cms.Api.Management.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Web.BackOffice\Umbraco.Web.BackOffice.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<BasePath>$(ProjectDir)wwwroot\umbraco</BasePath>
|
||||
<BellePath>$(BasePath)\lib</BellePath>
|
||||
<BellissimaPath>$(BasePath)\backoffice</BellissimaPath>
|
||||
<LoginPath>$(BasePath)\login</LoginPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="BuildStaticAssetsPreconditions" BeforeTargets="Build">
|
||||
<Message Text="Skip BuildBelle target because UmbracoBuild is '$(UmbracoBuild)' (this is not Visual Studio)" Importance="high" Condition="'$(UmbracoBuild)' != ''" />
|
||||
<Message Text="Skip BuildBelle target because '$(BellePath)' already exists" Importance="high" Condition="Exists('$(BellePath)')" />
|
||||
<Message Text="Call BuildBelle target because UmbracoBuild is empty (this is Visual Studio) and '$(BellePath)' doesn't exist" Importance="high" Condition="'$(UmbracoBuild)' == '' and !Exists('$(BellePath)')" />
|
||||
<CallTarget Targets="BuildBelle" Condition="'$(UmbracoBuild)' == '' and !Exists('$(BellePath)')" />
|
||||
|
||||
<Message Text="Skip BuildBellissima target because UmbracoBuild is '$(UmbracoBuild)' (this is not Visual Studio)" Importance="high" Condition="'$(UmbracoBuild)' != ''" />
|
||||
<Message Text="Skip BuildBellissima target because '$(BellissimaPath)' already exists" Importance="high" Condition="Exists('$(BellissimaPath)')" />
|
||||
<Message Text="Call BuildBellissima target because UmbracoBuild is empty (this is Visual Studio) and '$(BellissimaPath)' doesn't exist" Importance="high" Condition="'$(UmbracoBuild)' == '' and !Exists('$(BellissimaPath)')" />
|
||||
@@ -37,11 +30,6 @@
|
||||
<CallTarget Targets="BuildLogin" Condition="'$(UmbracoBuild)' == '' and (!Exists('$(LoginPath)') or !Exists('$(BasePath)/auth'))" />
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildBelle">
|
||||
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.Client\" Command="npm ci --no-fund --no-audit --prefer-offline" />
|
||||
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.Client\" Command="npm run build:skip-tests" />
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildBellissima">
|
||||
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.New.Client\" Command="npm ci --no-fund --no-audit --prefer-offline" />
|
||||
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.New.Client\" Command="npm run build:for:cms" />
|
||||
@@ -54,10 +42,6 @@
|
||||
</Target>
|
||||
|
||||
<Target Name="CleanStaticAssetsPreconditions" AfterTargets="Clean" Condition="'$(UmbracoBuild)' == ''">
|
||||
<Message Text="Skip CleanBelle target because '$(BellePath)' doesn't exist" Importance="high" Condition="!Exists('$(BellePath)')" />
|
||||
<Message Text="Skip CleanBelle target because preserve.belle marker file exists" Importance="high" Condition="Exists('$(BellePath)') and Exists('$(SolutionDir)preserve.belle')" />
|
||||
<Message Text="Call CleanBelle target because '$(BellePath)' exists and preserve.belle marker file doesn't exist" Importance="high" Condition="Exists('$(BellePath)') and !Exists('$(SolutionDir)preserve.belle')" />
|
||||
<CallTarget Targets="CleanBelle" Condition="Exists('$(BellePath)') and !Exists('$(SolutionDir)preserve.belle')" />
|
||||
|
||||
<Message Text="Skip CleanBellissima target because '$(BellissimaPath)' doesn't exist" Importance="high" Condition="!Exists('$(BellissimaPath)')" />
|
||||
<Message Text="Skip CleanBellissima target because preserve.bellissima marker file exists" Importance="high" Condition="Exists('$(BellissimaPath)') and Exists('$(SolutionDir)preserve.bellissima')" />
|
||||
@@ -70,13 +54,6 @@
|
||||
<CallTarget Targets="CleanLogin" Condition="(Exists('$(LoginPath)') or Exists('$(BasePath)/auth')) and !Exists('$(SolutionDir)preserve.login')" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CleanBelle">
|
||||
<ItemGroup>
|
||||
<BelleDirectories Include="$(BasePath)/js;$(BasePath)/lib;$(BasePath)/assets;$(BasePath)/views;" />
|
||||
</ItemGroup>
|
||||
<RemoveDir Directories="@(BelleDirectories)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CleanBellissima">
|
||||
<ItemGroup>
|
||||
<BellissimaDirectories Include="$(BellissimaPath);" />
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
@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);
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="@backOfficePath.EnsureEndsWith('/')" />
|
||||
<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>
|
||||
|
||||
</head>
|
||||
<body id="umbracoMainPageBody" ng-controller="Umbraco.AuthorizeUpgradeController" class="login-only">
|
||||
|
||||
<umb-login on-login="loginAndRedirect()"></umb-login>
|
||||
|
||||
<umb-notifications></umb-notifications>
|
||||
|
||||
@{
|
||||
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")
|
||||
});
|
||||
}
|
||||
|
||||
@await Html.BareMinimumServerVariablesScriptAsync(backOfficeServerVariables)
|
||||
|
||||
<script type="text/javascript">
|
||||
document.angularReady = function (app) {
|
||||
|
||||
@await Html.AngularValueExternalLoginInfoScriptAsync(externalLogins, ViewData.GetExternalSignInProviderErrors()!)
|
||||
@Html.AngularValueResetPasswordCodeInfoScript(ViewData[ViewDataExtensions.TokenPasswordResetCode]!)
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@*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>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,35 +0,0 @@
|
||||
@using System.Globalization
|
||||
@using Umbraco.Cms.Core.Manifest
|
||||
@using Umbraco.Cms.Core.Serialization
|
||||
@using Umbraco.Cms.Web.Common.Hosting
|
||||
@using Umbraco.Extensions
|
||||
@inject IBackOfficePathGenerator BackOfficePathGenerator
|
||||
@inject IPackageManifestService PackageManifestService
|
||||
@inject IJsonSerializer JsonSerializer
|
||||
|
||||
@{
|
||||
var backOfficePath = BackOfficePathGenerator.BackOfficePath;
|
||||
var backOfficeAssetsPath = BackOfficePathGenerator.BackOfficeAssetsPath;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="@CultureInfo.CurrentCulture.Name">
|
||||
|
||||
<head>
|
||||
<base href="@backOfficePath.EnsureEndsWith('/')" />
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="@backOfficeAssetsPath/assets/favicon.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Umbraco</title>
|
||||
|
||||
<link rel="stylesheet" href="@backOfficeAssetsPath/css/umb-css.css" />
|
||||
<link rel="stylesheet" href="@backOfficeAssetsPath/css/uui-css.css" />
|
||||
@await Html.BackOfficeImportMapScriptAsync(JsonSerializer, BackOfficePathGenerator, PackageManifestService)
|
||||
<script type="module" src="@backOfficeAssetsPath/apps/app/app.element.js"></script>
|
||||
</head>
|
||||
|
||||
<body class="uui-font uui-text" style="margin: 0; padding: 0; overflow: hidden">
|
||||
<umb-app culture="@CultureInfo.CurrentCulture.Name"></umb-app>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,4 +1,5 @@
|
||||
@using System.Globalization
|
||||
@using Umbraco.Cms.Api.Management.Extensions
|
||||
@using Umbraco.Cms.Core.Manifest
|
||||
@using Umbraco.Cms.Core.Serialization
|
||||
@using Umbraco.Cms.Web.Common.Hosting
|
||||
@@ -1,114 +0,0 @@
|
||||
@using Microsoft.Extensions.Options;
|
||||
@using Umbraco.Cms.Core.Configuration
|
||||
@using Umbraco.Cms.Core.Configuration.Models
|
||||
@using Umbraco.Cms.Core.Hosting
|
||||
@using Umbraco.Cms.Core.Logging
|
||||
@using Umbraco.Cms.Core.Services
|
||||
@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 IBackOfficeSignInManager SignInManager
|
||||
@inject BackOfficeServerVariables BackOfficeServerVariables
|
||||
@inject IUmbracoVersion UmbracoVersion
|
||||
@inject IHostingEnvironment HostingEnvironment
|
||||
@inject IOptions<GlobalSettings> GlobalSettings
|
||||
@inject IRuntimeMinifier RuntimeMinifier
|
||||
@inject IProfilerHtml ProfilerHtml
|
||||
@inject ILocalizedTextService LocalizedTextService
|
||||
|
||||
@model Umbraco.Cms.Core.Editors.BackOfficePreviewModel
|
||||
@{
|
||||
var disableDevicePreview = Model?.DisableDevicePreview.ToString().ToLowerInvariant();
|
||||
|
||||
var EndLabel = LocalizedTextService.Localize("preview", "endLabel");
|
||||
var EndTitle = LocalizedTextService.Localize("preview", "endTitle");
|
||||
var OpenWebsiteLabel = LocalizedTextService.Localize("preview", "openWebsiteLabel");
|
||||
var OpenWebsiteTitle = LocalizedTextService.Localize("preview", "openWebsiteTitle");
|
||||
var returnToPreviewHeadline = LocalizedTextService.Localize("preview", "returnToPreviewHeadline");
|
||||
var returnToPreviewDescription = LocalizedTextService.Localize("preview", "returnToPreviewDescription");
|
||||
var returnToPreviewAcceptButton = LocalizedTextService.Localize("preview", "returnToPreviewAcceptButton");
|
||||
var returnToPreviewDeclineButton = LocalizedTextService.Localize("preview", "returnToPreviewDeclineButton");
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Umbraco Preview</title>
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<meta name="pinterest" content="nopin" />
|
||||
|
||||
@Html.Raw(await RuntimeMinifier.RenderCssHereAsync(BackOfficeWebAssets.UmbracoPreviewCssBundleName))
|
||||
|
||||
<script type="text/javascript">
|
||||
window.umbLocalizedVars = {
|
||||
'returnToPreviewHeadline': '@returnToPreviewHeadline',
|
||||
'returnToPreviewDescription':'@returnToPreviewDescription',
|
||||
'returnToPreviewAcceptButton':'@returnToPreviewAcceptButton',
|
||||
'returnToPreviewDeclineButton':'@returnToPreviewDeclineButton'
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body id="canvasdesignerPanel" ng-mouseover="outlinePositionHide()" ng-controller="previewController" ng-class="{'tabbing-active': tabbingActive === true}" ng-click="windowClickHandler($event)">
|
||||
<div class="wait" ng-show="!frameLoaded"></div>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(Model?.PreviewExtendedHeaderView))
|
||||
{
|
||||
@await Html.PartialAsync(Model.PreviewExtendedHeaderView)
|
||||
}
|
||||
|
||||
<div id="demo-iframe-wrapper" class="{{previewDevice.css}}">
|
||||
<preview-i-frame src="pageUrl" on-loaded="onFrameLoaded(iframe)"></preview-i-frame>
|
||||
</div>
|
||||
<div class="canvasdesigner" ng-init="showDevicesPreview = true; showDevices = !@(disableDevicePreview);" ng-mouseenter="positionSelectedHide()">
|
||||
<div class="menu-bar selected">
|
||||
|
||||
<div class="menu-bar__title">Preview Mode</div>
|
||||
|
||||
<div class="menu-bar__right-part">
|
||||
|
||||
<div class="preview-menu-option" ng-class="{'--open': sizeOpen === true}" ng-click="$event.stopPropagation()">
|
||||
<button class="menu-bar__button umb-outline" ng-click="toggleSizeOpen()"><i class="icon {{previewDevice.icon}}"></i><span>{{previewDevice.title}}</span></button>
|
||||
<div class="dropdown-menu">
|
||||
<button ng-repeat="device in devices" class="menu-bar__button umb-outline" ng-class="{ '--active':previewDevice === device }" ng-click="updatePreviewDevice(device)">
|
||||
<i class="icon {{device.icon}}"></i><span>{{device.title}}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (Model?.Languages.Any() == true)
|
||||
{
|
||||
<div class="preview-menu-option" ng-class="{'--open': cultureOpen === true}" ng-click="$event.stopPropagation()">
|
||||
<button class="menu-bar__button umb-outline" ng-click="toggleCultureOpen()"><i class="icon icon-globe-europe---africa"></i><span>{{currentCulture.title}}</span></button>
|
||||
<div class="dropdown-menu">
|
||||
@foreach (var language in Model.Languages)
|
||||
{
|
||||
<button class="menu-bar__button umb-outline" ng-class="{ '--active': currentCultureIso === '@language.IsoCode' || (@language.IsDefault.ToString().ToLower() && currentCultureIso === null) }" ng-click="changeCulture('@language.IsoCode')" ng-init="registerCulture('@language.IsoCode', '@language.CultureName', @language.IsDefault.ToString().ToLower())">
|
||||
<i class="icon icon-globe-europe---africa"></i><span>@language.CultureName</span>
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<button ng-click="openInBrowser()" title="@OpenWebsiteTitle" class="menu-bar__button umb-outline">
|
||||
<i class="icon icon-out"></i><span>@OpenWebsiteLabel</span>
|
||||
</button>
|
||||
|
||||
<button ng-click="exitPreview()" title="@EndTitle" class="menu-bar__button umb-outline">
|
||||
<i class="icon icon-power"></i><span>@EndLabel</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@await Html.BareMinimumServerVariablesScriptAsync(BackOfficeServerVariables)
|
||||
|
||||
<script src="../lib/lazyload-js/LazyLoad.min.js"></script>
|
||||
<script src="@Url.GetUrlWithCacheBust("Application", "Preview", null!, HostingEnvironment, UmbracoVersion, RuntimeMinifier)"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user