giphy: Add a '?' icon besides the "GIPHY integration" label.

We add a '?' icon besides the "GIPHY integration" label of
giphy settings dropdown.

The icon links to readthedocs page for setting up giphy API
key when api key is not set, and it points to help center
article of GIFs when the api key is added.
This commit is contained in:
sahil839
2021-05-20 00:26:53 +05:30
committed by Tim Abbott
parent 26bdf79642
commit 540904aa9d
2 changed files with 7 additions and 0 deletions

View File

@@ -135,6 +135,12 @@ export function build_page() {
options.realm_night_logo_url = options.realm_logo_url;
}
options.giphy_help_link = "/help/animated-gifs-from-giphy";
if (options.giphy_api_key_empty) {
options.giphy_help_link =
"https://zulip.readthedocs.io/en/latest/production/giphy-gif-integration.html";
}
const rendered_admin_tab = render_admin_tab(options);
$("#settings_content .organization-box").html(rendered_admin_tab);
$("#settings_content .alert").removeClass("show");

View File

@@ -197,6 +197,7 @@
<div class="input-group">
<label for="realm_giphy_rating" class="dropdown-title">
{{t 'GIPHY integration' }}
{{> ../help_link_widget link=giphy_help_link }}
</label>
<select name="realm_giphy_rating" class ="setting-widget prop-element" id="id_realm_giphy_rating" data-setting-widget-type="number" {{#if giphy_api_key_empty}}disabled{{/if}}>
{{#each giphy_rating_options}}