Skip to content

Commit 0f4020d

Browse files
committed
Merge remote-tracking branch 'origin/v8/dev' into v9/dev
# Conflicts: # build/NuSpecs/UmbracoCms.Web.nuspec # src/SolutionInfo.cs # src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs # src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs # src/Umbraco.Examine/Umbraco.Examine.csproj # src/Umbraco.Tests/Umbraco.Tests.csproj # src/Umbraco.Web.UI.Client/src/assets/img/application/umbraco_logo_large_blue.svg # src/Umbraco.Web.UI.Client/src/assets/img/application/umbraco_logomark_white.svg # src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbappheader.directive.js # src/Umbraco.Web.UI.Client/src/less/components/application/umb-app-header.less # src/Umbraco.Web.UI.Client/src/views/components/application/umb-app-header.html # src/Umbraco.Web.UI.Client/src/views/content/content.protect.controller.js # src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.controller.js # src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.html # src/Umbraco.Web/Editors/BackOfficeServerVariables.cs # src/Umbraco.Web/Umbraco.Web.csproj
2 parents de2668a + 62fa169 commit 0f4020d

File tree

15 files changed

+752
-286
lines changed

15 files changed

+752
-286
lines changed

src/Umbraco.Core/Configuration/Models/ContentSettings.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ @keyframes umbraco-preview-badge--effect {{
156156
internal const bool StaticShowDeprecatedPropertyEditors = false;
157157
internal const string StaticLoginBackgroundImage = "assets/img/login.jpg";
158158
internal const string StaticLoginLogoImage = "assets/img/application/umbraco_logo_white.svg";
159+
internal const bool StaticHideBackOfficeLogo = false;
159160

160161
/// <summary>
161162
/// Gets or sets a value for the content notification settings.
@@ -219,6 +220,12 @@ @keyframes umbraco-preview-badge--effect {{
219220
[DefaultValue(StaticLoginLogoImage)]
220221
public string LoginLogoImage { get; set; } = StaticLoginLogoImage;
221222

223+
/// <summary>
224+
/// Gets or sets a value indicating whether to hide the backoffice umbraco logo or not.
225+
/// </summary>
226+
[DefaultValue(StaticHideBackOfficeLogo)]
227+
public bool HideBackOfficeLogo { get; set; } = StaticHideBackOfficeLogo;
228+
222229
/// <summary>
223230
/// Get or sets the model representing the global content version cleanup policy
224231
/// </summary>

src/Umbraco.Web.BackOffice/Controllers/BackOfficeServerVariables.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ internal async Task<Dictionary<string, object>> BareMinimumServerVariablesAsync(
100100
var keepOnlyKeys = new Dictionary<string, string[]>
101101
{
102102
{"umbracoUrls", new[] {"authenticationApiBaseUrl", "serverVarsJs", "externalLoginsUrl", "currentUserApiBaseUrl", "previewHubUrl", "iconApiBaseUrl"}},
103-
{"umbracoSettings", new[] {"allowPasswordReset", "imageFileTypes", "maxFileSize", "loginBackgroundImage", "loginLogoImage", "canSendRequiredEmail", "usernameIsEmail", "minimumPasswordLength", "minimumPasswordNonAlphaNum"}},
103+
{"umbracoSettings", new[] {"allowPasswordReset", "imageFileTypes", "maxFileSize", "loginBackgroundImage", "loginLogoImage", "canSendRequiredEmail", "usernameIsEmail", "minimumPasswordLength", "minimumPasswordNonAlphaNum", "hideBackofficeLogo"}},
104104
{"application", new[] {"applicationPath", "cacheBuster"}},
105105
{"isDebuggingEnabled", new string[] { }},
106106
{"features", new [] {"disabledFeatures"}}
@@ -408,6 +408,7 @@ internal async Task<Dictionary<string, object>> GetServerVariablesAsync()
408408
{"allowPasswordReset", _securitySettings.AllowPasswordReset},
409409
{"loginBackgroundImage", _contentSettings.LoginBackgroundImage},
410410
{"loginLogoImage", _contentSettings.LoginLogoImage },
411+
{"hideBackofficeLogo", _contentSettings.HideBackOfficeLogo },
411412
{"showUserInvite", _emailSender.CanSendRequiredEmail()},
412413
{"canSendRequiredEmail", _emailSender.CanSendRequiredEmail()},
413414
{"showAllowSegmentationForDocumentTypes", false},

src/Umbraco.Web.BackOffice/Services/ConflictingRouteService.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using System;
2+
using System.Collections.Generic;
23
using System.Linq;
34
using System.Reflection;
5+
using Microsoft.AspNetCore.Routing;
46
using Umbraco.Cms.Core.Composing;
57
using Umbraco.Cms.Core.Services;
68
using Umbraco.Cms.Web.Common.Attributes;
@@ -11,11 +13,16 @@ namespace Umbraco.Cms.Web.BackOffice.Services
1113
public class ConflictingRouteService : IConflictingRouteService
1214
{
1315
private readonly TypeLoader _typeLoader;
16+
private readonly IEnumerable<EndpointDataSource> _endpointDataSources;
1417

1518
/// <summary>
1619
/// Initializes a new instance of the <see cref="ConflictingRouteService"/> class.
1720
/// </summary>
18-
public ConflictingRouteService(TypeLoader typeLoader) => _typeLoader = typeLoader;
21+
public ConflictingRouteService(TypeLoader typeLoader, IEnumerable<EndpointDataSource> endpointDataSources)
22+
{
23+
_typeLoader = typeLoader;
24+
_endpointDataSources = endpointDataSources;
25+
}
1926

2027
/// <inheritdoc/>
2128
public bool HasConflictingRoutes(out string controllerName)
Lines changed: 3 additions & 3 deletions
Loading

src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbappheader.directive.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
{ value: "assets/img/application/[email protected]" },
1717
{ value: "assets/img/application/[email protected]" }
1818
];
19+
scope.hideBackofficeLogo = Umbraco.Sys.ServerVariables.umbracoSettings.hideBackofficeLogo;
1920

2021
// when a user logs out or timesout
2122
evts.push(eventsService.on("app.notAuthenticated", function () {
@@ -104,15 +105,26 @@
104105
$timeout.cancel(scope.logoModal.timer);
105106
};
106107
scope.hideLogoModal = function() {
107-
$timeout.cancel(scope.logoModal.timer);
108-
scope.logoModal.timer = $timeout(function () {
109-
scope.logoModal.show = false;
110-
}, 100);
108+
if(scope.logoModal.show === true) {
109+
$timeout.cancel(scope.logoModal.timer);
110+
scope.logoModal.timer = $timeout(function () {
111+
scope.logoModal.show = false;
112+
}, 100);
113+
}
111114
};
112115
scope.stopClickEvent = function($event) {
113116
$event.stopPropagation();
114117
};
115118

119+
scope.toggleLogoModal = function() {
120+
if(scope.logoModal.show) {
121+
$timeout.cancel(scope.logoModal.timer);
122+
scope.logoModal.show = false;
123+
} else {
124+
scope.showLogoModal();
125+
}
126+
};
127+
116128
}
117129

118130
var directive = {
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* @ngdoc filter
3+
* @name umbraco.filters.simpleMarkdown
4+
* @description
5+
* 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)
6+
**/
7+
angular.module("umbraco.filters").filter('simpleMarkdown', function () {
8+
return function (text) {
9+
if (!text) {
10+
return '';
11+
}
12+
13+
return text
14+
.replace(/\*\*(.*)\*\*/gim, '<b>$1</b>')
15+
.replace(/\*(.*)\*/gim, '<i>$1</i>')
16+
.replace(/!\[(.*?)\]\((.*?)\)/gim, "<img alt='$1' src='$2' />")
17+
.replace(/\[(.*?)\]\((.*?)\)/gim, "<a href='$2' target='_blank' rel='noopener' class='underline'>$1</a>")
18+
.replace(/\n/g, '<br />').trim();
19+
};
20+
});

src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@
3030

3131
for (var p = 0; p < tab.properties.length; p++) {
3232
var prop = tab.properties[p];
33-
if (dataModel[prop.alias]) {
34-
prop.value = dataModel[prop.alias];
35-
}
33+
34+
prop.value = dataModel[prop.alias];
3635
}
3736
}
3837

@@ -53,9 +52,8 @@
5352

5453
for (var p = 0; p < tab.properties.length; p++) {
5554
var prop = tab.properties[p];
56-
if (prop.value) {
57-
dataModel[prop.alias] = prop.value;
58-
}
55+
56+
dataModel[prop.alias] = prop.value;
5957
}
6058
}
6159

src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ function navigationService($routeParams, $location, $q, $injector, eventsService
259259
var updated = false;
260260

261261
retainedQueryStrings.forEach(r => {
262-
// 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"
263-
if (currRouteParams[r] && nextRouteParams[r] !== undefined && !nextRouteParams[r]) {
262+
// testing explicitly for undefined in nextRouteParams here, as it must be possible to "unset" e.g. mculture by specifying a null value
263+
if (currRouteParams[r] && nextRouteParams[r] === undefined) {
264264
toRetain[r] = currRouteParams[r];
265265
updated = true;
266266
}

src/Umbraco.Web.UI.Client/src/less/components/application/umb-app-header.less

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,18 @@
99

1010
.umb-app-header__logo {
1111
margin-right: 30px;
12+
flex-shrink: 0;
1213
button {
1314
img {
1415
height: 30px;
1516
}
1617
}
18+
19+
}
20+
@media (max-width: 1279px) {
21+
.umb-app-header__logo {
22+
display: none;
23+
}
1724
}
1825

1926
.umb-app-header__logo-modal {

src/Umbraco.Web.UI.Client/src/less/components/umb-package-local-install.less

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,51 @@
99
color: @gray-5;
1010
}
1111

12-
.umb-upload-local__dropzone {
13-
position: relative;
14-
width: 500px;
15-
height: 300px;
16-
border: 2px dashed @ui-action-border;
17-
border-radius: 3px;
18-
background: @white;
19-
display: flex;
20-
flex-direction: column;
21-
justify-content: center;
22-
align-items: center;
23-
margin-bottom: 30px;
24-
transition: 100ms box-shadow ease, 100ms border ease;
25-
26-
&.drag-over {
27-
border-color: @ui-action-border-hover;
28-
border-style: solid;
29-
box-shadow: 0 3px 8px rgba(0,0,0, .1);
12+
.umb-upload-local {
13+
14+
&__dropzone {
15+
position: relative;
16+
width: 500px;
17+
height: 300px;
18+
border: 2px dashed @ui-action-border;
19+
border-radius: 3px;
20+
background: @white;
21+
display: flex;
22+
flex-direction: column;
23+
justify-content: center;
24+
align-items: center;
25+
margin-bottom: 30px;
3026
transition: 100ms box-shadow ease, 100ms border ease;
31-
}
3227

33-
.umb-icon {
34-
display: block;
35-
color: @ui-action-type;
36-
font-size: 6.75rem;
37-
line-height: 1;
38-
margin: 0 auto;
28+
&.drag-over {
29+
border-color: @ui-action-border-hover;
30+
border-style: solid;
31+
box-shadow: 0 3px 8px rgba(0,0,0, .1);
32+
transition: 100ms box-shadow ease, 100ms border ease;
33+
}
34+
35+
.umb-icon {
36+
display: block;
37+
color: @ui-action-type;
38+
font-size: 6.75rem;
39+
line-height: 1;
40+
margin: 0 auto;
41+
}
42+
43+
.umb-info-local-item {
44+
margin: 20px;
45+
}
3946
}
40-
}
4147

42-
.umb-upload-local__select-file {
43-
font-weight: bold;
44-
color: @ui-action-type;
45-
cursor: pointer;
48+
&__select-file {
49+
font-weight: bold;
50+
color: @ui-action-type;
51+
cursor: pointer;
4652

47-
&:hover {
48-
text-decoration: underline;
49-
color: @ui-action-type-hover;
53+
&:hover {
54+
text-decoration: underline;
55+
color: @ui-action-type-hover;
56+
}
5057
}
5158
}
5259

@@ -117,7 +124,3 @@
117124
.umb-info-local-item {
118125
margin-bottom: 20px;
119126
}
120-
121-
.umb-upload-local__dropzone .umb-info-local-item {
122-
margin:20px;
123-
}

0 commit comments

Comments
 (0)