reload on login for compatibility with autologout

This commit is contained in:
Bachir Soussi Chiadmi 2021-09-02 15:09:35 +02:00
parent bc16158162
commit a535a2e3cf
9 changed files with 38 additions and 50 deletions

View File

@ -1,17 +0,0 @@
uuid: a050024d-e271-4be0-9142-6dda5ddaa561
langcode: en
status: true
dependencies:
module:
- dblog
title: 'Remove expired log messages and flood control events'
id: dblog_cron
weight: 0
module: dblog
callback: dblog_cron
scheduler:
id: simple
launcher:
id: serial
logger:
id: database

View File

@ -10,7 +10,7 @@ enforce_admin: false
jstimer_format: '%hours%:%mins%:%secs%' jstimer_format: '%hours%:%mins%:%secs%'
jstimer_js_load_option: false jstimer_js_load_option: false
use_alt_logout_method: true use_alt_logout_method: true
use_watchdog: true use_watchdog: false
langcode: fr langcode: fr
_core: _core:
default_config_hash: m2pxH8tc4KIlh127R5TYim65W7NBY9gpYQnIXlvDp0M default_config_hash: m2pxH8tc4KIlh127R5TYim65W7NBY9gpYQnIXlvDp0M

View File

@ -23,6 +23,12 @@ filters:
weight: 0 weight: 0
settings: settings:
filter_url_length: 72 filter_url_length: 72
filter_html_image_secure:
id: filter_html_image_secure
provider: filter
status: true
weight: 9
settings: { }
filter_url_to_video: filter_url_to_video:
id: filter_url_to_video id: filter_url_to_video
provider: url_to_video_filter provider: url_to_video_filter
@ -39,6 +45,12 @@ filters:
status: true status: true
weight: 0 weight: 0
settings: { } settings: { }
editor_file_reference:
id: editor_file_reference
provider: editor
status: true
weight: 0
settings: { }
filter_html: filter_html:
id: filter_html id: filter_html
provider: filter provider: filter
@ -48,15 +60,3 @@ filters:
allowed_html: '<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src alt data-entity-type data-entity-uuid> <s> <p> <h1> <pre>' allowed_html: '<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src alt data-entity-type data-entity-uuid> <s> <p> <h1> <pre>'
filter_html_help: true filter_html_help: true
filter_html_nofollow: false filter_html_nofollow: false
editor_file_reference:
id: editor_file_reference
provider: editor
status: true
weight: 0
settings: { }
filter_html_image_secure:
id: filter_html_image_secure
provider: filter
status: true
weight: 9
settings: { }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -32,3 +32,4 @@ global-js:
# - url_to_video_filter/player_embed # - url_to_video_filter/player_embed
# - url_to_video_filter/vimeo_embed # - url_to_video_filter/vimeo_embed
# - url_to_video_filter/youtube_embed # - url_to_video_filter/youtube_embed

View File

@ -9,7 +9,7 @@ export default {
const img = figure.querySelector('img:not(.blank)') const img = figure.querySelector('img:not(.blank)')
figure.classList.add('loading') figure.classList.add('loading')
img.addEventListener('load', function (e) { img.addEventListener('load', function (e) {
console.log('img loaded', e) // console.log('img loaded', e)
figure.classList.remove('loading') figure.classList.remove('loading')
figure.classList.add('loaded') figure.classList.add('loaded')
}) })
@ -57,14 +57,14 @@ export default {
}, },
mounted () { mounted () {
// lazy load images on mouseover // lazy load images on mouseover
console.log('card mounted', this.$options.name) // console.log('card mounted', this.$options.name)
// if (this.$options.name ==! 'ModalCard') { // if (this.$options.name ==! 'ModalCard') {
this.activateLazyLoad() this.activateLazyLoad()
// } // }
}, },
updated () { updated () {
// lazy load images on mouseover // lazy load images on mouseover
console.log('card updated', this.$options.name) // console.log('card updated', this.$options.name)
// if (this.$options.name ==! 'ModalCard') { // if (this.$options.name ==! 'ModalCard') {
this.activateLazyLoad() this.activateLazyLoad()
// } // }
@ -72,7 +72,7 @@ export default {
methods: { methods: {
// used by ModalCard // used by ModalCard
activateLazyLoad () { activateLazyLoad () {
console.log('card activateLazyLoad', this.$options.name) // console.log('card activateLazyLoad', this.$options.name)
this.$el.addEventListener('mouseover', function (event) { this.$el.addEventListener('mouseover', function (event) {
const figures = this.querySelectorAll('.images figure.lazy:not(.loaded):not(.loading)') const figures = this.querySelectorAll('.images figure.lazy:not(.loaded):not(.loading)')

View File

@ -180,15 +180,19 @@ export default {
commit('setToken', response.data) commit('setToken', response.data)
dispatch('getUser').then(userdata => { dispatch('getUser').then(userdata => {
console.log('User Loggedin', state.isAdmin, state.isAdherent) console.log('User Loggedin', state.isAdmin, state.isAdherent)
if (state.isAdmin) { // have to reload systematicly because of autologout library not loaded if not logged in the begining
window.location.reload(true) // if (state.isAdmin) {
} // window.location.reload()
// }
if (state.isAdherent) { if (state.isAdherent) {
router.push({ // router.push({
name: 'base' // name: 'base'
}) // })
// TODO: openCloseHamMenu(false) // // TODO: openCloseHamMenu(false)
dispatch('Common/openCloseHamMenu', false) // dispatch('Common/openCloseHamMenu', false)
window.location = '/base'
} else {
window.location.reload()
} }
resolve() resolve()
}) })