/** Datei: themes/lcars/assets.OLD/js/arunox/templates/login.js **/ /** * rest/arunox/templates/login.js * * Some Javascript codes without further description * * @author Sparky * @copyright 2025 ARUNOX * @version 2.0.0 * @since 2.0.0 Adaptation to new ctx method * @since 1.0.0 File is created */ ARUNOX.Templates.register( 'login', { extends : 'layout/section', hooks : { config : { priority : 5, callback : function( config, data ) { return { name : 'main_section', size : isMobile ? 'sm' : 'md', header : { html : 'h1', after : config.title, }, content : config?.content, footer : { left : { arx : { ref : 'reload', }, }, after : config.copyright, }, }; }, }, dynamicConfig : { once : true, priority : 6, hook : 'config', template : 'dynamic', callback : function( config, data ) { const loginConfig = { title : 'Login required', message : [ 'Enter login details' ], }; return Object.assignRecursive( config, { color : 'danger', header : { after : false, before : 'Locked', }, aside : { side : 'left', }, content : [ ARUNOX.Templates.config( 'div', { classes : [ 'error__wrapper' ], content : [ ARUNOX.Templates.config( 'div', { classes : 'error', content : [ ARUNOX.Templates.config( 'div', { classes : 'error__icon', innerHTML : ``, }), ARUNOX.Templates.config( 'div', { classes : 'error__text', content : [ ARUNOX.Templates.config( 'h1', { classes : 'error__caption', content : loginConfig.title, }), ARUNOX.Templates.config( 'div', { classes : 'error__message', content : loginConfig.message.join(' or '), }), ], }), ], }), ], }), ] }); }, }, afterRender : function( config, data ) { this.instance.container.classList.removeRexEx( /template--.*/ ); this.instance.container.classList.add( 'theme', 'template--login' ); this.instance.nodes.footer.nodes.left.replace( 'button', { icon : 'bi bi-arrow-clockwise', title : 'Reload', color : { color: 'danger', target: 'button' }, href : 'javascript:location.reload( true );void(0);', target : '_top', }); this.instance.render( 'notifications' ); }, }, }); /** Datei: themes/lcars/assets.OLD/js/arunox/templates/default.js **/ ARUNOX.Templates.register( 'default', { extends : 'layout/section', hooks : { config : { priority : 5, callback : function( config, data ) { return { name : 'main_section', header : { html : 'h1', size : ARUNOX.Utils.device.isMobile ? 'sm' : 'md', after : config.title, }, aside : { size : 'xl', }, content : config?.content, footer : { after : config.copyright, }, }; }, }, afterRender : function( config, data ) { this.instance.container.classList.removeRexEx( /template--.*/ ); this.instance.container.classList.add( 'theme' ); this.instance.nodes.footer.nodes.before.apply( 'addMenus', 'tools' ); this.instance.nodes.aside.nodes.before.apply( 'addMenus', 'sidebar' ); this.instance.render( 'notifications' ); }, }, });