Archived
1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
cli-old/lib/widgets/chat/info.rb
2017-07-22 14:27:14 +00:00

31 lines
620 B
Ruby

# frozen_string_literal: true
module Widgets
class Chat < VPanel
class Info < Base
attr_reader :name, :public_key
def initialize(x, y, width, height)
super
@name = Faker::Name.name
@public_key = SecureRandom.hex 32
end
def draw
setpos x, y
Style.default.online_mark do
Curses.addstr '[Online]'
end
Curses.addstr ' '
Style.default.peer_info_name do
Curses.addstr name
end
setpos x, y + 1
Curses.addstr 'Public key: '
Curses.addstr public_key
end
end
end
end