github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/components/das/dismissed.js (about)

     1  import Component from '@glimmer/component';
     2  import localStorageProperty from 'nomad-ui/utils/properties/local-storage';
     3  import { tracked } from '@glimmer/tracking';
     4  import { action } from '@ember/object';
     5  
     6  export default class DasDismissedComponent extends Component {
     7    @localStorageProperty('nomadRecommendationDismssalUnderstood', false)
     8    explanationUnderstood;
     9  
    10    @tracked dismissInTheFuture = false;
    11  
    12    @action
    13    proceedAutomatically() {
    14      this.args.proceed({ manuallyDismissed: false });
    15    }
    16  
    17    @action
    18    understoodClicked() {
    19      this.explanationUnderstood = this.dismissInTheFuture;
    20      this.args.proceed({ manuallyDismissed: true });
    21    }
    22  }