open-nomad/ui/app/components/das/dismissed.js

22 lines
650 B
JavaScript
Raw Normal View History

import Component from '@glimmer/component';
import localStorageProperty from 'nomad-ui/utils/properties/local-storage';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
export default class DasDismissedComponent extends Component {
@localStorageProperty('nomadRecommendationDismssalUnderstood', false) explanationUnderstood;
@tracked dismissInTheFuture = false;
@action
proceedAutomatically() {
this.args.proceed({ manuallyDismissed: false });
}
@action
understoodClicked() {
this.explanationUnderstood = this.dismissInTheFuture;
this.args.proceed({ manuallyDismissed: true });
}
}