drafts: Change foreground for dark background streams in drafts modal.

In drafts modal, dark background streams still had black foreground;
This changes the foreground to white for the same.
This commit is contained in:
Vaibhav
2019-02-14 21:17:27 +05:30
committed by Tim Abbott
parent 162f06bbbb
commit 2ca8ec371e
3 changed files with 8 additions and 2 deletions

View File

@@ -7,6 +7,8 @@ zrequire('XDate', 'xdate');
zrequire('timerender');
zrequire('Handlebars', 'handlebars');
zrequire('util');
zrequire('stream_color');
zrequire('colorspace');
var ls_container = {};
var noop = function () { return; };
@@ -261,6 +263,7 @@ run_test('format_drafts', () => {
is_stream: true,
stream: 'stream',
stream_color: '#FFFFFF',
dark_background: '',
topic: 'topic',
raw_content: 'Test Stream Message',
time_stamp: '7:55 AM',
@@ -291,6 +294,7 @@ run_test('format_drafts', () => {
is_stream: true,
stream: 'stream 2',
stream_color: '#FFFFFF',
dark_background: '',
topic: 'topic',
raw_content: 'Test Stream Message 2',
time_stamp: 'Jan 21',

View File

@@ -212,6 +212,7 @@ exports.format_draft = function (draft) {
var space_string = new Handlebars.SafeString(" ");
var stream = draft.stream.length > 0 ? draft.stream : space_string;
var draft_topic = util.get_draft_topic(draft);
var draft_stream_color = stream_data.get_color(draft.stream);
if (draft_topic === '') {
draft_topic = compose.empty_topic_placeholder();
@@ -221,7 +222,8 @@ exports.format_draft = function (draft) {
draft_id: draft.id,
is_stream: true,
stream: stream,
stream_color: stream_data.get_color(draft.stream),
stream_color: draft_stream_color,
dark_background: stream_color.get_color_class(draft_stream_color),
topic: draft_topic,
raw_content: draft.content,
time_stamp: time_stamp,

View File

@@ -3,7 +3,7 @@
{{#if is_stream}}
<div class="message_header message_header_stream">
<div class="message-header-contents">
<div class="message_label_clickable stream_label"
<div class="message_label_clickable stream_label {{dark_background}}"
style="background: {{stream_color}}; border-left-color: {{stream_color}};">
{{stream}}
</div>