From 7e7bd538eb3424c29ff0fdc8a56accf9dc51004c Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Mon, 25 Jul 2016 01:03:07 -0600 Subject: [PATCH] Mail/email menu --- mods/menu.hjson | 222 ++++++++++++++++++- mods/themes/luciano_blocktronics/MSGEHDR.ANS | Bin 1578 -> 1578 bytes mods/themes/luciano_blocktronics/theme.hjson | 28 +++ 3 files changed, 244 insertions(+), 6 deletions(-) diff --git a/mods/menu.hjson b/mods/menu.hjson index 858cd1f2..4f11879b 100644 --- a/mods/menu.hjson +++ b/mods/menu.hjson @@ -372,7 +372,7 @@ } newUserFeedbackToSysOp: { - status: Feedback to SysOp + desc: Feedback to SysOp module: msg_area_post_fse next: [ { @@ -509,7 +509,10 @@ desc: Last Callers module: last_callers art: LASTCALL - options: { pause: true } + options: { + pause: true + font: cp437 + } next: fullLoginSequenceWhosOnline } fullLoginSequenceWhosOnline: { @@ -686,6 +689,9 @@ art: MMENU desc: Main Menu prompt: menuCommand + options: { + font: cp437 + } submit: [ { value: { command: "G" } @@ -715,6 +721,10 @@ value: { command: "M" } action: @menu:messageArea } + { + value: { command: "E" } + action: @menu:mailMenu + } { value: { command: "C" } action: @menu:mainMenuUserConfig @@ -893,7 +903,7 @@ } mainMenuFeedbackToSysOp: { - status: Feedback to SysOp + desc: Feedback to SysOp module: msg_area_post_fse config: { art: { @@ -1380,7 +1390,6 @@ // Message Area Menu /////////////////////////////////////////////////////////////////////// messageArea: { - module: msg_area art: MSGMNU desc: Message Area prompt: menuCommand @@ -1407,7 +1416,23 @@ } { value: { command: "G" } - action: @menu:logoff + action: @menu:fullLogoffSequence + } + { + value: { command: "<" } + action: @systemMethod:prevConf + } + { + value: { command: ">" } + action: @systemMethod:nextConf + } + { + value: { command: "[" } + action: @systemMethod:prevArea + } + { + value: { command: "]" } + action: @systemMethod:nextArea } { value: 1 @@ -1774,7 +1799,7 @@ } // :TODO: messageAreaSelect (change msg areas -> call @systemMethod -> fallback to menu messageAreaNewPost: { - status: Posting message, + desc: Posting message, module: msg_area_post_fse config: { art: { @@ -1889,6 +1914,191 @@ } } } + + + // + // User to User mail aka Email Menu + // + mailMenu: { + art: MAILMNU + desc: Mail Menu + prompt: menuCommand + submit: [ + { + value: { command: "C" } + action: @menu:mailMenuCreateMessage + } + { + value: { command: "I" } + action: @menu:mailMenuInbox + } + { + value: { command: "Q" } + action: @systemMethod:prevMenu + } + { + value: { command: "G" } + action: @menu:fullLogoffSequence + } + { + value: 1 + action: @menu:mailMenu + } + ] + } + + mailMenuCreateMessage: { + desc: Mailing Someone + module: msg_area_post_fse + config: { + art: { + header: MSGEHDR + body: MSGBODY + footerEditor: MSGEFTR + footerEditorMenu: MSGEMFT + help: MSGEHLP + }, + editorMode: edit + editorType: email + messageAreaTag: private_mail + } + form: { + 0: { + mci: { + TL1: { + argName: from + } + ET2: { + argName: to + focus: true + validate: @systemMethod:validateUserNameExists + } + ET3: { + argName: subject + maxLength: 72 + submit: true + validate: @systemMethod:validateMessageSubject + } + } + submit: { + 3: [ + { + value: { subject: null } + action: @method:headerSubmit + } + ] + } + actionKeys: [ + { + keys: [ "escape" ] + action: @systemMethod:prevMenu + } + ] + } + 1: { + mci: { + MT1: { + width: 79 + argName: message + mode: edit + } + } + + submit: { + *: [ { value: "message", action: "@method:editModeEscPressed" } ] + } + actionKeys: [ + { + keys: [ "escape" ] + viewId: 1 + } + ] + }, + 2: { + TLTL: { + mci: { + TL1: { + width: 5 + } + TL2: { + width: 4 + } + } + } + } + 3: { + HM: { + mci: { + HM1: { + // :TODO: clear + items: [ "save", "discard", "help" ] + } + } + submit: { + *: [ + { + value: { 1: 0 } + action: @method:editModeMenuSave + } + { + value: { 1: 1 } + action: @systemMethod:prevMenu + } + { + value: { 1: 2 } + action: @method:editModeMenuHelp + } + ] + } + actionKeys: [ + { + keys: [ "escape" ] + action: @method:editModeEscPressed + } + { + keys: [ "?" ] + action: @method:editModeMenuHelp + } + ] + } + } + } + } + + mailMenuInbox: { + module: msg_list + art: MSGLIST + config: { + menuViewPost: messageAreaViewPost + messageAreaTag: private_mail + } + form: { + 0: { + mci: { + VM1: { + focus: true + submit: true + argName: message + } + } + submit: { + *: [ + { + value: { message: null } + action: @method:selectMessage + } + ] + } + actionKeys: [ + { + keys: [ "escape", "q", "shift + q" ] + action: @systemMethod:prevMenu + } + ] + } + } + } + //////////////////////////////////////////////////////////////////////// // Required entries //////////////////////////////////////////////////////////////////////// diff --git a/mods/themes/luciano_blocktronics/MSGEHDR.ANS b/mods/themes/luciano_blocktronics/MSGEHDR.ANS index 2687f5ee2e515b74f61561b40513e2f658926a56..24898722e64e0a08435ede9ea2979d5418072180 100644 GIT binary patch delta 14 VcmZ3*vx;YfIxC~`W(`&*MgSm117H9E delta 14 VcmZ3*vx;YfIxC~uW(`&*MgSmJ17iRH diff --git a/mods/themes/luciano_blocktronics/theme.hjson b/mods/themes/luciano_blocktronics/theme.hjson index ff726ae9..ec8e3405 100644 --- a/mods/themes/luciano_blocktronics/theme.hjson +++ b/mods/themes/luciano_blocktronics/theme.hjson @@ -243,6 +243,34 @@ } } + mailMenuCreateMessage: { + 0: { + mci: { + TL1: { width: 19, textOverflow: "..." } + ET2: { width: 19, textOverflow: "..." } + ET3: { width: 19, textOverflow: "..." } + } + } + 1: { + mci: { + MT1: { height: 14 } + } + } + } + + mailMenuInbox: { + config: { + listFormat: "|00|15{msgNum:>4} |03{subject:<29.29} |11{fromUserName:<20.20} |03{ts} |01|31{newIndicator}" + focusListFormat: "|00|19|15{msgNum:>4} {subject:<29.29} {fromUserName:<20.20} {ts} {newIndicator}" + dateTimeFormat: ddd MMM Do + } + mci: { + VM1: { + height: 14 + } + } + } + bbsList: { 0: { mci: {