@ratiosolver/flick 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.d.ts +61 -0
- package/dist/app.js +61 -0
- package/dist/app.js.map +1 -0
- package/dist/component.d.ts +120 -0
- package/dist/component.js +161 -0
- package/dist/component.js.map +1 -0
- package/dist/components/app.d.ts +1 -1
- package/dist/components/app.js +2 -2
- package/dist/components/app.js.map +1 -1
- package/dist/components/brand.d.ts +15 -0
- package/dist/components/brand.js +39 -0
- package/dist/components/brand.js.map +1 -0
- package/dist/components/checkbox.d.ts +49 -0
- package/dist/components/checkbox.js +77 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/sidebar.d.ts +5 -0
- package/dist/components/sidebar.js +36 -0
- package/dist/components/sidebar.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/blink.d.ts +14 -0
- package/dist/utils/blink.js +28 -0
- package/dist/utils/blink.js.map +1 -0
- package/dist/utils/connection.d.ts +102 -0
- package/dist/utils/connection.js +177 -0
- package/dist/utils/connection.js.map +1 -0
- package/dist/utils/selector.d.ts +59 -0
- package/dist/utils/selector.js +44 -0
- package/dist/utils/selector.js.map +1 -0
- package/dist/utils/settings.d.ts +61 -0
- package/dist/utils/settings.js +72 -0
- package/dist/utils/settings.js.map +1 -0
- package/dist/utils/user_components.d.ts +83 -0
- package/dist/utils/user_components.js +358 -0
- package/dist/utils/user_components.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export declare class Settings {
|
|
2
|
+
private secure;
|
|
3
|
+
private hostname;
|
|
4
|
+
private port;
|
|
5
|
+
private ws_path;
|
|
6
|
+
private static instance;
|
|
7
|
+
private constructor();
|
|
8
|
+
static get_instance(): Settings;
|
|
9
|
+
/**
|
|
10
|
+
* Checks if the connection is secure.
|
|
11
|
+
*
|
|
12
|
+
* @returns {boolean} Returns true if the connection is secure, otherwise false.
|
|
13
|
+
*/
|
|
14
|
+
is_secure(): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Returns the protocol based on the `secure` property.
|
|
17
|
+
*
|
|
18
|
+
* @returns `'https'` if the connection is secure, otherwise `'http'`.
|
|
19
|
+
*/
|
|
20
|
+
get_protocol(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves the current hostname.
|
|
23
|
+
*
|
|
24
|
+
* @returns The hostname as a string.
|
|
25
|
+
*/
|
|
26
|
+
get_hostname(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves the current port.
|
|
29
|
+
*
|
|
30
|
+
* @returns The port number as a number.
|
|
31
|
+
*/
|
|
32
|
+
get_port(): number;
|
|
33
|
+
/**
|
|
34
|
+
* Returns the appropriate WebSocket protocol based on the security setting.
|
|
35
|
+
*
|
|
36
|
+
* @returns {string} Returns 'wss' if the connection is secure, otherwise returns 'ws'.
|
|
37
|
+
*/
|
|
38
|
+
get_ws_protocol(): string;
|
|
39
|
+
/**
|
|
40
|
+
* Retrieves the current WebSocket path.
|
|
41
|
+
*
|
|
42
|
+
* @returns {string} The WebSocket path stored in the instance.
|
|
43
|
+
*/
|
|
44
|
+
get_ws_path(): string;
|
|
45
|
+
/**
|
|
46
|
+
* Constructs and returns the full host URL as a string, including the protocol, hostname, and port.
|
|
47
|
+
*
|
|
48
|
+
* @returns {string} The complete host URL in the format: protocol://hostname:port
|
|
49
|
+
*/
|
|
50
|
+
get_host(): string;
|
|
51
|
+
/**
|
|
52
|
+
* Constructs and returns the full WebSocket host URL as a string.
|
|
53
|
+
*
|
|
54
|
+
* The URL is composed of the WebSocket protocol (as determined by `get_ws_protocol()`),
|
|
55
|
+
* the hostname, port, and WebSocket path.
|
|
56
|
+
*
|
|
57
|
+
* @returns {string} The complete WebSocket host URL (e.g., `ws://hostname:port/path`).
|
|
58
|
+
*/
|
|
59
|
+
get_ws_host(): string;
|
|
60
|
+
load_settings(settings: any): void;
|
|
61
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export class Settings {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.secure = location.protocol === 'https:';
|
|
4
|
+
this.hostname = location.hostname;
|
|
5
|
+
this.port = Number(location.port);
|
|
6
|
+
this.ws_path = '/ws';
|
|
7
|
+
}
|
|
8
|
+
static get_instance() {
|
|
9
|
+
if (!Settings.instance) {
|
|
10
|
+
Settings.instance = new Settings();
|
|
11
|
+
}
|
|
12
|
+
return Settings.instance;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Checks if the connection is secure.
|
|
16
|
+
*
|
|
17
|
+
* @returns {boolean} Returns true if the connection is secure, otherwise false.
|
|
18
|
+
*/
|
|
19
|
+
is_secure() { return this.secure; }
|
|
20
|
+
/**
|
|
21
|
+
* Returns the protocol based on the `secure` property.
|
|
22
|
+
*
|
|
23
|
+
* @returns `'https'` if the connection is secure, otherwise `'http'`.
|
|
24
|
+
*/
|
|
25
|
+
get_protocol() { return this.secure ? 'https' : 'http'; }
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves the current hostname.
|
|
28
|
+
*
|
|
29
|
+
* @returns The hostname as a string.
|
|
30
|
+
*/
|
|
31
|
+
get_hostname() { return this.hostname; }
|
|
32
|
+
/**
|
|
33
|
+
* Retrieves the current port.
|
|
34
|
+
*
|
|
35
|
+
* @returns The port number as a number.
|
|
36
|
+
*/
|
|
37
|
+
get_port() { return this.port; }
|
|
38
|
+
/**
|
|
39
|
+
* Returns the appropriate WebSocket protocol based on the security setting.
|
|
40
|
+
*
|
|
41
|
+
* @returns {string} Returns 'wss' if the connection is secure, otherwise returns 'ws'.
|
|
42
|
+
*/
|
|
43
|
+
get_ws_protocol() { return this.secure ? 'wss' : 'ws'; }
|
|
44
|
+
/**
|
|
45
|
+
* Retrieves the current WebSocket path.
|
|
46
|
+
*
|
|
47
|
+
* @returns {string} The WebSocket path stored in the instance.
|
|
48
|
+
*/
|
|
49
|
+
get_ws_path() { return this.ws_path; }
|
|
50
|
+
/**
|
|
51
|
+
* Constructs and returns the full host URL as a string, including the protocol, hostname, and port.
|
|
52
|
+
*
|
|
53
|
+
* @returns {string} The complete host URL in the format: protocol://hostname:port
|
|
54
|
+
*/
|
|
55
|
+
get_host() { return this.get_protocol() + '://' + this.hostname + ':' + this.port; }
|
|
56
|
+
/**
|
|
57
|
+
* Constructs and returns the full WebSocket host URL as a string.
|
|
58
|
+
*
|
|
59
|
+
* The URL is composed of the WebSocket protocol (as determined by `get_ws_protocol()`),
|
|
60
|
+
* the hostname, port, and WebSocket path.
|
|
61
|
+
*
|
|
62
|
+
* @returns {string} The complete WebSocket host URL (e.g., `ws://hostname:port/path`).
|
|
63
|
+
*/
|
|
64
|
+
get_ws_host() { return this.get_ws_protocol() + '://' + this.hostname + ':' + this.port + this.ws_path; }
|
|
65
|
+
load_settings(settings) {
|
|
66
|
+
this.secure = settings.secure || this.secure;
|
|
67
|
+
this.hostname = settings.host || this.hostname;
|
|
68
|
+
this.port = settings.port || this.port;
|
|
69
|
+
this.ws_path = settings.ws_path || this.ws_path;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/utils/settings.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,QAAQ;IAQnB;QANQ,WAAM,GAAY,QAAQ,CAAC,QAAQ,KAAK,QAAQ,CAAC;QACjD,aAAQ,GAAW,QAAQ,CAAC,QAAQ,CAAC;QACrC,SAAI,GAAW,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACrC,YAAO,GAAW,KAAK,CAAC;IAGR,CAAC;IAElB,MAAM,CAAC,YAAY;QACxB,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;YACvB,QAAQ,CAAC,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;QACrC,CAAC;QACD,OAAO,QAAQ,CAA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AAI,IAAI,CAAC,OAAO,CAAC;IAClD,CAAC;CACF"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { ButtonComponent } from '../components/button';
|
|
2
|
+
import { ConnectionListener } from './connection';
|
|
3
|
+
import { Component } from '../component';
|
|
4
|
+
/**
|
|
5
|
+
* Button to create a new user.
|
|
6
|
+
*/
|
|
7
|
+
export declare class NewUserButton extends ButtonComponent<void> implements ConnectionListener {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new button element for triggering the display of a modal dialog.
|
|
10
|
+
*
|
|
11
|
+
* @param modal_id - The ID of the modal element to be shown when the button is clicked. Defaults to 'newUserModal'.
|
|
12
|
+
*/
|
|
13
|
+
constructor(modal_id?: string);
|
|
14
|
+
connected(): void;
|
|
15
|
+
logged_in(_info: any): void;
|
|
16
|
+
received_message(_message: any): void;
|
|
17
|
+
logged_out(): void;
|
|
18
|
+
disconnected(): void;
|
|
19
|
+
connection_error(_error: any): void;
|
|
20
|
+
unmounting(): void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Button to log in.
|
|
24
|
+
*/
|
|
25
|
+
export declare class LogInButton extends ButtonComponent<void> implements ConnectionListener {
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new button element for triggering the display of a login modal dialog.
|
|
28
|
+
*
|
|
29
|
+
* @param modal_id - The ID of the modal element to be shown when the button is clicked. Defaults to 'loginModal'.
|
|
30
|
+
*/
|
|
31
|
+
constructor(modal_id?: string);
|
|
32
|
+
connected(): void;
|
|
33
|
+
logged_in(_info: any): void;
|
|
34
|
+
received_message(_message: any): void;
|
|
35
|
+
logged_out(): void;
|
|
36
|
+
disconnected(): void;
|
|
37
|
+
connection_error(_error: any): void;
|
|
38
|
+
unmounting(): void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Button to log out.
|
|
42
|
+
*/
|
|
43
|
+
export declare class LogOutButton extends ButtonComponent<void> implements ConnectionListener {
|
|
44
|
+
/**
|
|
45
|
+
* Creates a new button element for logging out the user.
|
|
46
|
+
*/
|
|
47
|
+
constructor();
|
|
48
|
+
connected(): void;
|
|
49
|
+
logged_in(_info: any): void;
|
|
50
|
+
received_message(_message: any): void;
|
|
51
|
+
logged_out(): void;
|
|
52
|
+
disconnected(): void;
|
|
53
|
+
connection_error(_error: any): void;
|
|
54
|
+
unmounting(): void;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Modal to log in.
|
|
58
|
+
*/
|
|
59
|
+
export declare class LogInModal extends Component<HTMLDivElement> {
|
|
60
|
+
private username_input;
|
|
61
|
+
private password_input;
|
|
62
|
+
private remember_input;
|
|
63
|
+
/**
|
|
64
|
+
* Optional callback to run when the modal is hiding.
|
|
65
|
+
*/
|
|
66
|
+
on_hide: () => void;
|
|
67
|
+
constructor();
|
|
68
|
+
private login;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Modal to create a new user.
|
|
72
|
+
*/
|
|
73
|
+
export declare class NewUserModal extends Component<HTMLDivElement> {
|
|
74
|
+
private username_input;
|
|
75
|
+
private password_input;
|
|
76
|
+
private confirm_password_input;
|
|
77
|
+
/**
|
|
78
|
+
* Optional callback to run when the modal is hiding.
|
|
79
|
+
*/
|
|
80
|
+
on_hide: () => void;
|
|
81
|
+
constructor();
|
|
82
|
+
private create_user;
|
|
83
|
+
}
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { Modal } from 'bootstrap';
|
|
2
|
+
import { ButtonComponent } from '../components/button';
|
|
3
|
+
import { Connection } from './connection';
|
|
4
|
+
import { Component } from '../component';
|
|
5
|
+
import { App } from '../app';
|
|
6
|
+
/**
|
|
7
|
+
* Button to create a new user.
|
|
8
|
+
*/
|
|
9
|
+
export class NewUserButton extends ButtonComponent {
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new button element for triggering the display of a modal dialog.
|
|
12
|
+
*
|
|
13
|
+
* @param modal_id - The ID of the modal element to be shown when the button is clicked. Defaults to 'newUserModal'.
|
|
14
|
+
*/
|
|
15
|
+
constructor(modal_id = 'newUserModal') {
|
|
16
|
+
super();
|
|
17
|
+
this.node.type = 'button';
|
|
18
|
+
this.node.classList.add('btn', 'btn-primary');
|
|
19
|
+
this.node.textContent = 'New User';
|
|
20
|
+
this.node.style.marginLeft = 'auto';
|
|
21
|
+
this.node.style.display = 'inline-block';
|
|
22
|
+
this.node.addEventListener('click', () => Modal.getOrCreateInstance(document.getElementById(modal_id)).show());
|
|
23
|
+
Connection.get_instance().add_connection_listener(this);
|
|
24
|
+
}
|
|
25
|
+
connected() { }
|
|
26
|
+
logged_in(_info) {
|
|
27
|
+
// Hide the button if the user is already logged in
|
|
28
|
+
this.node.style.display = 'none';
|
|
29
|
+
}
|
|
30
|
+
received_message(_message) { }
|
|
31
|
+
logged_out() {
|
|
32
|
+
// Show the button if the user is logged out
|
|
33
|
+
this.node.style.display = 'inline-block';
|
|
34
|
+
}
|
|
35
|
+
disconnected() { }
|
|
36
|
+
connection_error(_error) { }
|
|
37
|
+
unmounting() {
|
|
38
|
+
Connection.get_instance().remove_connection_listener(this);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Button to log in.
|
|
43
|
+
*/
|
|
44
|
+
export class LogInButton extends ButtonComponent {
|
|
45
|
+
/**
|
|
46
|
+
* Creates a new button element for triggering the display of a login modal dialog.
|
|
47
|
+
*
|
|
48
|
+
* @param modal_id - The ID of the modal element to be shown when the button is clicked. Defaults to 'loginModal'.
|
|
49
|
+
*/
|
|
50
|
+
constructor(modal_id = 'loginModal') {
|
|
51
|
+
super();
|
|
52
|
+
this.node.type = 'button';
|
|
53
|
+
this.node.classList.add('btn', 'btn-primary');
|
|
54
|
+
this.node.textContent = 'Log In';
|
|
55
|
+
this.node.style.marginLeft = '10px';
|
|
56
|
+
this.node.style.display = 'inline-block';
|
|
57
|
+
this.node.addEventListener('click', () => Modal.getOrCreateInstance(document.getElementById(modal_id)).show());
|
|
58
|
+
Connection.get_instance().add_connection_listener(this);
|
|
59
|
+
}
|
|
60
|
+
connected() { }
|
|
61
|
+
logged_in(_info) {
|
|
62
|
+
// Hide the button if the user is already logged in
|
|
63
|
+
this.node.style.display = 'none';
|
|
64
|
+
}
|
|
65
|
+
received_message(_message) { }
|
|
66
|
+
logged_out() {
|
|
67
|
+
// Show the button if the user is logged out
|
|
68
|
+
this.node.style.display = 'inline-block';
|
|
69
|
+
}
|
|
70
|
+
disconnected() { }
|
|
71
|
+
connection_error(_error) { }
|
|
72
|
+
unmounting() {
|
|
73
|
+
Connection.get_instance().remove_connection_listener(this);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Button to log out.
|
|
78
|
+
*/
|
|
79
|
+
export class LogOutButton extends ButtonComponent {
|
|
80
|
+
/**
|
|
81
|
+
* Creates a new button element for logging out the user.
|
|
82
|
+
*/
|
|
83
|
+
constructor() {
|
|
84
|
+
super();
|
|
85
|
+
this.node.type = 'button';
|
|
86
|
+
this.node.classList.add('btn', 'btn-primary');
|
|
87
|
+
this.node.textContent = 'Log Out';
|
|
88
|
+
this.node.addEventListener('click', () => Connection.get_instance().logout());
|
|
89
|
+
this.node.style.marginLeft = 'auto';
|
|
90
|
+
this.node.style.display = 'none';
|
|
91
|
+
Connection.get_instance().add_connection_listener(this);
|
|
92
|
+
}
|
|
93
|
+
connected() { }
|
|
94
|
+
logged_in(_info) {
|
|
95
|
+
// Show the button if the user is logged in
|
|
96
|
+
this.node.style.display = 'inline-block';
|
|
97
|
+
}
|
|
98
|
+
received_message(_message) { }
|
|
99
|
+
logged_out() {
|
|
100
|
+
// Hide the button if the user is logged out
|
|
101
|
+
this.node.style.display = 'none';
|
|
102
|
+
}
|
|
103
|
+
disconnected() { }
|
|
104
|
+
connection_error(_error) { }
|
|
105
|
+
unmounting() {
|
|
106
|
+
Connection.get_instance().remove_connection_listener(this);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Modal to log in.
|
|
111
|
+
*/
|
|
112
|
+
export class LogInModal extends Component {
|
|
113
|
+
constructor() {
|
|
114
|
+
super(document.createElement('div'));
|
|
115
|
+
this.username_input = '';
|
|
116
|
+
this.password_input = '';
|
|
117
|
+
this.remember_input = true;
|
|
118
|
+
this.on_hide = () => { var _a; (_a = this.node.parentElement) === null || _a === void 0 ? void 0 : _a.focus(); };
|
|
119
|
+
this.node.classList.add('modal', 'fade');
|
|
120
|
+
this.node.id = 'loginModal';
|
|
121
|
+
this.node.setAttribute('tabindex', '-1');
|
|
122
|
+
this.node.setAttribute('aria-labelledby', 'loginModalLabel');
|
|
123
|
+
this.node.setAttribute('aria-hidden', 'true');
|
|
124
|
+
this.node.addEventListener('hide.bs.modal', () => {
|
|
125
|
+
if (this.on_hide)
|
|
126
|
+
this.on_hide();
|
|
127
|
+
});
|
|
128
|
+
const dialog = document.createElement('div');
|
|
129
|
+
dialog.classList.add('modal-dialog');
|
|
130
|
+
const content = document.createElement('div');
|
|
131
|
+
content.classList.add('modal-content');
|
|
132
|
+
const header = document.createElement('div');
|
|
133
|
+
header.classList.add('modal-header');
|
|
134
|
+
const title = document.createElement('h5');
|
|
135
|
+
title.classList.add('modal-title');
|
|
136
|
+
title.id = 'loginModalLabel';
|
|
137
|
+
title.textContent = 'Log In';
|
|
138
|
+
header.appendChild(title);
|
|
139
|
+
const close_button = document.createElement('button');
|
|
140
|
+
close_button.type = 'button';
|
|
141
|
+
close_button.classList.add('btn-close');
|
|
142
|
+
close_button.setAttribute('data-bs-dismiss', 'modal');
|
|
143
|
+
close_button.setAttribute('aria-label', 'Close');
|
|
144
|
+
header.appendChild(close_button);
|
|
145
|
+
content.appendChild(header);
|
|
146
|
+
const body = document.createElement('div');
|
|
147
|
+
body.classList.add('modal-body');
|
|
148
|
+
const form = document.createElement('form');
|
|
149
|
+
form.addEventListener('submit', (event) => {
|
|
150
|
+
event.preventDefault();
|
|
151
|
+
this.login();
|
|
152
|
+
});
|
|
153
|
+
const username_group = document.createElement('div');
|
|
154
|
+
username_group.classList.add('form-floating');
|
|
155
|
+
username_group.style.marginBottom = '1rem';
|
|
156
|
+
const username_input = document.createElement('input');
|
|
157
|
+
username_input.type = 'email';
|
|
158
|
+
username_input.autocomplete = 'email';
|
|
159
|
+
username_input.classList.add('form-control');
|
|
160
|
+
username_input.id = 'login_username';
|
|
161
|
+
username_input.placeholder = 'Username';
|
|
162
|
+
username_input.required = true;
|
|
163
|
+
username_input.addEventListener('input', () => this.username_input = username_input.value);
|
|
164
|
+
username_group.appendChild(username_input);
|
|
165
|
+
const username_label = document.createElement('label');
|
|
166
|
+
username_label.htmlFor = 'login_username';
|
|
167
|
+
username_label.textContent = 'Username';
|
|
168
|
+
username_group.appendChild(username_label);
|
|
169
|
+
form.appendChild(username_group);
|
|
170
|
+
const password_group = document.createElement('div');
|
|
171
|
+
password_group.classList.add('form-floating');
|
|
172
|
+
password_group.style.marginBottom = '1rem';
|
|
173
|
+
const password_input = document.createElement('input');
|
|
174
|
+
password_input.type = 'password';
|
|
175
|
+
password_input.autocomplete = 'current-password';
|
|
176
|
+
password_input.classList.add('form-control');
|
|
177
|
+
password_input.id = 'login_password';
|
|
178
|
+
password_input.placeholder = 'Password';
|
|
179
|
+
password_input.required = true;
|
|
180
|
+
password_input.addEventListener('input', () => this.password_input = password_input.value);
|
|
181
|
+
password_group.appendChild(password_input);
|
|
182
|
+
const password_label = document.createElement('label');
|
|
183
|
+
password_label.htmlFor = 'login_password';
|
|
184
|
+
password_label.textContent = 'Password';
|
|
185
|
+
password_group.appendChild(password_label);
|
|
186
|
+
form.appendChild(password_group);
|
|
187
|
+
const remember_group = document.createElement('div');
|
|
188
|
+
remember_group.classList.add('form-check');
|
|
189
|
+
remember_group.style.marginBottom = '1rem';
|
|
190
|
+
const remember_input = document.createElement('input');
|
|
191
|
+
remember_input.type = 'checkbox';
|
|
192
|
+
remember_input.classList.add('form-check-input');
|
|
193
|
+
remember_input.id = 'remember';
|
|
194
|
+
remember_input.checked = this.remember_input;
|
|
195
|
+
remember_input.addEventListener('input', () => this.remember_input = remember_input.checked);
|
|
196
|
+
remember_group.appendChild(remember_input);
|
|
197
|
+
const remember_label = document.createElement('label');
|
|
198
|
+
remember_label.classList.add('form-check-label');
|
|
199
|
+
remember_label.htmlFor = 'remember';
|
|
200
|
+
remember_label.textContent = 'Remember me';
|
|
201
|
+
remember_group.appendChild(remember_label);
|
|
202
|
+
form.appendChild(remember_group);
|
|
203
|
+
body.appendChild(form);
|
|
204
|
+
content.appendChild(body);
|
|
205
|
+
const footer = document.createElement('div');
|
|
206
|
+
footer.classList.add('modal-footer');
|
|
207
|
+
const close = document.createElement('button');
|
|
208
|
+
close.type = 'button';
|
|
209
|
+
close.classList.add('btn', 'btn-secondary');
|
|
210
|
+
close.setAttribute('data-bs-dismiss', 'modal');
|
|
211
|
+
close.textContent = 'Close';
|
|
212
|
+
footer.appendChild(close);
|
|
213
|
+
const submit = document.createElement('button');
|
|
214
|
+
submit.type = 'submit';
|
|
215
|
+
submit.classList.add('btn', 'btn-primary');
|
|
216
|
+
submit.textContent = 'Log In';
|
|
217
|
+
submit.addEventListener('click', () => this.login());
|
|
218
|
+
footer.appendChild(submit);
|
|
219
|
+
content.appendChild(footer);
|
|
220
|
+
dialog.appendChild(content);
|
|
221
|
+
this.node.appendChild(dialog);
|
|
222
|
+
}
|
|
223
|
+
login() {
|
|
224
|
+
Connection.get_instance().login(this.username_input, this.password_input, this.remember_input)
|
|
225
|
+
.then((result) => {
|
|
226
|
+
if (result)
|
|
227
|
+
Modal.getOrCreateInstance(this.node).hide();
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Modal to create a new user.
|
|
233
|
+
*/
|
|
234
|
+
export class NewUserModal extends Component {
|
|
235
|
+
constructor() {
|
|
236
|
+
super(document.createElement('div'));
|
|
237
|
+
this.username_input = '';
|
|
238
|
+
this.password_input = '';
|
|
239
|
+
this.confirm_password_input = '';
|
|
240
|
+
this.on_hide = () => { var _a; (_a = this.node.parentElement) === null || _a === void 0 ? void 0 : _a.focus(); };
|
|
241
|
+
this.node.classList.add('modal', 'fade');
|
|
242
|
+
this.node.id = 'newUserModal';
|
|
243
|
+
this.node.setAttribute('tabindex', '-1');
|
|
244
|
+
this.node.setAttribute('aria-labelledby', 'newUserModalLabel');
|
|
245
|
+
this.node.setAttribute('aria-hidden', 'true');
|
|
246
|
+
this.node.addEventListener('hide.bs.modal', () => {
|
|
247
|
+
if (this.on_hide)
|
|
248
|
+
this.on_hide();
|
|
249
|
+
});
|
|
250
|
+
const dialog = document.createElement('div');
|
|
251
|
+
dialog.classList.add('modal-dialog');
|
|
252
|
+
const content = document.createElement('div');
|
|
253
|
+
content.classList.add('modal-content');
|
|
254
|
+
const header = document.createElement('div');
|
|
255
|
+
header.classList.add('modal-header');
|
|
256
|
+
const title = document.createElement('h5');
|
|
257
|
+
title.classList.add('modal-title');
|
|
258
|
+
title.id = 'newUserModalLabel';
|
|
259
|
+
title.textContent = 'Create New User';
|
|
260
|
+
header.appendChild(title);
|
|
261
|
+
const close_button = document.createElement('button');
|
|
262
|
+
close_button.type = 'button';
|
|
263
|
+
close_button.classList.add('btn-close');
|
|
264
|
+
close_button.setAttribute('data-bs-dismiss', 'modal');
|
|
265
|
+
close_button.setAttribute('aria-label', 'Close');
|
|
266
|
+
header.appendChild(close_button);
|
|
267
|
+
content.appendChild(header);
|
|
268
|
+
const body = document.createElement('div');
|
|
269
|
+
body.classList.add('modal-body');
|
|
270
|
+
const form = document.createElement('form');
|
|
271
|
+
form.addEventListener('submit', (event) => {
|
|
272
|
+
event.preventDefault();
|
|
273
|
+
this.create_user();
|
|
274
|
+
});
|
|
275
|
+
const username_group = document.createElement('div');
|
|
276
|
+
username_group.classList.add('form-floating');
|
|
277
|
+
username_group.style.marginBottom = '1rem';
|
|
278
|
+
const username_input = document.createElement('input');
|
|
279
|
+
username_input.type = 'email';
|
|
280
|
+
username_input.autocomplete = 'email';
|
|
281
|
+
username_input.classList.add('form-control');
|
|
282
|
+
username_input.id = 'newuser_username';
|
|
283
|
+
username_input.placeholder = 'Username';
|
|
284
|
+
username_input.required = true;
|
|
285
|
+
username_input.addEventListener('input', () => this.username_input = username_input.value);
|
|
286
|
+
username_group.appendChild(username_input);
|
|
287
|
+
const username_label = document.createElement('label');
|
|
288
|
+
username_label.htmlFor = 'newuser_username';
|
|
289
|
+
username_label.textContent = 'Username';
|
|
290
|
+
username_group.appendChild(username_label);
|
|
291
|
+
form.appendChild(username_group);
|
|
292
|
+
const password_group = document.createElement('div');
|
|
293
|
+
password_group.classList.add('form-floating');
|
|
294
|
+
password_group.style.marginBottom = '1rem';
|
|
295
|
+
const password_input = document.createElement('input');
|
|
296
|
+
password_input.type = 'password';
|
|
297
|
+
password_input.autocomplete = 'current-password';
|
|
298
|
+
password_input.classList.add('form-control');
|
|
299
|
+
password_input.id = 'newuser_password';
|
|
300
|
+
password_input.placeholder = 'Password';
|
|
301
|
+
password_input.required = true;
|
|
302
|
+
password_input.addEventListener('input', () => this.password_input = password_input.value);
|
|
303
|
+
password_group.appendChild(password_input);
|
|
304
|
+
const password_label = document.createElement('label');
|
|
305
|
+
password_label.htmlFor = 'newuser_password';
|
|
306
|
+
password_label.textContent = 'Password';
|
|
307
|
+
password_group.appendChild(password_label);
|
|
308
|
+
form.appendChild(password_group);
|
|
309
|
+
const confirm_password_group = document.createElement('div');
|
|
310
|
+
confirm_password_group.classList.add('form-floating');
|
|
311
|
+
confirm_password_group.style.marginBottom = '1rem';
|
|
312
|
+
const confirm_password_input = document.createElement('input');
|
|
313
|
+
confirm_password_input.type = 'password';
|
|
314
|
+
confirm_password_input.autocomplete = 'current-password';
|
|
315
|
+
confirm_password_input.classList.add('form-control');
|
|
316
|
+
confirm_password_input.id = 'confirm_password';
|
|
317
|
+
confirm_password_input.placeholder = 'Confirm Password';
|
|
318
|
+
confirm_password_input.required = true;
|
|
319
|
+
confirm_password_input.addEventListener('input', () => this.confirm_password_input = confirm_password_input.value);
|
|
320
|
+
confirm_password_group.appendChild(confirm_password_input);
|
|
321
|
+
const confirm_password_label = document.createElement('label');
|
|
322
|
+
confirm_password_label.htmlFor = 'confirm_password';
|
|
323
|
+
confirm_password_label.textContent = 'Confirm Password';
|
|
324
|
+
confirm_password_group.appendChild(confirm_password_label);
|
|
325
|
+
form.appendChild(confirm_password_group);
|
|
326
|
+
body.appendChild(form);
|
|
327
|
+
content.appendChild(body);
|
|
328
|
+
const footer = document.createElement('div');
|
|
329
|
+
footer.classList.add('modal-footer');
|
|
330
|
+
const close = document.createElement('button');
|
|
331
|
+
close.type = 'button';
|
|
332
|
+
close.classList.add('btn', 'btn-secondary');
|
|
333
|
+
close.setAttribute('data-bs-dismiss', 'modal');
|
|
334
|
+
close.textContent = 'Close';
|
|
335
|
+
footer.appendChild(close);
|
|
336
|
+
const submit = document.createElement('button');
|
|
337
|
+
submit.type = 'submit';
|
|
338
|
+
submit.classList.add('btn', 'btn-primary');
|
|
339
|
+
submit.textContent = 'Create User';
|
|
340
|
+
submit.addEventListener('click', () => this.create_user());
|
|
341
|
+
footer.appendChild(submit);
|
|
342
|
+
content.appendChild(footer);
|
|
343
|
+
dialog.appendChild(content);
|
|
344
|
+
this.node.appendChild(dialog);
|
|
345
|
+
}
|
|
346
|
+
create_user() {
|
|
347
|
+
if (this.password_input !== this.confirm_password_input) {
|
|
348
|
+
App.get_instance().toast('Passwords do not match.');
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
Connection.get_instance().create_user(this.username_input, this.password_input)
|
|
352
|
+
.then((result) => {
|
|
353
|
+
if (result)
|
|
354
|
+
Modal.getOrCreateInstance(this.node).hide();
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
//# sourceMappingURL=user_components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user_components.js","sourceRoot":"","sources":["../../src/utils/user_components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KA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