web2app-spa
Version:
This template is primarily designed to easily convert HTML pages and URLs into a Capacitor/Cordova based iOS/Android app that can be used as Single-page application (SPA).
1 lines • 1.86 kB
JavaScript
const loginView={create:function(){loginView.box=createBox(0,0,settings.USED_WIDTH,getDefaultContainerBox().height),that.border=0,that.element.style.backgroundImage="radial-gradient(white, white, lightgray)",that.setMotion("opacity 0.3s, transform 0.5s"),loginView.box.b1=createBox(0,0,500,480),loginView.box.add(that),that.color="white",that.border=0,that.borderColor="rgba(0, 0, 0, 0.05)",that.element.style.boxShadow="0px 0px 30px rgba(0, 0, 0, 0.1)",that.round=13,that.center(),loginView.box.b1.imgLogo=createImage(0,50,60,60),loginView.box.b1.add(that),that.load("assets/login-view/lock.png"),that.opacity=1,that.center("left"),loginView.box.b1.txtName=createTextBox(0,200,400),loginView.box.b1.add(that),that.title="User Name:",that.text="admin",that.color="#f6f6f6",that.border=0,that.round=8,that.minimal=1,that.center("left"),loginView.box.b1.txtPass=createTextBox(0,300,400),loginView.box.b1.add(that),that.title="Password:",that.text="1111",that.color="#f6f6f6",that.border=0,that.round=8,that.minimal=1,that.center("left"),that.inputElement.setAttribute("type","password"),loginView.box.b1.btnLogin=createButton(),loginView.box.b1.add(that),that.text="Log in",that.width=150,that.fontSize=24,that.aline(loginView.box.b1.txtPass,"bottom",40),that.right=50,that.round=4,that.color="#5ABB9F",that.minimal=0,that.onClick((function(){loginView.box.visible=0})),UIToggle.resetDefault(),UIToggle.default.backgroundOnColor="#5ABB9F",loginView.box.b1.rememberUIToggle=UIToggle.create(),loginView.box.b1.add(that),that.setValue(1),that.aline(loginView.box.b1.txtPass,"bottom",45),loginView.box.b1.lblBoxRemember=createLabel(),loginView.box.b1.add(that),that.text="Remember me",that.aline(loginView.box.b1.rememberUIToggle,"right",10,"center"),that.fontSize=16,loginView.hide()},show:function(){loginView.box.visible=1},hide:function(){loginView.box.visible=0}};