github.com/hernad/nomad@v1.6.112/ui/app/components/das/dismissed.js (about) 1 /** 2 * Copyright (c) HashiCorp, Inc. 3 * SPDX-License-Identifier: MPL-2.0 4 */ 5 6 import Component from '@glimmer/component'; 7 import localStorageProperty from 'nomad-ui/utils/properties/local-storage'; 8 import { tracked } from '@glimmer/tracking'; 9 import { action } from '@ember/object'; 10 11 export default class DasDismissedComponent extends Component { 12 @localStorageProperty('nomadRecommendationDismssalUnderstood', false) 13 explanationUnderstood; 14 15 @tracked dismissInTheFuture = false; 16 17 @action 18 proceedAutomatically() { 19 this.args.proceed({ manuallyDismissed: false }); 20 } 21 22 @action 23 understoodClicked() { 24 this.explanationUnderstood = this.dismissInTheFuture; 25 this.args.proceed({ manuallyDismissed: true }); 26 } 27 }