mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
ts: Convert compose_error module to TypeScript.
This commit is contained in:
committed by
Tim Abbott
parent
97a27eb239
commit
92912a3b1c
@@ -2,7 +2,7 @@ import $ from "jquery";
|
|||||||
|
|
||||||
import * as common from "./common";
|
import * as common from "./common";
|
||||||
|
|
||||||
export function show(error_html, bad_input, alert_class = "alert-error") {
|
export function show(error_html: string, bad_input?: JQuery, alert_class = "alert-error"): void {
|
||||||
$("#compose-send-status")
|
$("#compose-send-status")
|
||||||
.removeClass(common.status_classes)
|
.removeClass(common.status_classes)
|
||||||
.addClass(alert_class)
|
.addClass(alert_class)
|
||||||
@@ -16,11 +16,11 @@ export function show(error_html, bad_input, alert_class = "alert-error") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function show_not_subscribed(error_html, bad_input) {
|
export function show_not_subscribed(error_html: string, bad_input?: JQuery): void {
|
||||||
show(error_html, bad_input, "home-error-bar");
|
show(error_html, bad_input, "home-error-bar");
|
||||||
$(".compose-send-status-close").hide();
|
$(".compose-send-status-close").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function hide() {
|
export function hide(): void {
|
||||||
$("#compose-send-status").stop(true).fadeOut(500);
|
$("#compose-send-status").stop(true).fadeOut(500);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user