fix spacing with headers

This commit is contained in:
zefie
2025-07-08 10:05:42 -04:00
parent bdd8442052
commit 4c490147ed
4 changed files with 727 additions and 727 deletions

View File

@@ -89,11 +89,11 @@ wtv-expire-all: wtv-head-waiter:
`; `;
if (!limitedLogin && !limitedLoginRegistered) { if (!limitedLogin && !limitedLoginRegistered) {
strf = strftime.timezone(timezone);
headers += `wtv-country: US headers += `wtv-country: US
wtv-client-time-zone: GMT ${timezone} wtv-client-time-zone: GMT -0000
wtv-client-time-dst-rule: GMT wtv-client-time-dst-rule: GMT
wtv-client-date: ${new Date().toUTCString()} wtv-client-date: ${strf("%a, %d %b %Y %H:%M:%S", new Date(new Date().setUTCSeconds(new Date().getUTCSeconds())))}
wtv-language-header: en-US,en wtv-language-header: en-US,en
wtv-noback-all: wtv- wtv-noback-all: wtv-
wtv-transition-override: off wtv-transition-override: off

View File

@@ -83,259 +83,259 @@ if (!session_data.isRegistered()) {
}).getURL(); }).getURL();
headers = `200 OK headers = `200 OK
Content-type: text/html`; Content-type: text/html`;
data = `<sendpanel action="wtv-mail:/sendmail" data = `<sendpanel action="wtv-mail:/sendmail"
message="Write a new e-mail message" message="Write a new e-mail message"
label="Write"> label="Write">
<savepanel <savepanel
action="wtv-mail:/listmail?mailbox_name=mbox" action="wtv-mail:/listmail?mailbox_name=mbox"
message="View your saved e-mail messages" message="View your saved e-mail messages"
label="View saved e-mail messages"> label="View saved e-mail messages">
<HTML> <HTML>
<head> <head>
<title>${(mailbox_name === "Inbox") ? ' Mail list for ' + username : mailbox_name} <title>${(mailbox_name === "Inbox") ? ' Mail list for ' + username : mailbox_name}
</title> </title>
</head> </head>
<body bgcolor="#171726" text="#82A9D9" link="#BDA73A" vlink="#7A9FCC" fontsize="medium" vspace=0 hspace=0> <body bgcolor="#171726" text="#82A9D9" link="#BDA73A" vlink="#7A9FCC" fontsize="medium" vspace=0 hspace=0>
<sidebar width=109> <sidebar width=109>
<table cellspacing=0 cellpadding=0> <table cellspacing=0 cellpadding=0>
<tr> <tr>
<td width=104 height=420 bgcolor=#262E3D valign=top> <td width=104 height=420 bgcolor=#262E3D valign=top>
<table cellspacing=0 cellpadding=0> <table cellspacing=0 cellpadding=0>
<tr> <tr>
<td height=7 colspan=3> <td height=7 colspan=3>
<spacer type=vertical size=7> <spacer type=vertical size=7>
<tr> <tr>
<td width=7> <td width=7>
<spacer type=horizontal size=7> <spacer type=horizontal size=7>
<td width=87 href="wtv-home:/home"> <td width=87 href="wtv-home:/home">
<img src="${minisrv_config.config.service_logo}" width=87 height=67> <img src="${minisrv_config.config.service_logo}" width=87 height=67>
<td width=10> <td width=10>
<spacer type=horizontal size=10> <spacer type=horizontal size=10>
</table> </table>
<spacer type=vertical size=6> <spacer type=vertical size=6>
<table cellspacing=0 cellpadding=0 border=0> <table cellspacing=0 cellpadding=0 border=0>
<tr> <tr>
<td bgcolor=#4A525A height=2 width=104 colspan=3> <td bgcolor=#4A525A height=2 width=104 colspan=3>
<tr> <tr>
<td width=10 height=26> <td width=10 height=26>
<td width=89 valign=middle> <td width=89 valign=middle>
<table cellspacing=0 cellpadding=0 href="wtv-mail:/sendmail" <table cellspacing=0 cellpadding=0 href="wtv-mail:/sendmail"
> >
<tr> <tr>
<td height=1> <td height=1>
<tr> <tr>
<td><shadow><font sizerange=medium color=#E6CD4A>Write</font></shadow> <td><shadow><font sizerange=medium color=#E6CD4A>Write</font></shadow>
</table> </table>
<td width=5> <td width=5>
<tr> <tr>
<td bgcolor=#4A525A height=2 width=104 colspan=3> <td bgcolor=#4A525A height=2 width=104 colspan=3>
<tr> <tr>
<td width=10 height=26> <td width=10 height=26>
<td width=89 valign=middle> <td width=89 valign=middle>
<table cellspacing=0 cellpadding=0 href="${notImplementedAlert}" <table cellspacing=0 cellpadding=0 href="${notImplementedAlert}"
> >
<tr> <tr>
<td height=1> <td height=1>
<tr> <tr>
<td><shadow><font sizerange=medium color=#E6CD4A>Storage</font></shadow> <td><shadow><font sizerange=medium color=#E6CD4A>Storage</font></shadow>
</table> </table>
<td width=5> <td width=5>
<tr> <tr>
<td bgcolor=#4A525A height=2 width=104 colspan=3> <td bgcolor=#4A525A height=2 width=104 colspan=3>
<tr> <tr>
<td width=10 height=26> <td width=10 height=26>
<td width=89 valign=middle> <td width=89 valign=middle>
<table cellspacing=0 cellpadding=0 href="wtv-mail:/addressbook" <table cellspacing=0 cellpadding=0 href="wtv-mail:/addressbook"
> >
<tr> <tr>
<td height=1> <td height=1>
<tr> <tr>
<td><shadow><font sizerange=medium color=#E6CD4A>Addresses</font></shadow> <td><shadow><font sizerange=medium color=#E6CD4A>Addresses</font></shadow>
</table> </table>
<td width=5> <td width=5>
<tr> <tr>
<td bgcolor=#4A525A height=2 width=104 colspan=3> <td bgcolor=#4A525A height=2 width=104 colspan=3>
<tr> <tr>
<td width=10 height=26> <td width=10 height=26>
<td width=89 valign=middle> <td width=89 valign=middle>
<table cellspacing=0 cellpadding=0 href="${notImplementedAlert}" <table cellspacing=0 cellpadding=0 href="${notImplementedAlert}"
> >
<tr> <tr>
<td height=1> <td height=1>
<tr> <tr>
<td><shadow><font sizerange=medium color=#E6CD4A>Clean up</font></shadow> <td><shadow><font sizerange=medium color=#E6CD4A>Clean up</font></shadow>
</table> </table>
<td width=5> <td width=5>
<tr> <tr>
<td bgcolor=#4A525A height=2 width=104 colspan=3> <td bgcolor=#4A525A height=2 width=104 colspan=3>
</table> </table>
<table width=109 cellspacing=0 cellpadding=0> <table width=109 cellspacing=0 cellpadding=0>
<tr> <tr>
<p>&nbsp;<p> <p>&nbsp;<p>
<br><spacer type=vertical size=2> <br><spacer type=vertical size=2>
<tr> <tr>
<td valign=bottom bgcolor=#262E3D> <td valign=bottom bgcolor=#262E3D>
<table cellspacing=9><tr><td> <table cellspacing=9><tr><td>
<font size=-1 color=#E6CD4A>Quick Tip:</font> <font size=-1 color=#E6CD4A>Quick Tip:</font>
<spacer type=vertical size=5> <spacer type=vertical size=5>
<!-- <a href="wtv-guide:/help?topic=Mail&subtopic=KnownTip"> --> <!-- <a href="wtv-guide:/help?topic=Mail&subtopic=KnownTip"> -->
<div> <div>
<img height=10 width=10 src="wtv-mail:/content/images/sidebardot.gif"> <img height=10 width=10 src="wtv-mail:/content/images/sidebardot.gif">
<font size=-1 color=#E6CD4A>indicates messages from known senders</div></font></td></tr></table> <font size=-1 color=#E6CD4A>indicates messages from known senders</div></font></td></tr></table>
<!-- </a> --> <!-- </a> -->
</table> </table>
<td width=5 bgcolor=#5B6C81> <td width=5 bgcolor=#5B6C81>
</table> </table>
</sidebar> </sidebar>
<table cellspacing=0 cellpadding=0 border=0> <table cellspacing=0 cellpadding=0 border=0>
<tr> <tr>
<td width=451 colspan=2 align=center bgcolor=#5B6C81> <td width=451 colspan=2 align=center bgcolor=#5B6C81>
<spacer type=vertical size=13> <spacer type=vertical size=13>
<tr> <tr>
<td height=8 bgcolor=#171726 colspan=2> <td height=8 bgcolor=#171726 colspan=2>
<img src="wtv-mail:/content/images/CornerTop.gif" width=8 height=8> <img src="wtv-mail:/content/images/CornerTop.gif" width=8 height=8>
<tr> <tr>
<td bgcolor=#171726 width=451 valign=top> <td bgcolor=#171726 width=451 valign=top>
<table cellspacing=0 cellpadding=0 width=451> <table cellspacing=0 cellpadding=0 width=451>
<tr> <tr>
<td bgcolor=#171726 width=13> <td bgcolor=#171726 width=13>
<spacer type=horizontal size=13> <spacer type=horizontal size=13>
<td height=80> <td height=80>
<img src="wtv-mail:/content/images/Mail.gif" width=87 height=45> <img src="wtv-mail:/content/images/Mail.gif" width=87 height=45>
`; `;
var icon_image = null; var icon_image = null;
switch (mailbox_name) { switch (mailbox_name) {
case "Inbox": case "Inbox":
icon_image = session_data.mailstore.getMailboxIcon(); icon_image = session_data.mailstore.getMailboxIcon();
break; break;
case "Sent": case "Sent":
icon_image = "MailboxSent.gif"; icon_image = "MailboxSent.gif";
break; break;
case "Trash": case "Trash":
icon_image = "MailboxDiscard.gif"; icon_image = "MailboxDiscard.gif";
break; break;
default: default:
icon_image = "MailboxStorage.gif"; icon_image = "MailboxStorage.gif";
break; break;
} }
data += `
<img src="wtv-mail:/content/images/${icon_image}" width=74 height=45 >
<td width=250 align=left><font sizerange=small>
</table>
<tr>
<td colspan=2>
<table cellspacing=0 cellpadding=0 bgcolor=#2C323D>
<tr>
<td width=451 absheight=25>
<table cellspacing=0 cellpadding=0>
<tr>
<td width=13 absheight=25>
<spacer type=horizontal size=13>
<td width=269 maxlines=1>
<font sizerange=medium color=#D6D6D6><blackface> ${(mailbox_name === "Inbox") ? ' Mail list for ' + username : mailbox_name}
</blackface></font>
<td width=21>
<img src="wtv-mail:/content/images/widget.gif" width=16 height=16>
<td width=80 >
<spacer type=vertical size=1><br>
<a href="wtv-setup:/mail"><font sizerange=small color=#E6CD4A><b>Settings</b></font></a>
<td width=21>
<!--
<img src="wtv-mail:/content/images/widget.gif" width=16 height=16 noprint>
<td width=36>
<spacer type=vertical size=1><br>
<a href="wtv-guide:/help?topic=Mail&subtopic=Index&appName=Mail" ><img src="wtv-mail:/content/images/mail_help_image.gif" width=35 height=17 noprint></a>
<td width=13>
-->
<spacer type=horizontal size=13>
</table>
</table>
</table>
<table cellspacing=0 cellpadding=0 border=0>
<tr>
<td bgcolor=#171726 width=13>
<spacer type=horizontal size=13>
<td bgcolor=#171726 width="438" valign="top">
<spacer type=vertical size=13><br>`;
if (message_list) {
data += ` data += `
<img src="wtv-mail:/content/images/${icon_image}" width=74 height=45 > <font sizerange=medium> ${message_list_string}
<td width=250 align=left><font sizerange=small> <table cellspacing=0 cellpadding=0 border=0>
</table> <TR><TD maxlines="1">
<tr> ${username}@${minisrv_config.config.service_name}
<td colspan=2> </TD></TR>
<table cellspacing=0 cellpadding=0 bgcolor=#2C323D> </TABLE>
<tr> </font><br>
<td width=451 absheight=25> <spacer type=vertical size=6>
<table cellspacing=0 cellpadding=0> <hr width=422 align=left>
<tr> <spacer type=vertical size=5>
<td width=13 absheight=25> <table cellspacing=0 cellpadding=0>
<spacer type=horizontal size=13> <tr>
<td width=269 maxlines=1> <td width=155>
<font sizerange=medium color=#D6D6D6><blackface> ${(mailbox_name === "Inbox") ? ' Mail list for ' + username : mailbox_name} <font sizerange=small color=#8897A6><b><spacer type=horizontal size=20>From</b></font>
</blackface></font> <td width=230><font sizerange=small color=#8897A6><b>Subject</b></font>
<td width=21> <td width=47><font sizerange=small color=#8897A6><b>Date</b></font>
<img src="wtv-mail:/content/images/widget.gif" width=16 height=16> </table>
<td width=80 > <spacer type=vertical size=1>
<spacer type=vertical size=1><br> <hr width=422 align=left>
<a href="wtv-setup:/mail"><font sizerange=small color=#E6CD4A><b>Settings</b></font></a> `;
<td width=21> Object.keys(message_list).forEach(function (k) {
<!-- var message = message_list[k];
<img src="wtv-mail:/content/images/widget.gif" width=16 height=16 noprint> if (typeof message.subject == "object" && message.subject) message.subject = wtvshared.decodeBufferText(message.subject);
<td width=36> message.known_sender = session_data.isAddressInAddressBook(message.from_addr);
<spacer type=vertical size=1><br> var message_font_open = "<font color=#7A9FCC>";
<a href="wtv-guide:/help?topic=Mail&subtopic=Index&appName=Mail" ><img src="wtv-mail:/content/images/mail_help_image.gif" width=35 height=17 noprint></a> var message_font_close = "</font>";
<td width=13> if (message.unread) {
--> message_font_open = `<b><font color=#99E6FF>`;
<spacer type=horizontal size=13> message_font_close = "</font></b>"
</table> }
</table> data += `<spacer type=vertical size=5>
</table> <table cellspacing=0 cellpadding=0 border=0>
<table cellspacing=0 cellpadding=0 border=0> <tr>
<tr> <td href="readmail?message_id=${message.id}#next" id="id${message.id}" selected>
<td bgcolor=#171726 width=13> <table cellspacing=0 cellpadding=0>
<spacer type=horizontal size=13> <tr>
<td bgcolor=#171726 width="438" valign="top"> <td abswidth=20 align=center valign=middle>${(message.known_sender) ? '<img height=10 width=10 src="wtv-mail:/content/images/dot.gif">' : ''}
<spacer type=vertical size=13><br>`; <td abswidth=130 maxlines=1>
if (message_list) { ${message_font_open}
${(message.from_name) ? message.from_name : message.from_addr}
${message_font_close}
<td abswidth=5>
<td abswidth=225 maxlines=1>
${message_font_open}
${(message.subject) ? wtvshared.htmlEntitize(message.subject) : "(No Subject)"}
${message_font_close}
<td abswidth=5>
<td abswidth=47 maxlines=1>
${message_font_open}
`;
var message_date = new Date(message.date * 1000);
data += (message_date.getMonth() + 1) + "/" + message_date.getDate() + "\n";
data += ` data += `
<font sizerange=medium> ${message_list_string} ${message_font_close}
<table cellspacing=0 cellpadding=0 border=0> </table>
<TR><TD maxlines="1"> <tr>
${username}@${minisrv_config.config.service_name} <td height=5>`;
</TD></TR> });
</TABLE> } else {
</font><br>
<spacer type=vertical size=6>
<hr width=422 align=left>
<spacer type=vertical size=5>
<table cellspacing=0 cellpadding=0>
<tr>
<td width=155>
<font sizerange=small color=#8897A6><b><spacer type=horizontal size=20>From</b></font>
<td width=230><font sizerange=small color=#8897A6><b>Subject</b></font>
<td width=47><font sizerange=small color=#8897A6><b>Date</b></font>
</table>
<spacer type=vertical size=1>
<hr width=422 align=left>
`;
Object.keys(message_list).forEach(function (k) {
var message = message_list[k];
if (typeof message.subject == "object" && message.subject) message.subject = wtvshared.decodeBufferText(message.subject);
message.known_sender = session_data.isAddressInAddressBook(message.from_addr);
var message_font_open = "<font color=#7A9FCC>";
var message_font_close = "</font>";
if (message.unread) {
message_font_open = `<b><font color=#99E6FF>`;
message_font_close = "</font></b>"
}
data += `<spacer type=vertical size=5>
<table cellspacing=0 cellpadding=0 border=0>
<tr>
<td href="readmail?message_id=${message.id}#next" id="id${message.id}" selected>
<table cellspacing=0 cellpadding=0>
<tr>
<td abswidth=20 align=center valign=middle>${(message.known_sender) ? '<img height=10 width=10 src="wtv-mail:/content/images/dot.gif">' : ''}
<td abswidth=130 maxlines=1>
${message_font_open}
${(message.from_name) ? message.from_name : message.from_addr}
${message_font_close}
<td abswidth=5>
<td abswidth=225 maxlines=1>
${message_font_open}
${(message.subject) ? wtvshared.htmlEntitize(message.subject) : "(No Subject)"}
${message_font_close}
<td abswidth=5>
<td abswidth=47 maxlines=1>
${message_font_open}
`;
var message_date = new Date(message.date * 1000);
data += (message_date.getMonth() + 1) + "/" + message_date.getDate() + "\n";
data += `
${message_font_close}
</table>
<tr>
<td height=5>`;
});
} else {
data += `
<font sizerange=medium> No ${(mailbox_name == "Inbox") ? `new e-mail messages for<table cellspacing=0 cellpadding=0 border=0>
<TR><TD maxlines="1">
${username}@${minisrv_config.config.service_name}
</TD></TR>
</TABLE>` : 'e-mail messages in mailbox ' + mailbox_name}
</font><br>
`;
}
data += ` data += `
<spacer type=vertical size=6> <font sizerange=medium> No ${(mailbox_name == "Inbox") ? `new e-mail messages for<table cellspacing=0 cellpadding=0 border=0>
</table> <TR><TD maxlines="1">
</body> ${username}@${minisrv_config.config.service_name}
</HTML> </TD></TR>
</TABLE>` : 'e-mail messages in mailbox ' + mailbox_name}
</font><br>
`;
}
data += `
<spacer type=vertical size=6>
</table>
</body>
</HTML>
`; `;

File diff suppressed because it is too large Load Diff

View File

@@ -17,7 +17,7 @@ wtv-expire-all: wtv-
wtv-expire-all: http wtv-expire-all: http
wtv-client-time-zone: GMT -0000 wtv-client-time-zone: GMT -0000
wtv-client-time-dst-rule: false wtv-client-time-dst-rule: false
wtv-client-date: ${strf("%a, %d %b %Y %H:%M:%S", new Date(new Date().setUTCSeconds(new Date().getUTCSeconds())))} GMT wtv-client-date: ${strf("%a, %d %b %Y %H:%M:%S", new Date(new Date().setUTCSeconds(new Date().getUTCSeconds())))}
Content-Type: text/html` Content-Type: text/html`