-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.js
More file actions
19 lines (15 loc) · 790 Bytes
/
index.js
File metadata and controls
19 lines (15 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/// <reference types="@altv/types-client" />
/// <reference types="@altv/types-natives" />
import alt from 'alt-client';
import * as native from 'natives';
let web;
alt.onServer('client::auth:init', init);
function init(){
if (webview === undefined) {
webview = new alt.WebView('http://resource/client/hud/html/index.html');
webview.focus();
}
webview.on('cef::auth:authorization', (data) => alt.emitServer('server:auth:authorization', { login: data.login, password: data.password }))
webview.on('cef::auth:registration', (data) => alt.emitServer('server:auth:registration', { login: data.login, password: data.password, email: data.email }))
webview.on('cef::auth:recovery', (data) => alt.emitServer('server:auth:recovery', { email: data.email }))
}