2021-02-09 11:16:52 +01:00
|
|
|
import ClipboardJS from "clipboard";
|
|
|
|
import $ from "jquery";
|
|
|
|
|
2021-06-14 13:19:27 +02:00
|
|
|
import render_about_zulip from "../templates/about_zulip.hbs";
|
|
|
|
|
2021-02-09 11:16:52 +01:00
|
|
|
import * as browser_history from "./browser_history";
|
|
|
|
import * as overlays from "./overlays";
|
2021-06-14 13:19:27 +02:00
|
|
|
import {page_params} from "./page_params";
|
2021-02-09 11:16:52 +01:00
|
|
|
|
|
|
|
export function launch() {
|
|
|
|
overlays.open_overlay({
|
|
|
|
name: "about-zulip",
|
2022-01-25 11:36:19 +01:00
|
|
|
$overlay: $("#about-zulip"),
|
2021-02-09 11:16:52 +01:00
|
|
|
on_close() {
|
|
|
|
browser_history.exit_overlay();
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
new ClipboardJS("#about-zulip .fa-copy");
|
|
|
|
}
|
2021-06-14 13:19:27 +02:00
|
|
|
|
|
|
|
export function initialize() {
|
|
|
|
const rendered_about_zulip = render_about_zulip({
|
|
|
|
zulip_version: page_params.zulip_version,
|
|
|
|
zulip_merge_base: page_params.zulip_merge_base,
|
|
|
|
is_fork:
|
|
|
|
page_params.zulip_merge_base &&
|
|
|
|
page_params.zulip_merge_base !== page_params.zulip_version,
|
|
|
|
});
|
|
|
|
$(".app").append(rendered_about_zulip);
|
|
|
|
}
|