mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 12:33:40 +00:00
js: Normalize strings to double quotes.
Prettier would do this anyway, but it’s separated out for a more reviewable diff. Generated by ESLint. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
06691e1e45
commit
f3726db89a
@@ -1,7 +1,7 @@
|
||||
exports.default_color = "#c2c2c2";
|
||||
|
||||
// Classes which could be returned by get_color_class.
|
||||
exports.color_classes = 'dark_background';
|
||||
exports.color_classes = "dark_background";
|
||||
|
||||
function update_table_stream_color(table, stream_name, color) {
|
||||
// This is ugly, but temporary, as the new design will make it
|
||||
@@ -26,8 +26,8 @@ function update_table_stream_color(table, stream_name, color) {
|
||||
}
|
||||
|
||||
function update_stream_sidebar_swatch_color(id, color) {
|
||||
$("#stream_sidebar_swatch_" + id).css('background-color', color);
|
||||
$("#stream_sidebar_privacy_swatch_" + id).css('color', color);
|
||||
$("#stream_sidebar_swatch_" + id).css("background-color", color);
|
||||
$("#stream_sidebar_privacy_swatch_" + id).css("color", color);
|
||||
}
|
||||
|
||||
function update_historical_message_color(stream_name, color) {
|
||||
@@ -38,10 +38,10 @@ function update_historical_message_color(stream_name, color) {
|
||||
}
|
||||
|
||||
const stream_color_palette = [
|
||||
['a47462', 'c2726a', 'e4523d', 'e7664d', 'ee7e4a', 'f4ae55'],
|
||||
['76ce90', '53a063', '94c849', 'bfd56f', 'fae589', 'f5ce6e'],
|
||||
['a6dcbf', 'addfe5', 'a6c7e5', '4f8de4', '95a5fd', 'b0a5fd'],
|
||||
['c2c2c2', 'c8bebf', 'c6a8ad', 'e79ab5', 'bd86e5', '9987e1'],
|
||||
["a47462", "c2726a", "e4523d", "e7664d", "ee7e4a", "f4ae55"],
|
||||
["76ce90", "53a063", "94c849", "bfd56f", "fae589", "f5ce6e"],
|
||||
["a6dcbf", "addfe5", "a6c7e5", "4f8de4", "95a5fd", "b0a5fd"],
|
||||
["c2c2c2", "c8bebf", "c6a8ad", "e79ab5", "bd86e5", "9987e1"],
|
||||
];
|
||||
|
||||
const subscriptions_table_colorpicker_options = {
|
||||
@@ -64,7 +64,7 @@ exports.update_stream_color = function (sub, color, opts) {
|
||||
sub.color = color;
|
||||
const stream_id = sub.stream_id;
|
||||
// The swatch in the subscription row header.
|
||||
$(".stream-row[data-stream-id='" + stream_id + "'] .icon").css('background-color', color);
|
||||
$(".stream-row[data-stream-id='" + stream_id + "'] .icon").css("background-color", color);
|
||||
// The swatch in the color picker.
|
||||
exports.set_colorpicker_color($("#subscription_overlay .subscription_settings[data-stream-id='" + stream_id + "'] .colorpicker"), color);
|
||||
$("#subscription_overlay .subscription_settings[data-stream-id='" + stream_id + "'] .large-icon").css("color", color);
|
||||
@@ -77,7 +77,7 @@ exports.update_stream_color = function (sub, color, opts) {
|
||||
};
|
||||
|
||||
function picker_do_change_color(color) {
|
||||
const stream_id = parseInt($(this).attr('stream_id'), 10);
|
||||
const stream_id = parseInt($(this).attr("stream_id"), 10);
|
||||
const hex_color = color.toHexString();
|
||||
subs.set_color(stream_id, hex_color);
|
||||
}
|
||||
@@ -140,7 +140,7 @@ exports.get_color_class = _.memoize((color) => {
|
||||
match = /^#([\da-fA-F])([\da-fA-F])([\da-fA-F])$/.exec(color);
|
||||
if (!match) {
|
||||
// Can't understand color.
|
||||
return '';
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ exports.get_color_class = _.memoize((color) => {
|
||||
|
||||
// Determine if we're past the midpoint between the
|
||||
// dark and light label lightness.
|
||||
return lightness < lightness_threshold ? 'dark_background' : '';
|
||||
return lightness < lightness_threshold ? "dark_background" : "";
|
||||
});
|
||||
|
||||
window.stream_color = exports;
|
||||
|
||||
Reference in New Issue
Block a user