user account updates

- move user accounts to subdir
- add password support
- implemented basics of multi-user support
- Can add users, edit them, and log in with them (password or not)
- Cannot delete users (with service) yet
This commit is contained in:
zefie
2022-02-07 20:24:16 -05:00
parent 622698ee66
commit 0d991d5eac
35 changed files with 2228 additions and 154 deletions

View File

@@ -86,11 +86,13 @@ for ${ssid_sessions[socket.ssid].getSessionData("subscriber_username") || "You"}
<img src="ROMCache/BulletArrow.gif" width=6 height=13 valign=absmiddle><spacer type=block width=6 height=1>
<a href="wtv-setup:/mail">Mail</a><BR>
<spacer type=block width=1 height=5><BR>`;
// password
if (!minisrv_config.config.hide_incomplete_features) {
data += `<img src="ROMCache/BulletArrow.gif" width=6 height=13 valign=absmiddle><spacer type=block width=6 height=1>
<a href="${notImplementedAlert}"><strike>Password</strike></a><BR>
if (minisrv_config.config.passwords) {
if (minisrv_config.config.passwords.enabled) {
data += `<img src="ROMCache/BulletArrow.gif" width=6 height=13 valign=absmiddle><spacer type=block width=6 height=1>
<a href="wtv-setup:/edit-password">Password</a><BR>
<spacer type=block width=1 height=5><BR>`;
}
}
data += `
@@ -114,10 +116,10 @@ data += `
<img src="ROMCache/BulletArrow.gif" width=6 height=13 valign=absmiddle><spacer type=block width=6 height=1>
<a href="wtv-setup:/keyboard">Keyboard</a><BR>
<spacer type=block width=1 height=5><BR>`;
// extra users
if (!minisrv_config.config.hide_incomplete_features) {
if (ssid_sessions[socket.ssid].user_id == 0) {
data += `<img src="ROMCache/BulletArrow.gif" width=6 height=13 valign=absmiddle><spacer type=block width=6 height=1>
<a href="${notImplementedAlert}"><strike>Extra users</strike></a><BR>
<a href="wtv-setup:/serve-billing-overview">Account</a><BR>
<spacer type=block width=1 height=5><BR>`;
}
@@ -130,13 +132,10 @@ data += `
<TD WIDTH=300 VALIGN=top ALIGN=left>
<spacer type=block width=6 height=14><font size="2"><br>
Signature <strike>and more</strike><BR>
<spacer type=block width=6 height=5><font size="2"><br>`;
// password
if (!minisrv_config.config.hide_incomplete_features) {
data += `<strike>Change your password</strike><BR>
<spacer type=block width=6 height=5><font size="2"><br>`;
}
data += `Options for your TV<BR>
<spacer type=block width=6 height=5><font size="2"><br>
Change your password<BR>
<spacer type=block width=6 height=5><font size="2"><br>
Options for your TV<BR>
<spacer type=block width=6 height=5><font size="2"><br>
Make text bigger or smaller<BR>
<spacer type=block width=6 height=5><font size="2"><br>
@@ -147,14 +146,13 @@ if (!minisrv_config.config.hide_incomplete_features) {
data += `<strike>Change how you print</strike><BR>
<spacer type=block width=6 height=5><font size="2"><br>`;
}
data += `Choose an on-screen keyboard<BR>
<spacer type=block width=6 height=5><font size="2"><br>`;
// extra users
if (!minisrv_config.config.hide_incomplete_features) {
data += `<strike>Add, change, or remove users</strike><BR>
<spacer type=block width=6 height=6><font size="2"><br>`;
data += `Choose an on-screen keyboard<BR>`;
if (ssid_sessions[socket.ssid].user_id == 0) {
data += `<spacer type=block width=6 height=5><font size="2"><br>
Add, change, or remove users<BR>`;
}
data += `
data += `<spacer type=block width=6 height=6><font size="2"><br>
Connecting to WebTV<BR>