diff --git a/data/web/corefork.telegram.org/api/bots/webapps.html b/data/web/corefork.telegram.org/api/bots/webapps.html index 768f975496..537c276b93 100644 --- a/data/web/corefork.telegram.org/api/bots/webapps.html +++ b/data/web/corefork.telegram.org/api/bots/webapps.html @@ -154,7 +154,13 @@
Bot web apps can be themed according to the following theme parameters, passed as a JSON object to the theme_params
parameter of the messages.requestSimpleWebView and messages.requestWebView methods.
This JSON object has the the following keys, containing color theme information (hex string, RGB, no alpha) to pass to the web app:
bg_color
- Background color secondary_bg_color
- Secondary background color text_color
- Text color hint_color
- Hint text color link_color
- Link color button_color
- Button color button_text_color
- Button text colorbg_color
- Background colorsecondary_bg_color
- Secondary background colortext_color
- Text colorhint_color
- Hint text colorlink_color
- Link colorbutton_color
- Button colorbutton_text_color
- Button text colorThis event must be ignored during a user swipe down, used to reduce the webview.
web_app_request_viewport
No event payload.
-Used by web apps to request information about the viewport, clients should emit a viewport_changed event
+Used by web apps to request information about the viewport, clients should emit a viewport_changed event.
web_app_request_theme
No event payload.
Used by web apps to request information about the current theme, clients should emit a theme_changed event.
@@ -166,6 +166,8 @@ The web app must also be expanded when the user swipes up on the webview.is_progress_visible
- Indicates whether the button should display a loading indicator (boolean, false by default)Configures the main button, located immediately below the webview: when the user presses it a main_button_pressed
event should be emitted by the client.
Note that if is_visible
is true, only when opening web apps from the attachment menu and only on clients with tab bars, the main button should be displayed only after the first user tap inside of the webview (to prevent bots from immediately blocking the tab bar).
+Otherwise, the main button can be displayed right away if is_visible
is true.
web_app_setup_back_button
Event data: a JSON object with an is_visible
boolean field.
Determines whether to show or hide the back button: when the user presses it a back_button_pressed
event should be emitted by the client.