mirror of
https://github.com/discourse/discourse-solved.git
synced 2025-07-06 22:02:13 +00:00
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}}
|
{{#if show}}
|
||||||
{{#topic-navigation-popup}}
|
{{#topic-navigation-popup popupId="solved-notice" dismissDuration=oneWeek}}
|
||||||
<h3>{{i18n "solved.no_answer.title"}}</h3>
|
<h3>{{i18n "solved.no_answer.title"}}</h3>
|
||||||
<p>{{i18n "solved.no_answer.description"}}</p>
|
<p>{{i18n "solved.no_answer.description"}}</p>
|
||||||
{{/topic-navigation-popup}}
|
{{/topic-navigation-popup}}
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
import { later } from "@ember/runloop";
|
import { later } from "@ember/runloop";
|
||||||
|
|
||||||
// 7 days in milliseconds
|
const ONE_WEEK = 7 * 24 * 60 * 60 * 1000; // milliseconds
|
||||||
const MAX_DURATION_WITH_NO_ANSWER = 7 * 24 * 60 * 60 * 1000;
|
const MAX_DURATION_WITH_NO_ANSWER = ONE_WEEK;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
setupComponent(args, component) {
|
setupComponent(args, component) {
|
||||||
component.set("show", false);
|
component.set("show", false);
|
||||||
|
component.setProperties({
|
||||||
|
oneWeek: ONE_WEEK,
|
||||||
|
show: false,
|
||||||
|
});
|
||||||
|
|
||||||
later(() => {
|
later(() => {
|
||||||
if (
|
if (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user