diff --git a/routes/settings.js b/routes/settings.js index c1bb7ca..489b690 100644 --- a/routes/settings.js +++ b/routes/settings.js @@ -93,6 +93,7 @@ router.post('/configs', async (req, res) => { res.render('dashboard/import-export', { level, message, + invalidate_session: level === 'success', }); }); diff --git a/utils/data/transfers.js b/utils/data/transfers.js index 69198e3..fa74187 100644 --- a/utils/data/transfers.js +++ b/utils/data/transfers.js @@ -97,7 +97,7 @@ export default class Transfers { return { level: 'success', - message: 'Import successful!', + message: 'Import successful! You will now be logged out.', }; } catch (error) { logError(logTags.Configs, error); @@ -176,8 +176,8 @@ export default class Transfers { 'newsletter.show_subscription', 'newsletter.show_featured_image', 'newsletter.show_powered_by_ghost', + 'newsletter.custom_subject_pattern', 'newsletter.show_powered_by_ghosler', - // 'newsletter.custom_subject_pattern', 'custom_template', 'custom_template.enabled', diff --git a/views/partials/common/message.ejs b/views/partials/common/message.ejs index 9c5b0e9..063c25d 100644 --- a/views/partials/common/message.ejs +++ b/views/partials/common/message.ejs @@ -15,6 +15,10 @@ alertMessage.style.margin = '0'; alertMessage.style.padding = '0'; }, 500); + + <% if ((typeof invalidate_session !== 'undefined' && invalidate_session === true)) { %> + window.location.href = '/logout'; + <% } %> }, 3000); <% } %> \ No newline at end of file