FIX: Add a popupId to store state (#186)
The dismissed state will be stored in local storage because popupId is present now.
This commit is contained in:
parent
a5b36dc344
commit
833070e2a1
|
@ -1,5 +1,5 @@
|
|||
{{#if show}}
|
||||
{{#topic-navigation-popup}}
|
||||
{{#topic-navigation-popup popupId="solved-notice" dismissDuration=oneWeek}}
|
||||
<h3>{{i18n "solved.no_answer.title"}}</h3>
|
||||
<p>{{i18n "solved.no_answer.description"}}</p>
|
||||
{{/topic-navigation-popup}}
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
import { later } from "@ember/runloop";
|
||||
|
||||
// 7 days in milliseconds
|
||||
const MAX_DURATION_WITH_NO_ANSWER = 7 * 24 * 60 * 60 * 1000;
|
||||
const ONE_WEEK = 7 * 24 * 60 * 60 * 1000; // milliseconds
|
||||
const MAX_DURATION_WITH_NO_ANSWER = ONE_WEEK;
|
||||
|
||||
export default {
|
||||
setupComponent(args, component) {
|
||||
component.set("show", false);
|
||||
component.setProperties({
|
||||
oneWeek: ONE_WEEK,
|
||||
show: false,
|
||||
});
|
||||
|
||||
later(() => {
|
||||
if (
|
||||
|
|
Loading…
Reference in New Issue