mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-05 05:25:49 +01:00
Revert "fix: only show email confirmation warning toast on pages that it applies"
This reverts commit 1bd1cc74a4.
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user