SHA256
UI: обновить экраны входа
This commit is contained in:
@@ -4,29 +4,23 @@ export const pageMeta = { id: 'login-view', title: 'Войти', showAppChrome:
|
||||
|
||||
export function render({ navigate }) {
|
||||
const screen = document.createElement('section');
|
||||
screen.className = 'stack';
|
||||
|
||||
const cameraButton = document.createElement('button');
|
||||
cameraButton.className = 'primary-btn';
|
||||
cameraButton.type = 'button';
|
||||
cameraButton.textContent = 'Отсканировать QR-код';
|
||||
cameraButton.addEventListener('click', () => navigate('login-camera-view'));
|
||||
screen.className = 'stack auth-screen auth-screen--lower';
|
||||
|
||||
const loginButton = document.createElement('button');
|
||||
loginButton.className = 'ghost-btn';
|
||||
loginButton.type = 'button';
|
||||
loginButton.textContent = 'Войти по логину';
|
||||
loginButton.textContent = 'Войти по паролю';
|
||||
loginButton.addEventListener('click', () => navigate('login-password-view'));
|
||||
|
||||
const otherDeviceButton = document.createElement('button');
|
||||
otherDeviceButton.className = 'text-btn';
|
||||
otherDeviceButton.className = 'ghost-btn';
|
||||
otherDeviceButton.type = 'button';
|
||||
otherDeviceButton.textContent = 'Войти через другое устройство';
|
||||
otherDeviceButton.addEventListener('click', () => navigate('login-other-device-view'));
|
||||
|
||||
const actions = document.createElement('div');
|
||||
actions.className = 'auth-actions login-actions-wide';
|
||||
actions.append(cameraButton, loginButton, otherDeviceButton);
|
||||
actions.append(loginButton, otherDeviceButton);
|
||||
|
||||
const backButton = document.createElement('button');
|
||||
backButton.className = 'ghost-btn';
|
||||
@@ -34,13 +28,17 @@ export function render({ navigate }) {
|
||||
backButton.textContent = 'Назад';
|
||||
backButton.addEventListener('click', () => navigate('start-view'));
|
||||
|
||||
const panel = document.createElement('section');
|
||||
panel.className = 'login-panel stack';
|
||||
panel.innerHTML = '<h1 class="login-panel-title">Войти</h1>';
|
||||
panel.append(actions, backButton);
|
||||
|
||||
screen.append(
|
||||
renderHeader({
|
||||
title: 'Войти',
|
||||
leftAction: { label: '←', onClick: () => navigate('start-view') },
|
||||
}),
|
||||
actions,
|
||||
backButton,
|
||||
panel,
|
||||
);
|
||||
|
||||
return screen;
|
||||
|
||||
Reference in New Issue
Block a user