diff --git a/backend/src/Squidex/Config/Domain/AssetServices.cs b/backend/src/Squidex/Config/Domain/AssetServices.cs index 8f192e710..ff01df650 100644 --- a/backend/src/Squidex/Config/Domain/AssetServices.cs +++ b/backend/src/Squidex/Config/Domain/AssetServices.cs @@ -29,8 +29,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 0bfba9c08..be7bb65d5 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": { diff --git a/frontend/app/theme/_bootstrap.scss b/frontend/app/theme/_bootstrap.scss index ef133c9f6..80521d062 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 d2d6f8be6..9cd733bea 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. //