@@ -499,6 +499,7 @@ export namespace theme {
499499 includeVscode : boolean ;
500500 includeNeovim : boolean ;
501501 selectedNeovimConfig : string ;
502+ includedApps ?: Record < string , boolean > ;
502503 excludedApps ?: Record < string , boolean > ;
503504
504505 static createFrom ( source : any = { } ) {
@@ -511,6 +512,7 @@ export namespace theme {
511512 this . includeVscode = source [ "includeVscode" ] ;
512513 this . includeNeovim = source [ "includeNeovim" ] ;
513514 this . selectedNeovimConfig = source [ "selectedNeovimConfig" ] ;
515+ this . includedApps = source [ "includedApps" ] ;
514516 this . excludedApps = source [ "excludedApps" ] ;
515517 }
516518 }
@@ -560,91 +562,6 @@ export namespace theme {
560562 return a ;
561563 }
562564 }
563-
564- static createFrom ( source : any = { } ) {
565- return new ApplyResult ( source ) ;
566- }
567-
568- constructor ( source : any = { } ) {
569- if ( 'string' === typeof source ) source = JSON . parse ( source ) ;
570- this . success = source [ 'success' ] ;
571- this . isOmarchy = source [ 'isOmarchy' ] ;
572- this . themePath = source [ 'themePath' ] ;
573- }
574- }
575- export class Settings {
576- includeZed : boolean ;
577- includeVscode : boolean ;
578- includeNeovim : boolean ;
579- selectedNeovimConfig : string ;
580- includedApps ?: Record < string , boolean > ;
581- excludedApps ?: Record < string , boolean > ;
582-
583- static createFrom ( source : any = { } ) {
584- return new Settings ( source ) ;
585- }
586-
587- constructor ( source : any = { } ) {
588- if ( 'string' === typeof source ) source = JSON . parse ( source ) ;
589- this . includeZed = source [ 'includeZed' ] ;
590- this . includeVscode = source [ 'includeVscode' ] ;
591- this . includeNeovim = source [ 'includeNeovim' ] ;
592- this . selectedNeovimConfig = source [ 'selectedNeovimConfig' ] ;
593- this . includedApps = source [ 'includedApps' ] ;
594- this . excludedApps = source [ 'excludedApps' ] ;
595- }
596- }
597- export class StateSnapshot {
598- palette : string [ ] ;
599- wallpaperPath : string ;
600- lightMode : boolean ;
601- lockedColors : Record < number , boolean > ;
602- colorRoles : template . ColorRoles ;
603- extendedColors : Record < string , string > ;
604- extractionMode : string ;
605- additionalImages : string [ ] ;
606- appOverrides : Record < string , any > ;
607-
608- static createFrom ( source : any = { } ) {
609- return new StateSnapshot ( source ) ;
610- }
611-
612- constructor ( source : any = { } ) {
613- if ( 'string' === typeof source ) source = JSON . parse ( source ) ;
614- this . palette = source [ 'palette' ] ;
615- this . wallpaperPath = source [ 'wallpaperPath' ] ;
616- this . lightMode = source [ 'lightMode' ] ;
617- this . lockedColors = source [ 'lockedColors' ] ;
618- this . colorRoles = this . convertValues (
619- source [ 'colorRoles' ] ,
620- template . ColorRoles
621- ) ;
622- this . extendedColors = source [ 'extendedColors' ] ;
623- this . extractionMode = source [ 'extractionMode' ] ;
624- this . additionalImages = source [ 'additionalImages' ] ;
625- this . appOverrides = source [ 'appOverrides' ] ;
626- }
627-
628- convertValues ( a : any , classs : any , asMap : boolean = false ) : any {
629- if ( ! a ) {
630- return a ;
631- }
632- if ( a . slice && a . map ) {
633- return ( a as any [ ] ) . map ( elem =>
634- this . convertValues ( elem , classs )
635- ) ;
636- } else if ( 'object' === typeof a ) {
637- if ( asMap ) {
638- for ( const key of Object . keys ( a ) ) {
639- a [ key ] = new classs ( a [ key ] ) ;
640- }
641- return a ;
642- }
643- return new classs ( a ) ;
644- }
645- return a ;
646- }
647- }
648565}
649566
650567export namespace wallhaven {
0 commit comments