Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5afbfd2
add lang keys for marketplace
iOvergaard Nov 3, 2022
a26fe51
remove old 'repo' page and deprecate related services
iOvergaard Nov 3, 2022
899f455
add new view for Umbraco Marketplace
iOvergaard Nov 3, 2022
7eb2084
optimise margin/padding for other tabs
iOvergaard Nov 3, 2022
da9d6c4
mark Our Repository constants as obsolete
iOvergaard Nov 3, 2022
143d3a5
Merge remote-tracking branch 'origin/v11/dev' into v11/feature/market…
iOvergaard Nov 8, 2022
f6534c4
improve css path to iframe slightly with more aliases and classnames
iOvergaard Nov 8, 2022
56669c7
remove style qs
iOvergaard Nov 8, 2022
31b1e3e
update URL of Marketplace
iOvergaard Nov 8, 2022
d8e9c28
add ng-controller with utitlities for future PostMessage API
iOvergaard Nov 9, 2022
b07472e
rename marketplace loaded function
iOvergaard Nov 9, 2022
e68612d
remove iframe postmessage logic for time being
iOvergaard Nov 9, 2022
1c74485
add handling of dynamic querystring params
iOvergaard Nov 9, 2022
cf941fc
assume url does not change
iOvergaard Nov 9, 2022
6fa4e8b
Added support for additional parameters for marketplace
bergmania Nov 9, 2022
faab8bb
Merge remote-tracking branch 'origin/v11/dev' into v11/feature/market…
iOvergaard Nov 18, 2022
29885fd
Update src/JsonSchema/AppSettings.cs
iOvergaard Nov 18, 2022
4d5f242
Update src/Umbraco.Core/Configuration/Models/MarketplaceSettings.cs
iOvergaard Nov 18, 2022
a78e945
Update src/Umbraco.Core/Configuration/Models/MarketplaceSettings.cs
iOvergaard Nov 18, 2022
e92af75
Update src/Umbraco.Core/Constants-Marketplace.cs
iOvergaard Nov 18, 2022
ad37f1c
Merge branch 'v11/feature/marketplace' of https://github.com/umbraco/…
iOvergaard Nov 18, 2022
530168b
Merge remote-tracking branch 'origin/v11/dev' into v11/feature/market…
iOvergaard Nov 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/JsonSchema/AppSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,7 @@ public class CmsDefinition
public DataTypesSettings? DataTypes { get; set; }

public LicensesSettings? Licenses { get; set; }

