Formatting works for comments and description

Supports bold, italic, underline, and links
This commit is contained in:
2018-03-07 09:44:02 -08:00
parent d7b919701c
commit 3e65d08bbf
5 changed files with 126 additions and 21 deletions

View File

@@ -8,6 +8,10 @@ palette = [
('selected', 'standout', ''),
('task', 'light green', ''),
('text', '', ''),
('strong', 'bold', ''),
('underline', 'underline', ''),
('link', 'underline,light blue', ''),
('italic', 'italics', ''),
('workspace', 'white', 'dark blue'),
]

View File

@@ -74,11 +74,9 @@ class CustomFields(object):
class Stories(object):
def __init__(self, stories):
components = [urwid.Text([
('author', s.creator()),
s.text(),
'\n'
]) for s in stories]
components = [
urwid.Text([('author', s.creator())] + s.text())
for s in stories]
self.stories = urwid.Pile(components)

View File

@@ -39,9 +39,10 @@ class Ui(object):
def task_list(self, id):
self.nav_stack.append(('project', id))
def runInThread():
project = self.asana_service.get_project(id)
tasks = self.asana_service.get_tasks(id)
self.update(TaskList(tasks,
'TODO: get project name',
project.name(),
self.task_details
).component())
thread = Thread(target=runInThread())