Add ability to toggle avail/invis from WFC

This commit is contained in:
Bryan Ashby 2022-05-31 12:28:26 -06:00
parent 2ab50fb670
commit f02624c14d
No known key found for this signature in database
GPG Key ID: C2C1B501E4EFD994
4 changed files with 28 additions and 4 deletions

View File

@ -255,12 +255,12 @@
mainInfoFormat10: "|00|11{now} {currentUserName} |08- |03Prv|08:|11{newPrivateMail} |03Addr|08:|11{newMessagesAddrTo} |08- |03Avail|08:|11{availIndicator} |03Vis|08:|11{visIndicator}"
mainInfoFormat11: "|00|10{callsToday:>5}"
mainInfoFormat12: "|00|10{postsToday:>5}"
mainInfoFormat13: "|00|10{uploadsToday:>2} |08/ |10{uploadBytesToday!sizeWithoutAbbr} |02{uploadBytesToday!sizeAbbr}"
mainInfoFormat14: "|00|10{downloadsToday:>2} |08/ |10{downloadBytesToday!sizeWithoutAbbr} |02{downloadBytesToday!sizeAbbr}"
mainInfoFormat13: "|00|10{uploadsToday:>2} |08/ |10{uploadBytesToday!sizeWithoutAbbr:>3} |02{uploadBytesToday!sizeAbbr}"
mainInfoFormat14: "|00|10{downloadsToday:>2} |08/ |10{downloadBytesToday!sizeWithoutAbbr:>3} |02{downloadBytesToday!sizeAbbr}"
mainInfoFormat15: "|00|10{lastLoginUserName:<26} |02{lastLogin}"
mainInfoFormat16: "|00|10{newUsersToday}"
mainInfoFormat16: "|00|10{newUsersToday:>5}"
mainInfoFormat17: "|00|10{freeMemoryBytes!sizeWithoutAbbr} |02{freeMemoryBytes!sizeAbbr} free |08/ |10{totalMemoryBytes!sizeWithoutAbbr} |02{totalMemoryBytes!sizeAbbr}"
mainInfoFormat18: "|00|10{systemCurrentLoad} |02% |08/ |10{systemAvgLoad} |02load avg|08."
@ -269,7 +269,7 @@
mainInfoFormat20: "|00|10{totalCalls:>5}"
mainInfoFormat21: "|00|10{totalPosts:>7}"
mainInfoFormat22: "|00|10{totalUsers:>5}"
mainInfoFormat23: "|00|10{totalFiles} |08/ |10{totalFileBytes!sizeWithoutAbbr} |02{totalFileBytes!sizeAbbr}"
mainInfoFormat23: "|00|10{totalFiles:>4} |08/ |10{totalFileBytes!sizeWithoutAbbr:>4} |02{totalFileBytes!sizeAbbr}"
quickLogLevel: info
quickLogLevelIndicators: {
@ -293,6 +293,9 @@
}
0: {
mci: {
TL16: {
fillChar: .
}
TL17: { width: 23 }
TL18: { width: 23 }
TL19: { width: 14 }

View File

@ -136,6 +136,14 @@ module.exports = class User {
return (this.statusFlags & User.StatusFlags.NotVisible) == 0;
}
setAvailability(available) {
if (available) {
this.statusFlags &= ~User.StatusFlags.NotAvailable;
} else {
this.statusFlags |= User.StatusFlags.NotAvailable;
}
}
setVisibility(visible) {
if (visible) {
this.statusFlags &= ~User.StatusFlags.NotVisible;

View File

@ -51,6 +51,19 @@ exports.getModule = class WaitingForCallerModule extends MenuModule {
if (!this.config.acs.includes('SC')) {
this.config.acs = 'SC' + this.config.acs; // secure connection at the very least
}
this.menuMethods = {
toggleAvailable : (formData, extraArgs, cb) => {
const avail = this.client.user.isAvailable();
this.client.user.setAvailability(!avail);
return this._refreshAll(cb);
},
toggleVisible : (formData, extraArgs, cb) => {
const visible = this.client.user.isVisible();
this.client.user.setVisibility(!visible);
return this._refreshAll(cb);
},
}
}
// initSequence -> MenuModule.displayArtAndPrepViewController() (make common)