File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Nodejs/Product/Nodejs/NpmUI Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 33using System ;
44using System . Collections . Generic ;
55using System . Linq ;
6+ using System . Windows ;
67using Microsoft . NodejsTools . Npm ;
78
89namespace Microsoft . NodejsTools . NpmUI
@@ -34,12 +35,26 @@ protected PackageCatalogEntryViewModel(
3435 }
3536
3637 public virtual string Name { get ; }
38+
39+ public string Version => this . version ? . ToString ( ) ?? string . Empty ;
40+
3741 public IEnumerable < SemverVersion > AvailableVersions { get ; }
42+
3843 public string Author { get ; }
44+ public Visibility AuthorVisibility => string . IsNullOrEmpty ( this . Author ) ? Visibility . Collapsed : Visibility . Visible ;
45+
3946 public string Description { get ; }
47+ public Visibility DescriptionVisibility => string . IsNullOrEmpty ( this . Description ) ? Visibility . Collapsed : Visibility . Visible ;
48+
4049 public IEnumerable < string > Homepages { get ; }
50+ public Visibility HomepagesVisibility => this . Homepages . Any ( ) ? Visibility . Visible : Visibility . Collapsed ;
51+
4152 public string Keywords { get ; }
4253
54+ public bool IsInstalledLocally => this . localVersion . HasValue ;
55+ public bool IsLocalInstallOutOfDate => this . localVersion . HasValue && this . localVersion < this . version ;
56+ public string LocalVersion => this . localVersion ? . ToString ( ) ?? string . Empty ;
57+
4358 public override string ToString ( )
4459 {
4560 return this . Name ;
You can’t perform that action at this time.
0 commit comments