- numerous bug fixes
 - wtv-news goodies, ready for local testing
   - custom patched nntp-server node module with support for POSTing
   - should be able to post locally
   - 4 groups are made by default
   - can override in user_config.json (look at the config.json changes but dont do them there)
   - can sync down from an upstream server with sync_nntp.js
   - sync does not push new posts to upstream yet
This commit is contained in:
zefie
2022-10-11 21:44:18 -04:00
parent 1165b245ce
commit b89e0e932c
181 changed files with 4333 additions and 688 deletions

View File

@@ -2,10 +2,24 @@ var minisrv_service_file = true;
headers = `200 OK
Connection: Keep-Alive
wtv-expire-all: wtv-
wtv-noback-all: wtv-setup:/mail-signature
wtv-expire-all: wtv-setup:/mail-signature
wtv-expire-all: wtv-mail:/get-signature
wtv-expire-all: wtv-mail:/sendmail
wtv-expire-all: http
Content-Type: text/html`
var signature = session_data.getSessionData("subscriber_signature");
if (request_headers.query.mail_signature) {
if (signature != request_headers.query.mail_signature) {
session_data.setSessionData("subscriber_signature", (request_headers.query.mail_signature) ? request_headers.query.mail_signature : "");
session_data.saveSessionData();
signature = request_headers.query.mail_signature;
}
}
var message_colors = session_data.mailstore.getSignatureColors(signature)
data = `<HTML>
<HEAD>
<TITLE>
@@ -67,13 +81,16 @@ Mail signature
<td abswidth=20>
<TR>
<td>
<td colspan=3 WIDTH=416 HEIGHT=98 VALIGN=top ALIGN=left>
<td colspan=3 WIDTH=416 HEIGHT=68 VALIGN=top ALIGN=left>
<spacer type=block height=24 width=1>
Type a short text <B>signature</B> here and it will be added to the end of each mail message you send.
Type a short text <B>signature</B> here and it will be added to the end of each mail message you send.<br>
If you wish to use HTML, the first line of your signature should be <b>&lt;html&gt;</b>.
<TR>
<TD absheight=6>
<TR>
<TD>
<TD colspan=3 WIDTH=416 HEIGHT=118 VALIGN=top ALIGN=left>
<FORM method="POST" action="/validate-mail-signature">
<FORM method="POST" name="sig" action="/validate-mail-signature">
<INPUT type=hidden autosubmit=onleave>
<TEXTAREA name="mail_signature"
action="/validate-mail-signature"
@@ -84,7 +101,7 @@ cols=45 rows=5
autoactivate
nosoftbreaks
maxlength=4096
font=proportional>${session_data.getSessionData("subscriber_signature") || ""}</TEXTAREA></FORM></TD>
font=proportional>${signature || ""}</TEXTAREA></FORM></TD>
</FORM>
<TR>
<TD>
@@ -96,16 +113,26 @@ font=proportional>${session_data.getSessionData("subscriber_signature") || ""}</
<tr>
<TD>
<td colspan=4 height=1 valign=top align=left>
${(request_headers.query.preview) ? "<tr><td><td colspan=3><b>Signature Preview:</b>" : ""}
<tr>
<TD>
<td colspan=3 height=2 valign=top align=left bgcolor="0D0D0D">
<img src="wtv-home:/ROMCache/Spacer.gif" width=436 height=1>
<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>` : ''}
<tr>
<td>
<td colspan=3 height=2 valign=top align=left>
<img src="wtv-home:/ROMCache/Spacer.gif" width=436 height=6>
<TR>
<TD>
<TD COLSPAN=4 HEIGHT=4 VALIGN=top ALIGN=left>
<TR>
<TD VALIGN=top ALIGN=left>
<FORM action="/mail-signature" METHOD="POST" onsubmit="this.mail_signature.value = document.forms[0].mail_signature.value">
<INPUT type=hidden name="mail_signature">
<FONT COLOR="#E7CE4A" SIZE=-1><SHADOW>
<INPUT TYPE=SUBMIT BORDERIMAGE="file://ROM/Borders/ButtonBorder2.bif" Value=Preview NAME="preview" USESTYLE WIDTH=103>
</SHADOW></FONT></FORM>
<TD>
<TD COLSPAN=3 VALIGN=top ALIGN=right>
<TD VALIGN=top ALIGN=right>
<FORM action="client:goback">
<FONT COLOR="#E7CE4A" SIZE=-1><SHADOW>
<INPUT TYPE=SUBMIT BORDERIMAGE="file://ROM/Borders/ButtonBorder2.bif" Value=Done NAME="Done" USESTYLE WIDTH=103>