- BREAKING CHANGE from v0.9.35 and eariler: Move accounts into subfolder of SessionStore
 - viewergen and viewer updates from @GraspYonOx
 - new homepage theme inspired by @GraspYonOx
 - connect setup also mostly by @GraspYonOx
 - numerous bug fixes
 - nntp-server-zefie is now on npmjs
 - implement proper nodejs debugging
   - will start to phase out using console.log for actual debugging
   - existing "debug" (verbose) messages will stay as is
   - future code debugging will use debug() to debug WIP, therefore not showing to most users if it is accidently left in
This commit is contained in:
zefie
2022-10-16 18:58:30 -04:00
parent b89e0e932c
commit c2a3081afd
91 changed files with 1653 additions and 1694 deletions

View File

@@ -1,7 +1,6 @@
var minisrv_service_file = true;
var errpage = null;
const WTVRegister = require(classPath + "/WTVRegister.js")
const wtvr = new WTVRegister(minisrv_config, SessionStore);
if (session_data.user_id != 0) errpage = wtvshared.doErrorPage(400, "You are not authorized to add users to this account.");

View File

@@ -19,7 +19,9 @@ if (session_data.user_id != 0 && session_data.user_id != request_headers.query.u
if (user_id != null) {
headers = `200 OK
Connection: Keep-Alive
Content-Type: text/html`
Content-Type: text/html
wtv-expire-all: wtv-setup:/edit-user
wtv-noback-all: wtv-setup:/edit-user`
var userSession = null;
if (session_data.user_id == request_headers.query.user_id) userSession = session_data;
else {
@@ -83,7 +85,7 @@ ${(user_id == 0) ? 'Subscriber' : 'User'} information
<td>
<td absheight=244 valign=top align=left>
<form
action="wtv-setup:/serve-billing-overview"
action="client:goback"
>
<P>
<table cellspacing=0 cellpadding=0 border=0>

View File

@@ -117,7 +117,7 @@ ${(request_headers.query.preview) ? "<tr><td><td colspan=3><b>Signature Preview:
<tr>
<TD>
<td colspan=3 valign=top align=left bgcolor="${(request_headers.query.preview) ? message_colors.bgcolor : "0D0D0D"}">
${(request_headers.query.preview) ? `<embed src="wtv-mail:/get-signature?sanitize=true&demotext=${encodeURIComponent(`<hr>This is a preview of your signature. The text below the line will not appear in your outgoing messages. It is provided to demonstrate what a message composed with this signature may look like. <a href="client:donothing">This is what a link looks like</a>.`)}" height=40></embed><br><br>` : ''}
${(request_headers.query.preview) ? `<embed src="wtv-mail:/get-signature?sanitize=true&showdemotext=true" height=40></embed><br><br>` : ''}
<tr>
<td>
<td colspan=3 height=2 valign=top align=left>

View File

@@ -83,7 +83,7 @@ setTimeout("clearAllLists();", 2*1000);
<tr>
<td width=5 height=26>
<td width=93>
<table width=93 cellspacing=0 cellpadding=0 href=wtv-guide:/help?topic=Messenger&subtopic=Index>
<table width=93 cellspacing=0 cellpadding=0 href=wtv-guide:/help?topic=Index&subtopic=Glossary>
<tr>
<td>
<table cellspacing=0 cellpadding=0>

View File

@@ -26,7 +26,7 @@ function ShowMessengerPanel()
<tr>
<td abswidth=6>
<td abswidth=92 absheight=76>
<table absheight=76 cellspacing=0 cellpadding=0>
<table href="wtv-home:/home" absheight=76 cellspacing=0 cellpadding=0>
<tr>
<td align=right>
<img src="${minisrv_config.config.service_logo}" width=87 height=67>

View File

@@ -76,31 +76,62 @@ Music
if (canDoMuzac) {
data += `<p>Turn on background music
to have songs play continually in
the background.
<p>Remember to adjust the
the background.<p>Remember to adjust the
volume on your TV so you can
hear the music.`;
} else {
data += `Your client reports it does
not support background music.
<p>However, you can still browse,
and listen to the music in the foreground.`;
}
data += `
hear the music.
<TD WIDTH=20>
<TD WIDTH=198 VALIGN=top ALIGN=left>
<spacer type=block height=20 width=1>
<form action="client:ConfirmPhoneSetup">
<spacer type=block height=16 width=1>
<form>
<table cellspacing=0 cellpadding=0>
<tr>
<td valign=top>
Background music<p>
<input type=hidden name=autosubmit value=true autosubmit=onleave>
<INPUT TYPE="checkbox" NAME="setup-play-bgm" VALUE="1"
action="client:SetSetupValue" selected &wtv-muzac-on;${canDoMuzac ? '' : 'disabled'}>
<td abswidth=4>
<td valign=top>
<font size=-1>Background<br>music</font>
<tr><td absheight=10>
<INPUT TYPE="hidden" NAME="current_volume" ID="current_volume" value="&vol;">
<tr><td absheight=38>
<tr>
<td>
<p>
BGM Volume
<p>
<INPUT TYPE="radio" ID="vol_soft" NAME="setup-bgm-volume" VALUE="soft" action="client:SetSetupValue">&nbsp;Soft<br>
<INPUT TYPE="radio" ID="vol_medium" NAME="setup-bgm-volume" VALUE="medium" action="client:SetSetupValue">&nbsp;Medium<br>
<INPUT TYPE="radio" ID="vol_loud" NAME="setup-bgm-volume" VALUE="loud" action="client:SetSetupValue">&nbsp;Loud
<script type="text/javascript">
var volume=document.forms[0].current_volume.value
var radio = null;
if (volume == "soft") {
radio = document.forms[0]['setup-bgm-volume'][0];
} else if (volume == "medium") {
radio = document.forms[0]['setup-bgm-volume'][1];
} else if (volume == "loud") {
radio = document.forms[0]['setup-bgm-volume'][2];
}
if (radio) {
radio.checked = true;
}
</script>
</td>
`;
} else {
data += `<p>Your client reports it does
not support background music.
<p>However, you can still browse,
and listen to the music in the foreground.
<TD WIDTH=20>
<TD WIDTH=198 VALIGN=top ALIGN=left>
<spacer type=block height=16 width=1>
<form>
<table cellspacing=0 cellpadding=0>
`;
}
data += `
<tr>
<td valign=top>
</table>

View File

@@ -16,9 +16,17 @@ if (!errpage) {
}
if (!errpage) {
var wtvr = new WTVRegister(minisrv_config, SessionStore);
if (session_data.getNumberOfUserAccounts() > minisrv_config.config.user_accounts.max_users_per_account) errpage = wtvshared.doErrorPage(400, "You are not authorized to add more than " + minisrv_config.config.user_accounts.max_users_per_account + ` account${minisrv_config.config.user_accounts.max_users_per_account > 1 ? 's' : ''}.`);
if (!request_headers.query.user_name) errpage = wtvshared.doErrorPage(400, "Please enter a username.");
else if (request_headers.query.user_name.length < minisrv_config.config.user_accounts.min_username_length) errpage = wtvshared.doErrorPage(400, "Please choose a username with <b>" + minisrv_config.config.user_accounts.min_username_length + "</b> or more characters.");
else if (request_headers.query.user_name.length > minisrv_config.config.user_accounts.max_username_length) errpage = wtvshared.doErrorPage(400, "Please choose a username with <b>" + minisrv_config.config.user_accounts.max_username_length + "</b> or less characters.");
else if (!wtvr.checkUsernameSanity(request_headers.query.user_name)) errpage = wtvshared.doErrorPage(400, "The username you have chosen contains invalid characters. Please choose a username with only <b>letters</b>, <b>numbers</b>, <b>_</b> or <b>-</b>. Also, please be sure your username begins with a letter.");
else if (!wtvr.checkUsernameAvailable(request_headers.query.user_name)) errpage = wtvshared.doErrorPage(400, "The username you have selected is already in use. Please select another username.");
}
if (errpage) {
headers = errpage[0];
data = errpage[1];

View File

@@ -1,5 +1,7 @@
var minisrv_service_file = true;
const wtvbgm = new WTVBGMusic(minisrv_config, session_data);
if (request_headers.query && session_data) {
if (request_headers.request_url.indexOf('?') >= 0) {