js: Convert static/js/feedback_widget.js to ES6 module.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-02-10 07:47:06 -08:00 committed by Tim Abbott
parent a175826a5a
commit a17ce6aeee
7 changed files with 13 additions and 14 deletions

View File

@ -169,7 +169,6 @@
"echo": false,
"emoji_picker": false,
"favicon": false,
"feedback_widget": false,
"flatpickr": false,
"floating_recipient_bar": false,
"gear_menu": false,

View File

@ -20,7 +20,6 @@ import "../keydown_util";
import "../rtl";
import "../fold_dict";
import "../scroll_util";
import "../feedback_widget";
import "../localstorage";
import "../drafts";
import "../input_pill";

View File

@ -1,6 +1,4 @@
"use strict";
const render_feedback_container = require("../templates/feedback_container.hbs");
import render_feedback_container from "../templates/feedback_container.hbs";
/*
@ -104,15 +102,15 @@ function set_up_handlers() {
});
}
exports.is_open = function () {
export function is_open() {
return meta.opened;
};
}
exports.dismiss = function () {
export function dismiss() {
animate.fadeOut();
};
}
exports.show = function (opts) {
export function show(opts) {
if (!opts.populate) {
blueslip.error("programmer needs to supply populate callback.");
return;
@ -135,6 +133,4 @@ exports.show = function (opts) {
opts.populate(meta.$container.find(".feedback_content"));
animate.fadeIn();
};
window.feedback_widget = exports;
}

View File

@ -42,7 +42,6 @@ declare let echo: any;
declare let emoji: any;
declare let emoji_picker: any;
declare let favicon: any;
declare let feedback_widget: any;
declare let floating_recipient_bar: any;
declare let gear_menu: any;
declare let hashchange: any;

View File

@ -2,6 +2,8 @@
const emoji = require("../shared/js/emoji");
const feedback_widget = require("./feedback_widget");
function do_narrow_action(action) {
action(current_msg_list.selected_id(), {trigger: "hotkey"});
return true;

View File

@ -3,6 +3,8 @@
const render_muted_topic_ui_row = require("../templates/muted_topic_ui_row.hbs");
const render_topic_muted = require("../templates/topic_muted.hbs");
const feedback_widget = require("./feedback_widget");
function timestamp_ms() {
return Date.now();
}

View File

@ -2,6 +2,8 @@
const marked = require("../third/marked/lib/marked");
const feedback_widget = require("./feedback_widget");
/*
What in the heck is a zcommand?