File tree Expand file tree Collapse file tree 2 files changed +52
-1
lines changed
VirtoCommerce.Platform.Core/Extensions
VirtoCommerce.Platform.Web/wwwroot/css/themes/main/sass/modules Expand file tree Collapse file tree 2 files changed +52
-1
lines changed Original file line number Diff line number Diff line change 1+ using System . Text ;
2+
3+ namespace VirtoCommerce . Platform . Core . Extensions ;
4+
5+ public static class UrlExtensions
6+ {
7+ public static string TrimLastSlash ( this string url )
8+ {
9+ var result = url . EndsWith ( '/' ) ? url [ ..^ 1 ] : url ;
10+
11+ return result ;
12+ }
13+
14+ /// <summary>
15+ /// Normalize values like "/reset/" and "reset" to "/reset"
16+ /// </summary>
17+ public static string NormalizeUrlSuffix ( this string urlSuffix )
18+ {
19+ if ( urlSuffix == "/" )
20+ {
21+ return urlSuffix ;
22+ }
23+
24+ var result = new StringBuilder ( urlSuffix ) ;
25+
26+ if ( ! string . IsNullOrEmpty ( urlSuffix ) )
27+ {
28+ if ( ! urlSuffix . StartsWith ( '/' ) )
29+ {
30+ result . Insert ( 0 , '/' ) ;
31+ }
32+
33+ if ( urlSuffix . EndsWith ( '/' ) )
34+ {
35+ result . Remove ( result . Length - 1 , 1 ) ;
36+ }
37+ }
38+
39+ return result . ToString ( ) ;
40+ }
41+ }
Original file line number Diff line number Diff line change @@ -613,4 +613,14 @@ i.fa-password
613613 float : right
614614 color : #319ED4
615615 padding-left : 26px
616-
616+
617+ /* Tags input */
618+ tags-input
619+ & .ng-invalid
620+ .tags
621+ border-color : #fce7e6
622+ background : #fef8f7
623+ box-shadow : none
624+
625+ input
626+ background : #fef8f7
You can’t perform that action at this time.
0 commit comments