Update content of files

This commit is contained in:
GitHub Action 2023-12-01 20:09:19 +00:00
parent 449c21c41b
commit f0516692d1
3 changed files with 22 additions and 86 deletions

View file

@ -92,6 +92,24 @@ Note that eventual errors will not be sent as a <code>failed</code> event if the
<li><code>theme_params</code> - A <a href="#theme-parameters">theme parameters object »</a> (object)</li>
</ul>
<p>Emitted when requested by the Mini App using a <a href="/api/web-events#web-app-request-theme"><code>web_app_request_theme</code> event »</a>, or when the app theme changes. </p>
<h5><a class="anchor" href="#theme-parameters" id="theme-parameters" name="theme-parameters"><i class="anchor-icon"></i></a>Theme parameters</h5>
<p>Bot Mini Apps can be themed according to the following theme parameters, passed as a JSON object to the <code>theme_params</code> parameter of the <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a> and <a href="/method/messages.requestWebView">messages.requestWebView</a> methods. </p>
<p>This JSON object has the following keys, containing color theme information (hex string, RGB, no alpha) to pass to the Mini App:</p>
<ul>
<li><code>bg_color</code> - Background color</li>
<li><code>secondary_bg_color</code> - Secondary background color</li>
<li><code>text_color</code> - Text color</li>
<li><code>hint_color</code> - Hint text color</li>
<li><code>link_color</code> - Link color</li>
<li><code>button_color</code> - Button color</li>
<li><code>button_text_color</code> - Button text color</li>
<li><code>header_bg_color</code> - Header background color</li>
<li><code>accent_text_color</code> - Accent text color</li>
<li><code>section_bg_color</code> - Section background color</li>
<li><code>section_header_text_color</code> - Section header text color</li>
<li><code>subtitle_text_color</code> - Sub title text color</li>
<li><code>destructive_text_color</code> - Text color for destructive action buttons in prompts</li>
</ul>
<h4><a class="anchor" href="#popup-closed" id="popup-closed" name="popup-closed"><i class="anchor-icon"></i></a><code>popup_closed</code></h4>
<p>Params: a JSON object with an optional <code>button_id</code> string field.</p>
<p>Emitted when the user presses a button or cancels a popup brought up by a previous <a href="/api/web-events#web-app-open-popup"><code>web_app_open_popup</code> event »</a>. </p>
@ -288,25 +306,7 @@ Confirmation should <strong>always</strong> be asked, even if the <code>inactive
</ul>
</li>
</ul>
<p>Finally, open the webview using the <code>url</code> contained in the returned <a href="/constructor/appWebViewResultUrl">appWebViewResultUrl</a>. </p>
<h3><a class="anchor" href="#theme-parameters" id="theme-parameters" name="theme-parameters"><i class="anchor-icon"></i></a>Theme parameters</h3>
<p>Bot Mini Apps can be themed according to the following theme parameters, passed as a JSON object to the <code>theme_params</code> parameter of the <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a> and <a href="/method/messages.requestWebView">messages.requestWebView</a> methods. </p>
<p>This JSON object has the following keys, containing color theme information (hex string, RGB, no alpha) to pass to the Mini App:</p>
<ul>
<li><code>bg_color</code> - Background color</li>
<li><code>secondary_bg_color</code> - Secondary background color</li>
<li><code>text_color</code> - Text color</li>
<li><code>hint_color</code> - Hint text color</li>
<li><code>link_color</code> - Link color</li>
<li><code>button_color</code> - Button color</li>
<li><code>button_text_color</code> - Button text color</li>
<li><code>header_bg_color</code> - Header background color</li>
<li><code>accent_text_color</code> - Accent text color</li>
<li><code>section_bg_color</code> - Section background color</li>
<li><code>section_header_text_color</code> - Section header text color</li>
<li><code>subtitle_text_color</code> - Sub title text color</li>
<li><code>destructive_text_color</code> - Text color for destructive action buttons in prompts</li>
</ul></div>
<p>Finally, open the webview using the <code>url</code> contained in the returned <a href="/constructor/appWebViewResultUrl">appWebViewResultUrl</a>.</p></div>
</div>

View file

@ -1316,11 +1316,11 @@ Look for updates of telegram&#39;s terms of service…">
</tr>
<tr>
<td><a href="/method/messages.requestAppWebView">messages.requestAppWebView</a></td>
<td>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#named-bot-mini-app-links">named bot mini app deep link</a>, sending over user information after user confirmation.<br><br>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</td>
<td>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#named-mini-app-links">named Mini App deep link</a>, sending over user information after user confirmation.<br><br>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</td>
</tr>
<tr>
<td><a href="/method/messages.getBotApp">messages.getBotApp</a></td>
<td>Obtain information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a></td>
<td>Obtain information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a></td>
</tr>
<tr>
<td><a href="/method/bots.canSendMessage">bots.canSendMessage</a></td>

View file

@ -2463,7 +2463,7 @@ a.tm-table-action-link:hover {
line-height: 42px;
font-weight: bold;
padding: 12px 20px;
background-color: var(--field-bg-color);
background-color: var(--table-header-bg-color);
border-radius: var(--def-border-radius);
color: var(--field-color);
text-align: center;
@ -2548,70 +2548,6 @@ a.tm-table-action-link:hover {
filter: blur(7px);
}
.tm-field-hint {
margin: 8px 14px;
}
.tm-number-form-group {
margin: 36px 0 0;
}
.tm-checkbox-toggle {
position: relative;
font-weight: normal;
font-size: 14px;
line-height: 20px;
padding: 11px 14px;
cursor: pointer;
-webkit-user-select: none;
user-select: none;
}
.tm-checkbox-toggle .checkbox {
position: absolute;
top: 0;
bottom: 0;
right: 0;
margin: auto 24px;
}
.tm-checkbox-toggle .checkbox ~ .tm-checkbox-label:before,
.tm-checkbox-toggle .checkbox ~ .tm-checkbox-label:after {
position: absolute;
right: 0;
top: 0;
content: '';
}
.tm-checkbox-toggle .checkbox ~ .tm-checkbox-label:before {
margin: 11px 13px;
width: 36px;
height: 20px;
border-radius: 10px;
background-color: #64717f;
transition: var(--def-transition) background-color;
}
.tm-checkbox-toggle .checkbox:checked ~ .tm-checkbox-label:before {
background-color: #149efa;
}
.tm-checkbox-toggle .checkbox ~ .tm-checkbox-label:after {
width: 16px;
height: 16px;
margin: 13px;
border-radius: 8px;
background-color: #fff;
right: 18px;
transform: translateX(0);
transition: var(--def-transition) transform;
}
.tm-checkbox-toggle .checkbox:checked ~ .tm-checkbox-label:after {
background-color: #fff;
transform: translateX(16px);
}
.cant-receive,
.codes-disabled .can-receive {
display: none;
}
.codes-disabled .cant-receive {
display: block;
}