diff --git a/gringotts-frontend/pages/login/main.js b/gringotts-frontend/pages/login/main.js index 1f8d5f3..9982ae1 100644 --- a/gringotts-frontend/pages/login/main.js +++ b/gringotts-frontend/pages/login/main.js @@ -4,74 +4,103 @@ import {userRegisterDialog} from '../../components/user/dialog-user-register.js' useAmis(information => { return { type: 'page', - title: information.title, - subTitle: '统一登陆入口', + className: 'h-screen bg-gray-900', + bodyClassName: 'h-full flex items-start mt-20', body: [ { - type: 'grid', - columns: [ + type: 'wrapper', + className: 'relative w-full max-w-md mx-auto', + body: [ { - xs: 0, - sm: 0, - md: 4, - body: [], + type: 'flex', + justify: 'center', + className: 'mb-8', + items: [ + { + type: 'avatar', + src: '/logo.svg', + shape: 'square', + size: 64, + fit: 'contain', + className: 'mr-4 bg-transparent' + }, + { + type: 'flex', + direction: 'column', + justify: 'center', + items: [ + { + type: 'tpl', + tpl: information.title, + className: 'text-2xl font-bold text-white' + }, + { + type: 'tpl', + tpl: '统一登录入口', + className: 'text-lg ml-1 mt-1 text-gray-100' + } + ] + } + ] }, { - xs: 12, - sm: 12, - md: 4, + type: 'form', + className: 'bg-white rounded-xl p-10 shadow-2xl', + api: '${base}/user/login', + redirect: '/pages/index/index.html?token=${token}', + mode: 'normal', + wrapWithPanel: false, body: [ { - type: 'form', - title: '用户登陆', - api: '${base}/user/login', - redirect: '/pages/index/index.html?token=${token}', - mode: 'horizontal', - horizontal: { - left: 2, - }, - actions: [ + type: 'input-email', + name: 'username', + label: false, + placeholder: '请输入邮箱', + required: true, + clearable: true, + className: 'mb-4', + inputClassName: 'rounded-lg', + }, + { + type: 'input-password', + name: 'password', + label: false, + placeholder: '请输入密码', + required: true, + className: 'mb-4', + inputClassName: 'rounded-lg', + }, + { + type: 'flex', + justify: 'space-between', + className: 'mb-4', + items: [ { - type: 'action', - label: '注册', + type: 'button', + label: '注册账号', + className: 'text-blue-600 hover:text-blue-700', + level: 'link', ...userRegisterDialog(), }, { - type: 'action', - actionType: 'submit', - label: '登陆', - level: 'primary', - }, - ], - body: [ - { - type: 'input-email', - name: 'username', - label: '邮箱', - placeholder: '请输入邮箱', - required: true, - clearable: true, - clearValueOnEmpty: true, - }, - { - type: 'input-password', - name: 'password', - label: '密码', - placeholder: '请再次输入密码', - required: true, - }, - ], + type: 'button', + label: '忘记密码?', + level: 'link', + className: 'text-gray-600 hover:text-gray-700' + } + ] }, - ], - }, - { - xs: 0, - sm: 0, - md: 4, - body: [], - }, - ], - }, - ], + { + type: 'submit', + label: '登录', + level: 'primary', + className: 'w-full rounded-lg', + size: 'lg' + } + ] + } + ] + } + ] } })