Make it clearer what the completions are for

This commit is contained in:
Kovid Goyal 2021-06-09 08:56:48 +05:30
parent 6556f9a7e9
commit dfe16969fc
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -258,9 +258,11 @@ def add_completion(container_id, name):
def show_completions(container_id, div, field, prefix, names):
clear(div)
completions = E.div(class_='completions')
if names.length:
div.appendChild(E.div(_('Tap to add:')))
div.appendChild(completions)
for i, name in enumerate(names):
completions.appendChild(E.div(name, onclick=add_completion.bind(None, container_id, name)))
completions.appendChild(E.div(E.span(style='color: green', svgicon('plus'), '\xa0'), name, onclick=add_completion.bind(None, container_id, name)))
if i >= 50:
break