mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
DRYer
This commit is contained in:
parent
3e35fab553
commit
02b67f82b9
@ -90,7 +90,7 @@ def on_data_loaded(end_type, xhr, ev):
|
|||||||
if end_type is 'load':
|
if end_type is 'load':
|
||||||
install_data_and_init_ui(xhr.responseText)
|
install_data_and_init_ui(xhr.responseText)
|
||||||
else:
|
else:
|
||||||
p = E.p(style='color:red; font-weight: bold; font-size:1.5em')
|
p = E.p(style='color:{}; font-weight: bold; font-size:1.5em'.format(get_color('window-error-foreground')))
|
||||||
if xhr.status is 401:
|
if xhr.status is 401:
|
||||||
msg = _('You are not authorized to view this site')
|
msg = _('You are not authorized to view this site')
|
||||||
else:
|
else:
|
||||||
|
@ -13,6 +13,7 @@ def get_color(name):
|
|||||||
'window-background': LIGHT,
|
'window-background': LIGHT,
|
||||||
'window-background2': LIGHT_DARKER,
|
'window-background2': LIGHT_DARKER,
|
||||||
'window-foreground': DARK,
|
'window-foreground': DARK,
|
||||||
|
'window-error-foreground': 'red',
|
||||||
|
|
||||||
# Top bar specific colors
|
# Top bar specific colors
|
||||||
'bar-background': DARK,
|
'bar-background': DARK,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user