diff --git a/zero.Backoffice.UI/app/modules/search/overlay.vue b/zero.Backoffice.UI/app/modules/search/overlay.vue index 0a210bf2..12796d1a 100644 --- a/zero.Backoffice.UI/app/modules/search/overlay.vue +++ b/zero.Backoffice.UI/app/modules/search/overlay.vue @@ -182,6 +182,11 @@ { margin-top: 2px; } + + &:hover .app-search-item-group + { + background: var(--color-bg-shade-1); + } } .app-search-item-text @@ -192,12 +197,20 @@ position: relative; top: 1px; font-size: var(--font-size); + flex-grow: 0; + width: 100%; + overflow: hidden; .-minor { + display: block; + white-space: nowrap; font-size: var(--font-size-xs); color: var(--color-text-dim); margin-left: 0.5em; + overflow: hidden; + text-overflow: ellipsis; + flex-grow: 0; span { @@ -214,7 +227,7 @@ font-size: var(--font-size-xs); color: var(--color-text); font-weight: 600; - background: var(--color-table-highlight); + background: var(--color-bg-shade-2); padding: 4px 12px; border-radius: 20px; } @@ -233,7 +246,7 @@ border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); background: var(--color-bg-shade-2); - border-top: 1px solid var(--color-line-dashed); + //border-top: 1px solid var(--color-line-onbg); padding: var(--padding-s) var(--padding-s); font-size: var(--font-size-s); align-items: center; diff --git a/zero.Backoffice/Resources/Localization/zero.de-de.json b/zero.Backoffice/Resources/Localization/zero.de-de.json index f7f9d9a4..a7152c33 100644 --- a/zero.Backoffice/Resources/Localization/zero.de-de.json +++ b/zero.Backoffice/Resources/Localization/zero.de-de.json @@ -766,12 +766,18 @@ "search": "Suchen" }, "input_placeholder": "Gehe zu...", - "native_hint": "Drücke STRG+F erneut um die native Browsersuche zu verwenden", + "native_hint": "Drücke erneut STRG+F um die native Browsersuche zu verwenden", "native_toggle": "Öffnen mit STRG+F", "noresults": "Keine Ergebnisse", "collection": { "page": "Seite", - "mediafolder": "Medien" + "mediafolder": "Medien", + "country": "Land", + "language": "Sprache", + "translation": "Übersetzung", + "zeroUser": "Benutzer", + "application": "App", + "mailTemplate": "Mail" } }, diff --git a/zero.Backoffice/Resources/Localization/zero.en-us.json b/zero.Backoffice/Resources/Localization/zero.en-us.json index 5025c5ba..09d40aee 100644 --- a/zero.Backoffice/Resources/Localization/zero.en-us.json +++ b/zero.Backoffice/Resources/Localization/zero.en-us.json @@ -817,7 +817,13 @@ "noresults": "No results", "collection": { "page": "Page", - "mediaFolder": "Media folder" + "mediaFolder": "Media folder", + "country": "Country", + "language": "Language", + "translation": "Translation", + "zeroUser": "User", + "application": "App", + "mailTemplate": "Mail" } }, diff --git a/zero.Core/Identity/ZeroIdentityModule.cs b/zero.Core/Identity/ZeroIdentityModule.cs index 05bd9286..34ff3360 100644 --- a/zero.Core/Identity/ZeroIdentityModule.cs +++ b/zero.Core/Identity/ZeroIdentityModule.cs @@ -29,5 +29,14 @@ internal class ZeroIdentityModule : ZeroModule .AddZeroBackofficeCookie(); services.AddAuthorization(); + + services.Configure(opts => + { + opts.Map("fth-user-check").Boost(5).Display((x, res) => + { + res.Description = x.Email; + res.Url = "/settings/users/edit/" + x.Id; + }); + }); } } \ No newline at end of file diff --git a/zero.Core/Localization/ZeroLocalizationModule.cs b/zero.Core/Localization/ZeroLocalizationModule.cs index 6701a671..a064f212 100644 --- a/zero.Core/Localization/ZeroLocalizationModule.cs +++ b/zero.Core/Localization/ZeroLocalizationModule.cs @@ -18,5 +18,22 @@ internal class ZeroLocalizationModule : ZeroModule services.AddScoped, CountryValidator>(); services.AddScoped, LanguageValidator>(); services.AddScoped, TranslationValidator>(); + + services.Configure(opts => + { + opts.Map("fth-map-pin").Fields().Display((x, res) => + { + res.Url = "/settings/countries/edit/" + x.Id; + }); + opts.Map("fth-globe").Fields().Display((x, res) => + { + res.Url = "/settings/languages/edit/" + x.Id; + }); + opts.Map("fth-type").Fields("Value").Display((x, res) => + { + res.Description = x.Value; + res.Url = "/settings/translations/edit/" + x.Id; + }); + }); } } \ No newline at end of file diff --git a/zero.Core/Mails/ZeroMailModule.cs b/zero.Core/Mails/ZeroMailModule.cs index 7819d8d5..58b8871e 100644 --- a/zero.Core/Mails/ZeroMailModule.cs +++ b/zero.Core/Mails/ZeroMailModule.cs @@ -15,5 +15,14 @@ internal class ZeroMailModule : ZeroModule { opts.BuildViewPath = mail => $"~/Views/Mails/{mail.Template.Key.Replace('.', '/')}.cshtml"; }); + + services.Configure(opts => + { + opts.Map("fth-mail").Fields("Key").Display((x, res) => + { + res.Description = x.Key; + res.Url = "/settings/mailtemplates/edit/" + x.Id; + }); + }); } } \ No newline at end of file diff --git a/zero.Core/Search/Models/SearchIndexMap.cs b/zero.Core/Search/Models/SearchIndexMap.cs index 997a401e..e925fcc1 100644 --- a/zero.Core/Search/Models/SearchIndexMap.cs +++ b/zero.Core/Search/Models/SearchIndexMap.cs @@ -8,13 +8,14 @@ public class SearchIndexMap internal string _Icon; protected string _group; protected string[] _fields; + protected float _boost = 0; protected Func _modify; const string mapTemplate = @"map('{collection}', function (x) { return { Id: x.Id, Group: '{group}', - Name: x.Name, + Name: boost(x.Name, {boost}), IsActive: x.IsActive, Fields: [{fields}] }; @@ -33,7 +34,8 @@ public class SearchIndexMap { { "collection", store.Conventions.GetCollectionName(Type) }, { "group", _group }, - { "fields", BuildFieldArray(_fields) } + { "fields", BuildFieldArray(_fields) }, + { "boost", _boost.ToString() } }); } @@ -44,7 +46,7 @@ public class SearchIndexMap return String.Empty; } - return "x." + String.Join(", x.", fields); + return String.Join(", ", fields.Select(x => $"x.{x}")); //$"boost(x.{x}, {_boost})")); } internal bool CanModify(Type type) @@ -109,4 +111,10 @@ public class SearchIndexMap : SearchIndexMap where T : ZeroEntity _fields = fieldNames; return this; } + + public SearchIndexMap Boost(float boostValue) + { + _boost = boostValue; + return this; + } }