mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-04-01 00:18:21 +02:00
minor change in look
made depth == 6 etc
This commit is contained in:
parent
7595f072d9
commit
3f8afda89a
@ -491,7 +491,7 @@ Future<void> channelMenuUI(Store node) async {
|
||||
|
||||
//await processNotifications(node); // this takes 300 ms
|
||||
if( !justShowedChannels) {
|
||||
node.printAllChannelsInfo(20, selectorShowAllRooms);
|
||||
node.printChannelsOverview(20, selectorShowAllRooms);
|
||||
justShowedChannels = true;
|
||||
}
|
||||
|
||||
@ -554,7 +554,7 @@ Future<void> channelMenuUI(Store node) async {
|
||||
break;
|
||||
|
||||
case 2:
|
||||
node.printAllChannelsInfo(1000, selectorShowAllRooms);
|
||||
node.printChannelsOverview(1000, selectorShowAllRooms);
|
||||
justShowedChannels = true;
|
||||
break;
|
||||
|
||||
@ -667,7 +667,7 @@ Future<void> mainMenuUi(Store node) async {
|
||||
if( numDirectRoomsPrinted > 0)
|
||||
print("\n");
|
||||
|
||||
int numChannelsPrinted = node.printAllChannelsInfo(20, showNotifications);
|
||||
int numChannelsPrinted = node.printChannelsOverview(20, showNotifications);
|
||||
|
||||
if( numChannelsPrinted > 0)
|
||||
print("\n");
|
||||
|
@ -1,6 +1,8 @@
|
||||
import 'dart:io';
|
||||
import 'package:logging/logging.dart';
|
||||
|
||||
|
||||
|
||||
final log = Logger('ExampleLogger');
|
||||
|
||||
// for debugging
|
||||
@ -89,7 +91,7 @@ const String gDummyAccountPubkey = "Non";
|
||||
const int gMinValidTextWidth = 60; // minimum text width acceptable
|
||||
const int gDefaultTextWidth = 96; // default text width
|
||||
int gTextWidth = gDefaultTextWidth; // is changed by --width option
|
||||
const int gSpacesPerDepth = 4; // constant
|
||||
const int gSpacesPerDepth = 6; // constant
|
||||
int gNumLeftMarginSpaces = 0;// this number is modified in main
|
||||
String gAlignment = "center"; // is modified in main if --align argument is given
|
||||
const int gapBetweenTopTrees = 1;
|
||||
@ -334,8 +336,14 @@ String intro =
|
||||
╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚══════╝╚══════╝
|
||||
|
||||
|
||||
""";
|
||||
""";
|
||||
|
||||
print("\n$intro\n");
|
||||
List<String> lines = intro.split("\n");
|
||||
|
||||
//print(gCommentColor);
|
||||
lines.forEach((line) {print(line.length > stdout.terminalColumns ? line.substring(0, stdout.terminalColumns) : line );});
|
||||
//print(gColorEndMarker);
|
||||
|
||||
//print("\n$intro\n");
|
||||
|
||||
}
|
||||
|
@ -245,6 +245,8 @@ class Tree {
|
||||
int printTree(int depth, DateTime newerThan, bool topPost) {
|
||||
int numPrinted = 0;
|
||||
|
||||
if( !topPost)
|
||||
print("");
|
||||
event.printEvent(depth, topPost);
|
||||
numPrinted++;
|
||||
|
||||
@ -507,7 +509,7 @@ class Store {
|
||||
Store.startMarkerStr += ("▄────────────\n"); // bottom half ▄
|
||||
|
||||
|
||||
int endMarkerDepth = depth + 2 + gTextWidth~/ gSpacesPerDepth - 1;
|
||||
int endMarkerDepth = depth + 1 + gTextWidth~/ gSpacesPerDepth - 1;
|
||||
Store.endMarkerStr = getDepthSpaces(endMarkerDepth);
|
||||
Store.endMarkerStr += "█\n";
|
||||
Store.endMarkerStr += "────────────▀".padLeft((endMarkerDepth) * gSpacesPerDepth + gNumLeftMarginSpaces + 1) ;
|
||||
@ -1040,7 +1042,7 @@ class Store {
|
||||
/**
|
||||
* @printAllChennelsInfo Print one line information about all channels, which are type 40 events ( class ChatRoom)
|
||||
*/
|
||||
int printAllChannelsInfo(int numToPrint, fRoomSelector selector) {
|
||||
int printChannelsOverview(int numToPrint, fRoomSelector selector) {
|
||||
|
||||
int numRoomsSelected = 0;
|
||||
for( int j = 0; j < channels.length; j++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user