mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Segmenting color for load times.
This commit is contained in:
parent
ffa16517fe
commit
37e60eabcb
1 changed files with 7 additions and 2 deletions
|
@ -26,8 +26,13 @@ def user(u, msg, request=None):
|
|||
|
||||
if hasattr(request, 'start_time'):
|
||||
seconds = time.time() - request.start_time
|
||||
time_elapsed = "[%s%.4ss] " % (
|
||||
'~FB' if seconds < .5 else '~FR',
|
||||
color = '~FK~SB'
|
||||
if seconds >= .5:
|
||||
color = '~FR'
|
||||
elif seconds < .1:
|
||||
color = '~FB'
|
||||
time_elapsed = "[%s%.4ss~SB] " % (
|
||||
color,
|
||||
seconds,
|
||||
)
|
||||
is_premium = u.is_authenticated() and u.profile.is_premium
|
||||
|
|
Loading…
Add table
Reference in a new issue