Add single-user handling (#9)

- Disallow log on for single-user mode user
- Improve CLI header display
This commit is contained in:
2024-04-27 13:54:09 -04:00
parent c1790b58fd
commit bf6b2a0ffa
3 changed files with 70 additions and 44 deletions

View File

@@ -22,5 +22,9 @@ function printfn(string $format, mixed ...$values): void {
* @param string $title The title to display on the command line
*/
function cli_title(string $title): void {
printfn("$title | Feed Reader Central v%s" . PHP_EOL, FRC_VERSION);
$appTitle = 'Feed Reader Central ~ v' . FRC_VERSION;
$dashes = ' +' . str_repeat('-', strlen($title) + 2) . '+' . str_repeat('-', strlen($appTitle) + 2) . '+';
printfn($dashes);
printfn(' | %s | %s |', $title, $appTitle);
printfn($dashes . PHP_EOL);
}