cabal-club / cabal-cli

Terminal client for Cabal, the p2p chat platform.

Home Page:https://cabal.chat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Display the alias name of cabals when in multi-cabal mode

narFnarF opened this issue · comments

When using multi-cabal mode, the interface currently display each cabal as their cabal-key (or a short version of it). It makes it hard to distinguish each cabal when joining more than 2.

Suggestion: Display the user selected alias of each cabal instead (or in addition to) their cabal-key.

It looks like cabal aliases don't currently get passed down into cabal-client. If someone wanted to do a fix, I think the steps would look like

  1. Plumb a new opts.cabalAliases param down into Client in cabal-client, passing config.aliases into this from cabal-cli.
  2. Save that arg to this.cabalAliases in the Client constructor.
  3. Plumb any aliases for a cabal down into any CabalDetails that get created as a new opts parameter.
  4. Expose a cabal's aliases as e.g. CabalDetails.getAliases().
  5. Use that new method in neat-screen.js in cabal-cli to render all aliases for that cabal in the info line.