diff --git a/src/Squidex/Config/Logging.cs b/src/Squidex/Config/Logging.cs new file mode 100644 index 000000000..9fa6e3b05 --- /dev/null +++ b/src/Squidex/Config/Logging.cs @@ -0,0 +1,33 @@ +// ========================================================================== +// Squidex Headless CMS +// ========================================================================== +// Copyright (c) Squidex UG (haftungsbeschraenkt) +// All rights reserved. Licensed under the MIT license. +// ========================================================================== + +using System; +using Microsoft.Extensions.Logging; + +namespace Squidex.Config +{ + public static class Logging + { + public static void AddOrleansFilter(this ILoggingBuilder builder) + { + builder.AddFilter((category, level) => + { + if (category.StartsWith("Orleans.", StringComparison.OrdinalIgnoreCase)) + { + return level >= LogLevel.Warning; + } + + if (category.StartsWith("Runtime.", StringComparison.OrdinalIgnoreCase)) + { + return level >= LogLevel.Warning; + } + + return level >= LogLevel.Information; + }); + } + } +} diff --git a/src/Squidex/Config/Orleans/SiloWrapper.cs b/src/Squidex/Config/Orleans/SiloWrapper.cs index df0694ad9..7b0ab2d3c 100644 --- a/src/Squidex/Config/Orleans/SiloWrapper.cs +++ b/src/Squidex/Config/Orleans/SiloWrapper.cs @@ -75,7 +75,7 @@ namespace Squidex.Config.Orleans { builder.AddConfiguration(hostingContext.Configuration.GetSection("logging")); builder.AddSemanticLog(); - builder.AddFilter((category, level) => !category.StartsWith("Orleans.", StringComparison.CurrentCultureIgnoreCase) || level >= LogLevel.Warning); + builder.AddOrleansFilter(); }) .ConfigureApplicationParts(builder => { diff --git a/src/Squidex/Pipeline/ApiModelValidationAttribute.cs b/src/Squidex/Pipeline/ApiModelValidationAttribute.cs index 65f88df61..3c96afe51 100644 --- a/src/Squidex/Pipeline/ApiModelValidationAttribute.cs +++ b/src/Squidex/Pipeline/ApiModelValidationAttribute.cs @@ -38,7 +38,10 @@ namespace Squidex.Pipeline } } - throw new ValidationException("The model is not valid.", errors); + if (errors.Count > 0) + { + throw new ValidationException("The model is not valid.", errors); + } } } } diff --git a/src/Squidex/Program.cs b/src/Squidex/Program.cs index 49c6de70c..9983b5694 100644 --- a/src/Squidex/Program.cs +++ b/src/Squidex/Program.cs @@ -12,6 +12,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using Orleans; using Orleans.Hosting; +using Squidex.Config; using Squidex.Infrastructure.Log.Adapter; namespace Squidex @@ -29,7 +30,7 @@ namespace Squidex { builder.AddConfiguration(hostingContext.Configuration.GetSection("logging")); builder.AddSemanticLog(); - builder.AddFilter((category, level) => !category.StartsWith("Orleans.", StringComparison.CurrentCultureIgnoreCase) || level >= LogLevel.Warning); + builder.AddOrleansFilter(); }) .ConfigureAppConfiguration((hostContext, builder) => { diff --git a/src/Squidex/app/features/content/pages/content/content-history.component.html b/src/Squidex/app/features/content/pages/content/content-history.component.html index cfd678f5e..f9026f3dc 100644 --- a/src/Squidex/app/features/content/pages/content/content-history.component.html +++ b/src/Squidex/app/features/content/pages/content/content-history.component.html @@ -14,7 +14,7 @@
{{event.created | sqxFromNow}}
- Load this Version + Load this Version diff --git a/src/Squidex/app/features/content/pages/content/content-history.component.scss b/src/Squidex/app/features/content/pages/content/content-history.component.scss index 3a034e941..879a5d009 100644 --- a/src/Squidex/app/features/content/pages/content/content-history.component.scss +++ b/src/Squidex/app/features/content/pages/content/content-history.component.scss @@ -17,27 +17,15 @@ .event { & { - color: $color-text-decent; + color: $color-history; font-size: .9rem; font-weight: normal; margin-bottom: 1.5rem; } &-created { + font-weight: normal; font-size: .75rem; - } - - &-load { - & { - font-size: .9rem; - font-weight: normal; - cursor: pointer; - color: $color-theme-blue !important; - } - - &:focus, - &:hover { - text-decoration: underline !important; - } + margin: .375rem 0; } } \ No newline at end of file diff --git a/src/Squidex/app/framework/angular/panel.component.scss b/src/Squidex/app/framework/angular/panel.component.scss index f4dfe4556..d1951ab29 100644 --- a/src/Squidex/app/framework/angular/panel.component.scss +++ b/src/Squidex/app/framework/angular/panel.component.scss @@ -1,9 +1,2 @@ @import '_mixins'; -@import '_vars'; - -.panel-header { - &.large { - min-height: 8rem; - max-height: 8rem; - } -} \ No newline at end of file +@import '_vars'; \ No newline at end of file diff --git a/src/Squidex/app/shared/components/history-list.component.scss b/src/Squidex/app/shared/components/history-list.component.scss index 177a8de84..0eabbf8e9 100644 --- a/src/Squidex/app/shared/components/history-list.component.scss +++ b/src/Squidex/app/shared/components/history-list.component.scss @@ -17,14 +17,14 @@ .event { & { - color: $color-text-decent; + color: $color-history; font-size: .9rem; font-weight: normal; margin-bottom: 1.5rem; } &-message { - margin-bottom: .35rem; + margin-bottom: .375rem; } &-created { diff --git a/src/Squidex/app/theme/_bootstrap.scss b/src/Squidex/app/theme/_bootstrap.scss index 5a5d5aba9..69e8b5981 100644 --- a/src/Squidex/app/theme/_bootstrap.scss +++ b/src/Squidex/app/theme/_bootstrap.scss @@ -95,6 +95,10 @@ a { } &.force { + & { + color: $color-theme-blue !important; + } + &:hover { text-decoration: underline !important; cursor: pointer; @@ -431,14 +435,15 @@ a { } &-header { - @include border-radius-top(.25rem); - background: $color-modal-header-background; - font-size: 1rem; - font-weight: normal; - color: $color-modal-header-foreground; + & { + @include border-radius-top(.25rem); + background: $color-modal-header-background; + font-size: 1rem; + font-weight: normal; + color: $color-modal-header-foreground; + } - h4, - h5 { + h4 { font-size: 1rem; font-weight: normal; } diff --git a/src/Squidex/app/theme/_panels.scss b/src/Squidex/app/theme/_panels.scss index b1b0b88d3..adec1955e 100644 --- a/src/Squidex/app/theme/_panels.scss +++ b/src/Squidex/app/theme/_panels.scss @@ -59,6 +59,11 @@ position: relative; } + &.large { + min-height: 8rem; + max-height: 8rem; + } + .form-inline { display: inline-block; } diff --git a/src/Squidex/app/theme/_vars.scss b/src/Squidex/app/theme/_vars.scss index a4862968b..c6e621401 100644 --- a/src/Squidex/app/theme/_vars.scss +++ b/src/Squidex/app/theme/_vars.scss @@ -7,6 +7,7 @@ $color-title: #000; $color-text: #373a3c; $color-text-decent: #a9b2bb; $color-tooltip: #1a2129; +$color-history: #7f858c; $color-input: #dbe4eb; $color-input-background: #fff; diff --git a/src/Squidex/appsettings.json b/src/Squidex/appsettings.json index 3dfc0aa47..8a75d41fe 100644 --- a/src/Squidex/appsettings.json +++ b/src/Squidex/appsettings.json @@ -44,8 +44,8 @@ "logging": { /* - * Setting the flag to true, enables well formatteds json logs. - */ + * Setting the flag to true, enables well formatteds json logs. + */ "human": true }, diff --git a/src/Squidex/wwwroot/theme.html b/src/Squidex/wwwroot/theme.html index f7047390d..4ea4098f1 100644 --- a/src/Squidex/wwwroot/theme.html +++ b/src/Squidex/wwwroot/theme.html @@ -668,45 +668,8 @@ -
-
-

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown - aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan - helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu - banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan - aliquip quis cardigan american apparel, butcher voluptate nisi qui.

-
-
-

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. - Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan - four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft - beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda - labore aesthetic magna delectus mollit.

-
-
-

Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic - lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork - tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. - DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. -

-
-
-

Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold - out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland - seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh - DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. -

-
-
@@ -1227,40 +1190,213 @@

Modals

-
-