| Conditions | 3 |
| Total Lines | 16 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import template from './sw-admin.html.twig'; |
||
| 34 | |||
| 35 | created() { |
||
| 36 | this.channel = new BroadcastChannel('session_channel'); |
||
| 37 | this.channel.onmessage = (event) => { |
||
| 38 | const data = event.data as { inactive?: boolean }; |
||
| 39 | |||
| 40 | if (!data || !Shopware.Utils.object.hasOwnProperty(data, 'inactive')) { |
||
| 41 | return; |
||
| 42 | } |
||
| 43 | |||
| 44 | const routeBlocklist = ['sw.inactivity.login.index', 'sw.login.index.login']; |
||
| 45 | if (!data.inactive || routeBlocklist.includes(this.$router.currentRoute.name || '')) { |
||
| 46 | return; |
||
| 47 | } |
||
| 48 | |||
| 49 | this.loginService.forwardLogout(true, true); |
||
| 50 | }; |
||
| 63 |