This commit is contained in:
Alexander Zinchuk 2023-09-28 01:54:02 +02:00
parent d4d3d70463
commit 697adc3a14
7 changed files with 20 additions and 19 deletions

View File

@ -216,11 +216,6 @@
max-width: 80%; max-width: 80%;
text-align: left; text-align: left;
} }
.text-entity-link {
color: inherit !important;
text-decoration: underline !important;
}
} }
.sticky-date, .sticky-date,

View File

@ -11,8 +11,8 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background: var(--pattern-color); background-color: var(--color-background);
color: white; color: var(--color-text);
font-size: calc(var(--message-text-size, 1rem) - 0.0625rem); font-size: calc(var(--message-text-size, 1rem) - 0.0625rem);
line-height: 1.75; line-height: 1.75;
border-radius: var(--border-radius-messages); border-radius: var(--border-radius-messages);
@ -28,3 +28,8 @@
font-weight: 500; font-weight: 500;
margin-bottom: 0.25rem; margin-bottom: 0.25rem;
} }
.image {
max-width: 100%;
height: auto;
}

View File

@ -70,6 +70,7 @@ const MessageListBotInfo: FC<OwnProps & StateProps> = ({
> >
{botInfoPhotoUrl && ( {botInfoPhotoUrl && (
<img <img
className={styles.image}
src={botInfoPhotoUrl} src={botInfoPhotoUrl}
width={botInfoRealDimensions?.width} width={botInfoRealDimensions?.width}
height={botInfoRealDimensions?.height} height={botInfoRealDimensions?.height}

View File

@ -1,3 +1,5 @@
@import "../../../styles/mixins";
.BotKeyboardMenu { .BotKeyboardMenu {
.bubble { .bubble {
width: 100% !important; width: 100% !important;
@ -9,12 +11,9 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 0.1875rem 0.625rem; padding: 0.1875rem 0.625rem;
max-height: 80vh; max-height: 75vh;
overflow: auto; overflow-y: scroll;
@include adapt-padding-to-scrollbar(0.625rem);
@media (max-width: 600px) {
max-height: 75vh;
}
.row { .row {
display: flex; display: flex;

View File

@ -49,7 +49,7 @@ const BotKeyboardMenu: FC<OwnProps & StateProps> = ({
onMouseLeave={!IS_TOUCH_ENV ? handleMouseLeave : undefined} onMouseLeave={!IS_TOUCH_ENV ? handleMouseLeave : undefined}
noCompact noCompact
> >
<div className="content"> <div className="content custom-scroll">
{message.keyboardButtons.map((row) => ( {message.keyboardButtons.map((row) => (
<div className="row"> <div className="row">
{row.map((button) => ( {row.map((button) => (

View File

@ -1132,7 +1132,8 @@ addActionHandler('openChatByUsername', async (global, actions, payload): Promise
const isWebApp = webAppName && !Number(webAppName) && !originalParts?.[2]; const isWebApp = webAppName && !Number(webAppName) && !originalParts?.[2];
if (!commentId) { if (!commentId) {
if (!startAttach && messageId && !startParam && chat?.usernames?.some((c) => c.username === username)) { if (startAttach === undefined && messageId && !startParam
&& chat?.usernames?.some((c) => c.username === username)) {
actions.focusMessage({ actions.focusMessage({
chatId: chat.id, threadId, messageId, tabId, chatId: chat.id, threadId, messageId, tabId,
}); });
@ -2559,7 +2560,7 @@ async function openChatByUsername<T extends GlobalState>(
threadId?: number, threadId?: number,
channelPostId?: number, channelPostId?: number,
startParam?: string, startParam?: string,
startAttach?: string | boolean, startAttach?: string,
attach?: string, attach?: string,
...[tabId = getCurrentTabId()]: TabArgs<T> ...[tabId = getCurrentTabId()]: TabArgs<T>
) { ) {
@ -2567,7 +2568,7 @@ async function openChatByUsername<T extends GlobalState>(
const currentChat = selectCurrentChat(global, tabId); const currentChat = selectCurrentChat(global, tabId);
// Attach in the current chat // Attach in the current chat
if (startAttach && !attach) { if (startAttach !== undefined && !attach) {
const bot = await getAttachBotOrNotify(global, actions, username, tabId); const bot = await getAttachBotOrNotify(global, actions, username, tabId);
if (!currentChat || !bot) return; if (!currentChat || !bot) return;
@ -2575,7 +2576,7 @@ async function openChatByUsername<T extends GlobalState>(
actions.callAttachBot({ actions.callAttachBot({
bot, bot,
chatId: currentChat.id, chatId: currentChat.id,
...(typeof startAttach === 'string' && { startParam: startAttach }), startParam: startAttach,
tabId, tabId,
}); });

View File

@ -1353,7 +1353,7 @@ export interface ActionPayloads {
messageId?: number; messageId?: number;
commentId?: number; commentId?: number;
startParam?: string; startParam?: string;
startAttach?: string | boolean; startAttach?: string;
attach?: string; attach?: string;
startApp?: string; startApp?: string;
originalParts?: string[]; originalParts?: string[];