mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
ts: Convert deprecated_feature_notice module to TypeScript.
This commit is contained in:
@@ -6,7 +6,10 @@ import * as dialog_widget from "./dialog_widget";
|
||||
import {$t_html} from "./i18n";
|
||||
import {localstorage} from "./localstorage";
|
||||
|
||||
export function get_hotkey_deprecation_notice(originalHotkey, replacementHotkey) {
|
||||
export function get_hotkey_deprecation_notice(
|
||||
originalHotkey: string,
|
||||
replacementHotkey: string,
|
||||
): string {
|
||||
return $t_html(
|
||||
{
|
||||
defaultMessage:
|
||||
@@ -16,9 +19,9 @@ export function get_hotkey_deprecation_notice(originalHotkey, replacementHotkey)
|
||||
);
|
||||
}
|
||||
|
||||
let shown_deprecation_notices = [];
|
||||
let shown_deprecation_notices: string[] = [];
|
||||
|
||||
export function maybe_show_deprecation_notice(key) {
|
||||
export function maybe_show_deprecation_notice(key: string): void {
|
||||
let message;
|
||||
const isCmdOrCtrl = common.has_mac_keyboard() ? "Cmd" : "Ctrl";
|
||||
switch (key) {
|
||||
@@ -56,7 +59,9 @@ export function maybe_show_deprecation_notice(key) {
|
||||
html_heading: $t_html({defaultMessage: "Deprecation notice"}),
|
||||
html_body: message,
|
||||
html_submit_button: $t_html({defaultMessage: "Got it"}),
|
||||
on_click() {},
|
||||
on_click() {
|
||||
return;
|
||||
},
|
||||
close_on_submit: true,
|
||||
focus_submit_on_open: true,
|
||||
single_footer_button: true,
|
||||
Reference in New Issue
Block a user