From 089de81dd67ef6e8367a2ee4af3fc3fa8d132293 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 20 Feb 2020 10:53:02 +0100 Subject: [PATCH 1/2] Style fixes. --- frontend/app/theme/_bootstrap.scss | 3 +++ frontend/app/theme/_common.scss | 3 +++ frontend/app/theme/_forms.scss | 3 +++ frontend/app/theme/_lists.scss | 3 +++ frontend/app/theme/_mixins.scss | 19 ++++++++++++------- frontend/app/theme/_panels.scss | 3 +++ frontend/app/theme/_static.scss | 3 +++ 7 files changed, 30 insertions(+), 7 deletions(-) diff --git a/frontend/app/theme/_bootstrap.scss b/frontend/app/theme/_bootstrap.scss index 9e65e0069..4768bf9f8 100644 --- a/frontend/app/theme/_bootstrap.scss +++ b/frontend/app/theme/_bootstrap.scss @@ -1,3 +1,6 @@ +@import '_mixins'; +@import '_vars'; + @import './../../node_modules/bootstrap/scss/mixins/_buttons'; // diff --git a/frontend/app/theme/_common.scss b/frontend/app/theme/_common.scss index 825861359..b7e42acf0 100644 --- a/frontend/app/theme/_common.scss +++ b/frontend/app/theme/_common.scss @@ -1,3 +1,6 @@ +@import '_mixins'; +@import '_vars'; + body { // Default body with padding for fixed navbar and sidebar. & { diff --git a/frontend/app/theme/_forms.scss b/frontend/app/theme/_forms.scss index 972f7ac9f..e918c9e62 100644 --- a/frontend/app/theme/_forms.scss +++ b/frontend/app/theme/_forms.scss @@ -1,3 +1,6 @@ +@import '_mixins'; +@import '_vars'; + // // Support for Angular validation states. // diff --git a/frontend/app/theme/_lists.scss b/frontend/app/theme/_lists.scss index bb996beb0..deaf6286a 100644 --- a/frontend/app/theme/_lists.scss +++ b/frontend/app/theme/_lists.scss @@ -1,3 +1,6 @@ +@import '_mixins'; +@import '_vars'; + // // Custom list that can either be used with a table or divs. // diff --git a/frontend/app/theme/_mixins.scss b/frontend/app/theme/_mixins.scss index e385e01e8..a94bf8fe2 100644 --- a/frontend/app/theme/_mixins.scss +++ b/frontend/app/theme/_mixins.scss @@ -1,3 +1,5 @@ +// sass-lint:disable no-vendor-prefixes, one-declaration-per-line, no-misspelled-properties, no-color-keywords, no-color-literals + @mixin build-icon($color) { & { color: $color; @@ -27,13 +29,13 @@ &:disabled &.disabled { opacity: .4; - } + } &:focus, &.focus { box-shadow: 0 0 0 $btn-focus-width rgba($color, .5); } - + &:active, &:hover { color: darken($color, 15%); @@ -71,23 +73,26 @@ } } -@mixin hidden() { +@mixin hidden { opacity: 0; - overflow: hidden; + overflow-x: hidden; + overflow-y: hidden; position: absolute; width: 0; } @mixin force-width($width) { - width: $width; // Ensure that we use the minimum width in flex scenarios. max-width: $width; min-width: $width; + // Normal width definition. + width: $width; } @mixin force-height($height) { + // Normal height definition. height: $height; - // Ensure that we use the minimum width in flex scenarios. + // Ensure that we use the minimum height in flex scenarios. max-height: $height; min-height: $height; } @@ -122,7 +127,7 @@ content: ''; display: inline-block; } - + @mixin circle($size) { @include border-radius($size * .5); @include force-height($size); diff --git a/frontend/app/theme/_panels.scss b/frontend/app/theme/_panels.scss index 1647aafe8..fa1bc68d8 100644 --- a/frontend/app/theme/_panels.scss +++ b/frontend/app/theme/_panels.scss @@ -1,3 +1,6 @@ +@import '_mixins'; +@import '_vars'; + @mixin panel-icon { color: $color-border-dark; cursor: pointer; diff --git a/frontend/app/theme/_static.scss b/frontend/app/theme/_static.scss index 897c2b75d..31238cec0 100644 --- a/frontend/app/theme/_static.scss +++ b/frontend/app/theme/_static.scss @@ -1,3 +1,6 @@ +@import '_mixins'; +@import '_vars'; + // // Noscript element with warning, when javascript is disabled. // From 5c1a8939ef9312e764497840253a3cbb352d26c8 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 20 Feb 2020 10:56:59 +0100 Subject: [PATCH 2/2] Config for recursive deletion. --- backend/src/Squidex/Config/Domain/AssetServices.cs | 7 +++++-- backend/src/Squidex/appsettings.json | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/backend/src/Squidex/Config/Domain/AssetServices.cs b/backend/src/Squidex/Config/Domain/AssetServices.cs index 769f59c1d..ad48b4a65 100644 --- a/backend/src/Squidex/Config/Domain/AssetServices.cs +++ b/backend/src/Squidex/Config/Domain/AssetServices.cs @@ -28,8 +28,11 @@ namespace Squidex.Config.Domain services.Configure( config.GetSection("assets")); - services.AddTransientAs() - .As(); + if (config.GetValue("assets:deleteRecursive")) + { + services.AddTransientAs() + .As(); + } services.AddTransientAs() .AsSelf(); diff --git a/backend/src/Squidex/appsettings.json b/backend/src/Squidex/appsettings.json index 05d78445c..d14d5014b 100644 --- a/backend/src/Squidex/appsettings.json +++ b/backend/src/Squidex/appsettings.json @@ -217,7 +217,11 @@ /* * The maximum file size in bytes. Default: 5MB */ - "maxSize": 5242880 + "maxSize": 5242880, + /* + * True to delete assets recursively. + */ + "deleteRecursive": false }, "logging": {