Skip to content

Node.js based forum software built for the modern web

Revert "fix: only show email confirmation warning toast on pages that it applies"

Julian Lam5a328485ddb5
diff --git a/public/src/app.js b/public/src/app.js
index 14e45d2794..d909fd9f15 100644
--- a/public/src/app.js
+++ b/public/src/app.js
@@ -97,6 +97,7 @@ app.cacheBuster = null;
});
createHeaderTooltips();
+ app.showEmailConfirmWarning();
app.showCookieWarning();
registerServiceWorker();
@@ -754,24 +755,7 @@ app.cacheBuster = null;
app.showEmailConfirmWarning = async (err) => {
const storage = await app.require('storage');
- let showModal = false;
- switch (ajaxify.data.template.name) {
- case 'recent': {
- showModal = !ajaxify.data.canPost;
- break;
- }
-
- case 'category': {
- showModal = !ajaxify.data.privileges['topics:create'];
- break;
- }
-
- case 'topic': {
- showModal = !ajaxify.data.privileges['topics:reply'];
- }
- }
-
- if (!showModal || !app.user.uid || parseInt(storage.getItem('email-confirm-dismiss'), 10) === 1) {
+ if (!app.user.uid || parseInt(storage.getItem('email-confirm-dismiss'), 10) === 1) {
return;
}
const msg = {
diff --git a/public/src/client/category.js b/public/src/client/category.js
index 92cb42e061..03d63bae86 100644
--- a/public/src/client/category.js
+++ b/public/src/client/category.js
@@ -48,8 +48,6 @@ define('forum/category', [
},
});
- app.showEmailConfirmWarning();
-
hooks.fire('action:topics.loaded', { topics: ajaxify.data.topics });
hooks.fire('action:category.loaded', { cid: ajaxify.data.cid });
};
diff --git a/public/src/client/recent.js b/public/src/client/recent.js
index e54415d814..9d0a9904a2 100644
--- a/public/src/client/recent.js
+++ b/public/src/client/recent.js
@@ -7,7 +7,6 @@ define('forum/recent', ['topicList'], function (topicList) {
app.enterRoom('recent_topics');
topicList.init('recent');
- app.showEmailConfirmWarning();
};
return Recent;
diff --git a/public/src/client/topic.js b/public/src/client/topic.js
index bc0a340be3..5cc2da69a5 100644
--- a/public/src/client/topic.js
+++ b/public/src/client/topic.js
@@ -74,7 +74,6 @@ define('forum/topic', [
$(window).on('scroll', updateTopicTitle);
handleTopicSearch();
- app.showEmailConfirmWarning();
hooks.fire('action:topic.loaded', ajaxify.data);
};