mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
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:
@@ -7,6 +7,8 @@ zrequire('XDate', 'xdate');
|
|||||||
zrequire('timerender');
|
zrequire('timerender');
|
||||||
zrequire('Handlebars', 'handlebars');
|
zrequire('Handlebars', 'handlebars');
|
||||||
zrequire('util');
|
zrequire('util');
|
||||||
|
zrequire('stream_color');
|
||||||
|
zrequire('colorspace');
|
||||||
|
|
||||||
var ls_container = {};
|
var ls_container = {};
|
||||||
var noop = function () { return; };
|
var noop = function () { return; };
|
||||||
@@ -261,6 +263,7 @@ run_test('format_drafts', () => {
|
|||||||
is_stream: true,
|
is_stream: true,
|
||||||
stream: 'stream',
|
stream: 'stream',
|
||||||
stream_color: '#FFFFFF',
|
stream_color: '#FFFFFF',
|
||||||
|
dark_background: '',
|
||||||
topic: 'topic',
|
topic: 'topic',
|
||||||
raw_content: 'Test Stream Message',
|
raw_content: 'Test Stream Message',
|
||||||
time_stamp: '7:55 AM',
|
time_stamp: '7:55 AM',
|
||||||
@@ -291,6 +294,7 @@ run_test('format_drafts', () => {
|
|||||||
is_stream: true,
|
is_stream: true,
|
||||||
stream: 'stream 2',
|
stream: 'stream 2',
|
||||||
stream_color: '#FFFFFF',
|
stream_color: '#FFFFFF',
|
||||||
|
dark_background: '',
|
||||||
topic: 'topic',
|
topic: 'topic',
|
||||||
raw_content: 'Test Stream Message 2',
|
raw_content: 'Test Stream Message 2',
|
||||||
time_stamp: 'Jan 21',
|
time_stamp: 'Jan 21',
|
||||||
|
|||||||
@@ -212,6 +212,7 @@ exports.format_draft = function (draft) {
|
|||||||
var space_string = new Handlebars.SafeString(" ");
|
var space_string = new Handlebars.SafeString(" ");
|
||||||
var stream = draft.stream.length > 0 ? draft.stream : space_string;
|
var stream = draft.stream.length > 0 ? draft.stream : space_string;
|
||||||
var draft_topic = util.get_draft_topic(draft);
|
var draft_topic = util.get_draft_topic(draft);
|
||||||
|
var draft_stream_color = stream_data.get_color(draft.stream);
|
||||||
|
|
||||||
if (draft_topic === '') {
|
if (draft_topic === '') {
|
||||||
draft_topic = compose.empty_topic_placeholder();
|
draft_topic = compose.empty_topic_placeholder();
|
||||||
@@ -221,7 +222,8 @@ exports.format_draft = function (draft) {
|
|||||||
draft_id: draft.id,
|
draft_id: draft.id,
|
||||||
is_stream: true,
|
is_stream: true,
|
||||||
stream: stream,
|
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,
|
topic: draft_topic,
|
||||||
raw_content: draft.content,
|
raw_content: draft.content,
|
||||||
time_stamp: time_stamp,
|
time_stamp: time_stamp,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
{{#if is_stream}}
|
{{#if is_stream}}
|
||||||
<div class="message_header message_header_stream">
|
<div class="message_header message_header_stream">
|
||||||
<div class="message-header-contents">
|
<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}};">
|
style="background: {{stream_color}}; border-left-color: {{stream_color}};">
|
||||||
{{stream}}
|
{{stream}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user