diff --git a/zero.Core/Entities/Links/Link.cs b/zero.Core/Entities/Links/Link.cs index 80425d67..bb0c6fc1 100644 --- a/zero.Core/Entities/Links/Link.cs +++ b/zero.Core/Entities/Links/Link.cs @@ -11,8 +11,6 @@ namespace zero.Core.Entities public string UrlSuffix { get; set; } - public string Label { get; set; } - public string Title { get; set; } public Dictionary Values { get; set; } = new(); @@ -34,8 +32,6 @@ namespace zero.Core.Entities string UrlSuffix { get; set; } - string Label { get; set; } - string Title { get; set; } Dictionary Values { get; set; } diff --git a/zero.Core/Extensions/StringExtensions.cs b/zero.Core/Extensions/StringExtensions.cs index 533963b1..881d1613 100644 --- a/zero.Core/Extensions/StringExtensions.cs +++ b/zero.Core/Extensions/StringExtensions.cs @@ -168,5 +168,21 @@ namespace zero.Core.Extensions return newLineCharsRegex.Replace(input, String.Empty).Trim(); } + + + public static string Shorten(this string input, int maxLength) + { + if (maxLength < 4) + { + throw new ArgumentOutOfRangeException("maxLength", "Has to be at least 4 characters long"); + } + + if (String.IsNullOrEmpty(input) || input.Length <= maxLength) + { + return input; + } + + return input.Substring(0, maxLength - 3) + "..."; + } } } diff --git a/zero.Web.UI/App/core/plugin.zero.js b/zero.Web.UI/App/core/plugin.zero.js index 652de18b..af7d7d3e 100644 --- a/zero.Web.UI/App/core/plugin.zero.js +++ b/zero.Web.UI/App/core/plugin.zero.js @@ -17,7 +17,7 @@ plugin.addRoutes(routes); plugin.install = (vue, zero) => { - console.info(vue, zero); + }; export default plugin; \ No newline at end of file