diff --git a/src/Umbraco.Core/Configuration/Models/ContentSettings.cs b/src/Umbraco.Core/Configuration/Models/ContentSettings.cs index 1caa81d80a..93a97355d9 100644 --- a/src/Umbraco.Core/Configuration/Models/ContentSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/ContentSettings.cs @@ -156,6 +156,7 @@ namespace Umbraco.Cms.Core.Configuration.Models internal const bool StaticShowDeprecatedPropertyEditors = false; internal const string StaticLoginBackgroundImage = "assets/img/login.jpg"; internal const string StaticLoginLogoImage = "assets/img/application/umbraco_logo_white.svg"; + internal const bool StaticHideBackOfficeLogo = false; /// /// Gets or sets a value for the content notification settings. @@ -219,6 +220,12 @@ namespace Umbraco.Cms.Core.Configuration.Models [DefaultValue(StaticLoginLogoImage)] public string LoginLogoImage { get; set; } = StaticLoginLogoImage; + /// + /// Gets or sets a value indicating whether to hide the backoffice umbraco logo or not. + /// + [DefaultValue(StaticHideBackOfficeLogo)] + public bool HideBackOfficeLogo { get; set; } = StaticHideBackOfficeLogo; + /// /// Get or sets the model representing the global content version cleanup policy /// diff --git a/src/Umbraco.Web.BackOffice/Controllers/BackOfficeServerVariables.cs b/src/Umbraco.Web.BackOffice/Controllers/BackOfficeServerVariables.cs index 43723207d3..0d9d8b903d 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/BackOfficeServerVariables.cs @@ -100,7 +100,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers var keepOnlyKeys = new Dictionary { {"umbracoUrls", new[] {"authenticationApiBaseUrl", "serverVarsJs", "externalLoginsUrl", "currentUserApiBaseUrl", "previewHubUrl", "iconApiBaseUrl"}}, - {"umbracoSettings", new[] {"allowPasswordReset", "imageFileTypes", "maxFileSize", "loginBackgroundImage", "loginLogoImage", "canSendRequiredEmail", "usernameIsEmail", "minimumPasswordLength", "minimumPasswordNonAlphaNum"}}, + {"umbracoSettings", new[] {"allowPasswordReset", "imageFileTypes", "maxFileSize", "loginBackgroundImage", "loginLogoImage", "canSendRequiredEmail", "usernameIsEmail", "minimumPasswordLength", "minimumPasswordNonAlphaNum", "hideBackofficeLogo"}}, {"application", new[] {"applicationPath", "cacheBuster"}}, {"isDebuggingEnabled", new string[] { }}, {"features", new [] {"disabledFeatures"}} @@ -408,6 +408,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers {"allowPasswordReset", _securitySettings.AllowPasswordReset}, {"loginBackgroundImage", _contentSettings.LoginBackgroundImage}, {"loginLogoImage", _contentSettings.LoginLogoImage }, + {"hideBackofficeLogo", _contentSettings.HideBackOfficeLogo }, {"showUserInvite", _emailSender.CanSendRequiredEmail()}, {"canSendRequiredEmail", _emailSender.CanSendRequiredEmail()}, {"showAllowSegmentationForDocumentTypes", false}, diff --git a/src/Umbraco.Web.BackOffice/Services/ConflictingRouteService.cs b/src/Umbraco.Web.BackOffice/Services/ConflictingRouteService.cs index af8d0d877e..03451a60fd 100644 --- a/src/Umbraco.Web.BackOffice/Services/ConflictingRouteService.cs +++ b/src/Umbraco.Web.BackOffice/Services/ConflictingRouteService.cs @@ -1,6 +1,8 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Reflection; +using Microsoft.AspNetCore.Routing; using Umbraco.Cms.Core.Composing; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Web.Common.Attributes; @@ -11,11 +13,16 @@ namespace Umbraco.Cms.Web.BackOffice.Services public class ConflictingRouteService : IConflictingRouteService { private readonly TypeLoader _typeLoader; + private readonly IEnumerable _endpointDataSources; /// /// Initializes a new instance of the class. /// - public ConflictingRouteService(TypeLoader typeLoader) => _typeLoader = typeLoader; + public ConflictingRouteService(TypeLoader typeLoader, IEnumerable endpointDataSources) + { + _typeLoader = typeLoader; + _endpointDataSources = endpointDataSources; + } /// public bool HasConflictingRoutes(out string controllerName) diff --git a/src/Umbraco.Web.UI.Client/src/assets/img/application/umbraco_logomark_white.svg b/src/Umbraco.Web.UI.Client/src/assets/img/application/umbraco_logomark_white.svg index b27ae89e91..08c2264337 100644 --- a/src/Umbraco.Web.UI.Client/src/assets/img/application/umbraco_logomark_white.svg +++ b/src/Umbraco.Web.UI.Client/src/assets/img/application/umbraco_logomark_white.svg @@ -1,3 +1,3 @@ - - - + + + diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbappheader.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbappheader.directive.js index 6cf6dd85f3..01e199c572 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbappheader.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbappheader.directive.js @@ -16,6 +16,7 @@ { value: "assets/img/application/logo@2x.png" }, { value: "assets/img/application/logo@3x.png" } ]; + scope.hideBackofficeLogo = Umbraco.Sys.ServerVariables.umbracoSettings.hideBackofficeLogo; // when a user logs out or timesout evts.push(eventsService.on("app.notAuthenticated", function () { @@ -104,15 +105,26 @@ $timeout.cancel(scope.logoModal.timer); }; scope.hideLogoModal = function() { - $timeout.cancel(scope.logoModal.timer); - scope.logoModal.timer = $timeout(function () { - scope.logoModal.show = false; - }, 100); + if(scope.logoModal.show === true) { + $timeout.cancel(scope.logoModal.timer); + scope.logoModal.timer = $timeout(function () { + scope.logoModal.show = false; + }, 100); + } }; scope.stopClickEvent = function($event) { $event.stopPropagation(); }; + scope.toggleLogoModal = function() { + if(scope.logoModal.show) { + $timeout.cancel(scope.logoModal.timer); + scope.logoModal.show = false; + } else { + scope.showLogoModal(); + } + }; + } var directive = { diff --git a/src/Umbraco.Web.UI.Client/src/common/filters/simpleMarkdown.filter.js b/src/Umbraco.Web.UI.Client/src/common/filters/simpleMarkdown.filter.js new file mode 100644 index 0000000000..58d5b0ed91 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/filters/simpleMarkdown.filter.js @@ -0,0 +1,20 @@ +/** +* @ngdoc filter +* @name umbraco.filters.simpleMarkdown +* @description +* Used when rendering a string as Markdown as HTML (i.e. with ng-bind-html). Allows use of **bold**, *italics*, ![images](url) and [links](url) +**/ +angular.module("umbraco.filters").filter('simpleMarkdown', function () { + return function (text) { + if (!text) { + return ''; + } + + return text + .replace(/\*\*(.*)\*\*/gim, '$1') + .replace(/\*(.*)\*/gim, '$1') + .replace(/!\[(.*?)\]\((.*?)\)/gim, "$1") + .replace(/\[(.*?)\]\((.*?)\)/gim, "$1") + .replace(/\n/g, '
').trim(); + }; +}); diff --git a/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js b/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js index 09c1659775..24432ca261 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js @@ -30,9 +30,8 @@ for (var p = 0; p < tab.properties.length; p++) { var prop = tab.properties[p]; - if (dataModel[prop.alias]) { - prop.value = dataModel[prop.alias]; - } + + prop.value = dataModel[prop.alias]; } } @@ -53,9 +52,8 @@ for (var p = 0; p < tab.properties.length; p++) { var prop = tab.properties[p]; - if (prop.value) { - dataModel[prop.alias] = prop.value; - } + + dataModel[prop.alias] = prop.value; } } diff --git a/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js b/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js index a932888aa4..81d1818448 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js @@ -259,8 +259,8 @@ function navigationService($routeParams, $location, $q, $injector, eventsService var updated = false; retainedQueryStrings.forEach(r => { - // if mculture is set to null in nextRouteParams, the value will be undefined and we will not retain any query string that has a value of "null" - if (currRouteParams[r] && nextRouteParams[r] !== undefined && !nextRouteParams[r]) { + // testing explicitly for undefined in nextRouteParams here, as it must be possible to "unset" e.g. mculture by specifying a null value + if (currRouteParams[r] && nextRouteParams[r] === undefined) { toRetain[r] = currRouteParams[r]; updated = true; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-app-header.less b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-app-header.less index bb346fc402..6e1fa29eab 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/application/umb-app-header.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/application/umb-app-header.less @@ -9,11 +9,18 @@ .umb-app-header__logo { margin-right: 30px; + flex-shrink: 0; button { img { height: 30px; } } + +} +@media (max-width: 1279px) { + .umb-app-header__logo { + display: none; + } } .umb-app-header__logo-modal { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-package-local-install.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-package-local-install.less index ead54ac49f..43f3c5e353 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-package-local-install.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-package-local-install.less @@ -9,44 +9,51 @@ color: @gray-5; } -.umb-upload-local__dropzone { - position: relative; - width: 500px; - height: 300px; - border: 2px dashed @ui-action-border; - border-radius: 3px; - background: @white; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - margin-bottom: 30px; - transition: 100ms box-shadow ease, 100ms border ease; +.umb-upload-local { - &.drag-over { - border-color: @ui-action-border-hover; - border-style: solid; - box-shadow: 0 3px 8px rgba(0,0,0, .1); + &__dropzone { + position: relative; + width: 500px; + height: 300px; + border: 2px dashed @ui-action-border; + border-radius: 3px; + background: @white; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + margin-bottom: 30px; transition: 100ms box-shadow ease, 100ms border ease; + + &.drag-over { + border-color: @ui-action-border-hover; + border-style: solid; + box-shadow: 0 3px 8px rgba(0,0,0, .1); + transition: 100ms box-shadow ease, 100ms border ease; + } + + .umb-icon { + display: block; + color: @ui-action-type; + font-size: 6.75rem; + line-height: 1; + margin: 0 auto; + } + + .umb-info-local-item { + margin: 20px; + } } - .umb-icon { - display: block; + &__select-file { + font-weight: bold; color: @ui-action-type; - font-size: 6.75rem; - line-height: 1; - margin: 0 auto; - } -} + cursor: pointer; -.umb-upload-local__select-file { - font-weight: bold; - color: @ui-action-type; - cursor: pointer; - - &:hover { - text-decoration: underline; - color: @ui-action-type-hover; + &:hover { + text-decoration: underline; + color: @ui-action-type-hover; + } } } @@ -117,7 +124,3 @@ .umb-info-local-item { margin-bottom: 20px; } - -.umb-upload-local__dropzone .umb-info-local-item { - margin:20px; -} diff --git a/src/Umbraco.Web.UI.Client/src/views/components/application/umb-app-header.html b/src/Umbraco.Web.UI.Client/src/views/components/application/umb-app-header.html index 98b8d88869..ce3bf06853 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/application/umb-app-header.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/application/umb-app-header.html @@ -1,7 +1,11 @@
- + +
+ + + + + + + +
+ + +
+
+ +
+
+ + +
+ +
+

{{ vm.localPackage.name }}

+ + + +
+ Contributors
+ {{ vm.localPackage.contributors.join(', ')}} +
+ +
+ Version
+ {{ vm.localPackage.version }} +

+ + + Upgrading from version + {{ vm.localPackage.originalVersion }} + + +

+
+ + + +
+ Read me
+ +
+ +
+ + + I accept terms of use + + + + +
+ +
+ + +
+ +
+ This package cannot be installed, it requires a minimum Umbraco version of {{vm.localPackage.umbracoVersion}} +
+
+

{{vm.installState.status}}

+
+ +
+ + +
+ +
+
+ +
+
+
+
+ +
diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index b584606f4f..4222f4312d 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -17,15 +17,12 @@ - + - + @@ -39,6 +36,7 @@ + @@ -46,6 +44,7 @@ + @@ -55,6 +54,7 @@ + @@ -72,6 +72,7 @@ +