github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/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) explanationUnderstood;
     8  
     9    @tracked dismissInTheFuture = false;
    10  
    11    @action
    12    proceedAutomatically() {
    13      this.args.proceed({ manuallyDismissed: false });
    14    }
    15  
    16    @action
    17    understoodClicked() {
    18      this.explanationUnderstood = this.dismissInTheFuture;
    19      this.args.proceed({ manuallyDismissed: true });
    20    }
    21  }