When login don't reload the whole browser. Just rebuilt screens

This commit is contained in:
djmaze 2021-11-01 11:24:11 +01:00
parent d3500e2921
commit e52addf346
16 changed files with 74 additions and 57 deletions

View file

@ -133,7 +133,7 @@ export const
* @param {boolean} admin
* @param {string} language
*/
reload = (admin, language) =>
translatorReload = (admin, language) =>
new Promise((resolve, reject) => {
const script = createElement('script');
script.onload = () => {

View file

@ -10,6 +10,8 @@ export const
isFunction = v => typeof v === 'function',
pString = value => null != value ? '' + value : '',
forEachObjectValue = (obj, fn) => Object.values(obj).forEach(fn),
pInt = (value, defaultValue = 0) => {
value = parseInt(value, 10);
return isNaN(value) || !isFinite(value) ? defaultValue : value;