diff --git a/zero.Core/Extensions/QueryableExtensions.cs b/zero.Core/Extensions/QueryableExtensions.cs index d0d540f0..d59209af 100644 --- a/zero.Core/Extensions/QueryableExtensions.cs +++ b/zero.Core/Extensions/QueryableExtensions.cs @@ -77,25 +77,25 @@ namespace zero.Core.Extensions public static IQueryable SearchIf(this IQueryable source, Expression> fieldSelector, string searchTerms, string suffix = null, string prefix = null, SearchOperator @operator = SearchOperator.Or) { - string search; - if (String.IsNullOrWhiteSpace(searchTerms)) { return source; } - search = searchTerms; - - if (suffix != null) + string[] searchParts = searchTerms.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Select(x => { - search += suffix; - } - if (prefix != null) - { - search = prefix + search; - } + if (suffix != null) + { + x += suffix; + } + if (prefix != null) + { + x = prefix + x; + } + return x; + }).ToArray(); - return source.Search(fieldSelector, search.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries), @operator: @operator); + return source.Search(fieldSelector, searchParts, @operator: @operator); } } } diff --git a/zero.Web.UI/App/components/buttons/select-button.vue b/zero.Web.UI/App/components/buttons/select-button.vue index 68aee3c5..35cdc1a0 100644 --- a/zero.Web.UI/App/components/buttons/select-button.vue +++ b/zero.Web.UI/App/components/buttons/select-button.vue @@ -53,7 +53,7 @@ }, source() { - return this.iconAsImage ? MediaApi.getImageSource(this.icon) : null; + return this.iconAsImage ? (this.icon.indexOf('/') === 0 ? this.icon : MediaApi.getImageSource(this.icon)) : null; } }, diff --git a/zero.Web.UI/App/components/forms/property.vue b/zero.Web.UI/App/components/forms/property.vue index 42760ce4..11b82974 100644 --- a/zero.Web.UI/App/components/forms/property.vue +++ b/zero.Web.UI/App/components/forms/property.vue @@ -83,9 +83,9 @@ padding-right: 0; } - .ui-property-content + .ui-property-label + .ui-property-content { - margin-top: 5px; + margin-top: 5px; } } diff --git a/zero.Web.UI/Sass/Modules/_all.scss b/zero.Web.UI/Sass/Modules/_all.scss index 4d0de430..879f49e0 100644 --- a/zero.Web.UI/Sass/Modules/_all.scss +++ b/zero.Web.UI/Sass/Modules/_all.scss @@ -11,4 +11,6 @@ @import "tree"; -@import "tag"; \ No newline at end of file +@import "tag"; + +@import "list"; \ No newline at end of file diff --git a/zero.Web.UI/sass/Modules/_list.scss b/zero.Web.UI/sass/Modules/_list.scss new file mode 100644 index 00000000..d5e6c51a --- /dev/null +++ b/zero.Web.UI/sass/Modules/_list.scss @@ -0,0 +1,70 @@ + + +.ui-list +{ + +} + +.ui-list-item +{ + display: grid; + width: 100%; + grid-template-columns: 1fr 32px; + gap: 6px; + align-items: center; + position: relative; + padding: 0 32px; + + &:hover, &.is-selected + { + background: var(--color-tree-selected); + } +} + +.ui-list-item-icon +{ + font-size: 18px; + line-height: 1; + font-weight: 400; + position: relative; + top: -2px; + color: var(--color-text-dim); + justify-self: center; +} + +.ui-list-item-image +{ + max-width: 32px; + max-height: 34px; + justify-self: center; +} + +.ui-list-item-content +{ + display: block; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.ui-list-item-text +{ + display: block; +} + +.ui-list-item.is-selected .ui-list-item-text +{ + font-weight: 600; +} + +.ui-list-item-description +{ + color: var(--color-text-dim); + font-size: var(--font-size-xs); +} + +.ui-list-item-selected-icon +{ + color: var(--color-primary); + justify-self: center; +} \ No newline at end of file