public MarketplaceSettings? Marketplace { get; set; }
Comment thread
iOvergaard marked this conversation as resolved.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Umbraco.Cms.Core.Configuration.Models;
/// Typed configuration options for active directory settings.
/// </summary>
[UmbracoOptions(Constants.Configuration.ConfigActiveDirectory)]
[Obsolete("This is not used anymore. Will be removed in Umbraco 12")]public class ActiveDirectorySettings
[Obsolete("This is not used anymore. Will be removed in Umbraco 12")]
public class ActiveDirectorySettings
{
/// <summary>
/// Gets or sets a value for the Active Directory domain.
Expand Down
16 changes: 16 additions & 0 deletions src/Umbraco.Core/Configuration/Models/MarketplaceSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.

namespace Umbraco.Cms.Core.Configuration.Models;

/// <summary>
/// Configuration options for the Marketplace.
/// </summary>
[UmbracoOptions(Constants.Configuration.ConfigMarketplace)]
public class MarketplaceSettings
{
/// <summary>
/// Gets or sets the additional parameters that are sent to the Marketplace.
/// </summary>
public Dictionary<string, string> AdditionalParameters { get; set; } = new ();
}
1 change: 1 addition & 0 deletions src/Umbraco.Core/Constants-Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public static class Configuration
public const string ConfigHostingDebug = ConfigHostingPrefix + "Debug";
public const string ConfigCustomErrorsMode = ConfigCustomErrorsPrefix + "Mode";
public const string ConfigActiveDirectory = ConfigPrefix + "ActiveDirectory";
public const string ConfigMarketplace = ConfigPrefix + "Marketplace";
public const string ConfigLegacyPasswordMigration = ConfigPrefix + "LegacyPasswordMigration";
public const string ConfigContent = ConfigPrefix + "Content";
public const string ConfigCoreDebug = ConfigCorePrefix + "Debug";
Expand Down
12 changes: 12 additions & 0 deletions src/Umbraco.Core/Constants-Marketplace.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Umbraco.Cms.Core;

public static partial class Constants
{
/// <summary>
/// Defines the constants used for the Umbraco Marketplace.
/// </summary>
public static class Marketplace
{
public const string Url = "https://dev.marketplace.umbraco.com";
}
}
1 change: 1 addition & 0 deletions src/Umbraco.Core/Constants-PackageRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ public static partial class Constants
/// <summary>
/// Defines the constants used for the Umbraco package repository
/// </summary>
[Obsolete("This is no longer used and will be removed in Umbraco 13")]
public static class PackageRepository
{
public const string RestApiBaseUrl = "https://our.umbraco.com/webapi/packages/v1";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public static IUmbracoBuilder AddConfiguration(this IUmbracoBuilder builder)
builder
.AddUmbracoOptions<ModelsBuilderSettings>()
.AddUmbracoOptions<ActiveDirectorySettings>()
.AddUmbracoOptions<MarketplaceSettings>()
.AddUmbracoOptions<ContentSettings>()
.AddUmbracoOptions<CoreDebugSettings>()
.AddUmbracoOptions<ExceptionFilterSettings>()
Expand Down
1 change: 1 addition & 0 deletions src/Umbraco.Core/EmbeddedResources/Lang/da.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,7 @@ Mange hilsner fra Umbraco robotten
<key alias="media">Mediearkiv</key>
<key alias="member">Medlemmer</key>
<key alias="packages">Pakker</key>
<key alias="marketplace">Marketplace</key>
<key alias="newsletters">Nyhedsbreve</key>
<key alias="settings">Indstillinger</key>
<key alias="statistics">Statistik</key>
Expand Down
1 change: 1 addition & 0 deletions src/Umbraco.Core/EmbeddedResources/Lang/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<key alias="member">Members</key>
<key alias="newsletters">Newsletters</key>
<key alias="packages">Packages</key>
<key alias="marketplace">Marketplace</key>
<key alias="settings">Settings</key>
<key alias="statistics">Statistics</key>
<key alias="translation">Translation</key>
Expand Down
1 change: 1 addition & 0 deletions src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1515,6 +1515,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<key alias="media">Media</key>
<key alias="member">Members</key>
<key alias="packages">Packages</key>
<key alias="marketplace">Marketplace</key>
<key alias="settings">Settings</key>
<key alias="translation">Translation</key>
<key alias="users">Users</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Runtime.Serialization;
using System.Web;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Routing;
Expand Down Expand Up @@ -54,6 +55,7 @@ public class BackOfficeServerVariables
private MemberPasswordConfigurationSettings _memberPasswordConfigurationSettings;
private DataTypesSettings _dataTypesSettings;
private readonly ITempDataDictionaryFactory _tempDataDictionaryFactory;
private MarketplaceSettings _marketplaceSettings;

[Obsolete("Use constructor that takes IOptionsMontior<DataTypeSettings>, scheduled for removal in V12")]
public BackOfficeServerVariables(
Expand Down Expand Up @@ -139,6 +141,7 @@ public BackOfficeServerVariables(
{
}

[Obsolete("Use constructor that takes IOptionsMonitor<MarketplaceSettings>, scheduled for removal in V13")]
public BackOfficeServerVariables(
LinkGenerator linkGenerator,
IRuntimeState runtimeState,
Expand All @@ -159,6 +162,52 @@ public BackOfficeServerVariables(
IOptionsMonitor<MemberPasswordConfigurationSettings> memberPasswordConfigurationSettings,
IOptionsMonitor<DataTypesSettings> dataTypesSettings,
ITempDataDictionaryFactory tempDataDictionaryFactory)
: this(
linkGenerator,
runtimeState,
features,
globalSettings,
umbracoVersion,
contentSettings,
httpContextAccessor,
treeCollection,
hostingEnvironment,
runtimeSettings,
securitySettings,
runtimeMinifier,
externalLogins,
imageUrlGenerator,
previewRoutes,
emailSender,
memberPasswordConfigurationSettings,
dataTypesSettings,
tempDataDictionaryFactory,
StaticServiceProvider.Instance.GetRequiredService<IOptionsMonitor<MarketplaceSettings>>()
)
{
}

public BackOfficeServerVariables(
LinkGenerator linkGenerator,
IRuntimeState runtimeState,
UmbracoFeatures features,
IOptionsMonitor<GlobalSettings> globalSettings,
IUmbracoVersion umbracoVersion,
IOptionsMonitor<ContentSettings> contentSettings,
IHttpContextAccessor httpContextAccessor,
TreeCollection treeCollection,
IHostingEnvironment hostingEnvironment,
IOptionsMonitor<RuntimeSettings> runtimeSettings,
IOptionsMonitor<SecuritySettings> securitySettings,
IRuntimeMinifier runtimeMinifier,
IBackOfficeExternalLoginProviders externalLogins,
IImageUrlGenerator imageUrlGenerator,
PreviewRoutes previewRoutes,
IEmailSender emailSender,
IOptionsMonitor<MemberPasswordConfigurationSettings> memberPasswordConfigurationSettings,
IOptionsMonitor<DataTypesSettings> dataTypesSettings,
ITempDataDictionaryFactory tempDataDictionaryFactory,
IOptionsMonitor<MarketplaceSettings> marketplaceSettings)
{
_linkGenerator = linkGenerator;
_runtimeState = runtimeState;
Expand All @@ -179,13 +228,15 @@ public BackOfficeServerVariables(
_tempDataDictionaryFactory = tempDataDictionaryFactory;
_memberPasswordConfigurationSettings = memberPasswordConfigurationSettings.CurrentValue;
_dataTypesSettings = dataTypesSettings.CurrentValue;
_marketplaceSettings = marketplaceSettings.CurrentValue;

globalSettings.OnChange(x => _globalSettings = x);
contentSettings.OnChange(x => _contentSettings = x);
runtimeSettings.OnChange(x => _runtimeSettings = x);
securitySettings.OnChange(x => _securitySettings = x);
dataTypesSettings.OnChange(x => _dataTypesSettings = x);
memberPasswordConfigurationSettings.OnChange(x => _memberPasswordConfigurationSettings = x);
marketplaceSettings.OnChange(x => _marketplaceSettings = x);
}

/// <summary>
Expand Down Expand Up @@ -298,6 +349,7 @@ internal async Task<Dictionary<string, object>> GetServerVariablesAsync()
{"gridConfig", _linkGenerator.GetPathByAction(nameof(BackOfficeController.GetGridConfig), backOfficeControllerName, new { area = Constants.Web.Mvc.BackOfficeArea })},
// TODO: This is ultra confusing! this same key is used for different things, when returning the full app when authenticated it is this URL but when not auth'd it's actually the ServerVariables address
{"serverVarsJs", _linkGenerator.GetPathByAction(nameof(BackOfficeController.Application), backOfficeControllerName, new { area = Constants.Web.Mvc.BackOfficeArea })},
{"marketplaceUrl", GetMarketplaceUrl()},
//API URLs
{
"packagesRestApiBaseUrl", Constants.PackageRepository.RestApiBaseUrl
Expand Down Expand Up @@ -625,6 +677,25 @@ internal async Task<Dictionary<string, object>> GetServerVariablesAsync()
return defaultVals;
}

private string GetMarketplaceUrl()
{
var uriBuilder = new UriBuilder(Constants.Marketplace.Url);

var query = HttpUtility.ParseQueryString(uriBuilder.Query);

query["umbversion"] = _runtimeState.SemanticVersion.ToSemanticStringWithoutBuild();
query["style"] = "backoffice";

foreach (var kvp in _marketplaceSettings.AdditionalParameters)
{
query[kvp.Key] = kvp.Value;
}

uriBuilder.Query = query.ToString();

return uriBuilder.ToString();
}

[DataContract]
private class PluginTree
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
* @ngdoc service
* @name umbraco.resources.ourPackageRepositoryResource
* @description handles data for package installations
* @deprecated This resource is deprecated and will be removed in future versions. Umbraco no longer supports the Our Umbraco repository.
**/
function ourPackageRepositoryResource($q, $http, umbDataFormatter, umbRequestHelper) {
function ourPackageRepositoryResource($http, umbRequestHelper) {

var baseurl = Umbraco.Sys.ServerVariables.umbracoUrls.packagesRestApiBaseUrl;

Expand Down
38 changes: 38 additions & 0 deletions src/Umbraco.Web.UI.Client/src/less/components/umb-packages.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
[data-element="editor-packages"] {
.umb-pane {
height: 100%;
margin: 0;

.umb-pane-content,
.umb-editor-sub-views {
height: 100%;

.umb-editor-sub-view {
padding: 20px;
}

.sub-view-Marketplace {
height: 100%;
margin: 0;
padding: 0;

.umb-editor-sub-view__content {
height: 100%;
}
}
}
}
}

.umb-marketplace-view-wrapper {
height: 100%;
display: flex;
align-items: stretch;
}

.umb-marketplace-view {
width: 100%;
height: 100%;
overflow: hidden;
}

.umb-packages-view-title {
font-size: 20px;
font-weight: bold;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
</div>

<div class="umb-pane">
<div ng-transclude></div>
<div class="umb-pane-content" ng-transclude></div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
<div class="umb-editor-sub-views">

<div
id="sub-view-{{$index}}"
class="umb-editor-sub-view"
ng-repeat="subView in subViews track by subView.alias"
ng-class="'sub-view-' + subView.name"
val-sub-view="subView">

<div class="umb-editor-sub-view__content"
ng-show="subView.active === true"
ng-include="subView.view">
</div>

</div>

<div
id="sub-view-{{$index}}"
class="umb-editor-sub-view"
ng-repeat="subView in subViews track by subView.alias"
ng-class="'sub-view-' + subView.name"
val-sub-view="subView"
ng-if="subView.active"
>
<div class="umb-editor-sub-view__content" ng-include="subView.view"></div>
</div>
</div>
Loading