Reply fixes
This commit is contained in:
parent
e9ef5898eb
commit
79aa7b6f62
@ -9,6 +9,7 @@ import { getMiddleware } from "../../helpers/middleware";
|
|||||||
import { limitSymbols } from "../../helpers/string";
|
import { limitSymbols } from "../../helpers/string";
|
||||||
import appImManager, { CHAT_ANIMATION_GROUP } from "../../lib/appManagers/appImManager";
|
import appImManager, { CHAT_ANIMATION_GROUP } from "../../lib/appManagers/appImManager";
|
||||||
import appMessagesManager from "../../lib/appManagers/appMessagesManager";
|
import appMessagesManager from "../../lib/appManagers/appMessagesManager";
|
||||||
|
import appPhotosManager from "../../lib/appManagers/appPhotosManager";
|
||||||
import { RichTextProcessor } from "../../lib/richtextprocessor";
|
import { RichTextProcessor } from "../../lib/richtextprocessor";
|
||||||
import DivAndCaption from "../divAndCaption";
|
import DivAndCaption from "../divAndCaption";
|
||||||
import { wrapPhoto, wrapSticker } from "../wrappers";
|
import { wrapPhoto, wrapSticker } from "../wrappers";
|
||||||
@ -80,6 +81,7 @@ export function wrapReplyDivAndCaption(options: {
|
|||||||
container: mediaEl,
|
container: mediaEl,
|
||||||
boxWidth: MEDIA_SIZE,
|
boxWidth: MEDIA_SIZE,
|
||||||
boxHeight: MEDIA_SIZE,
|
boxHeight: MEDIA_SIZE,
|
||||||
|
size: appPhotosManager.choosePhotoSize(photo, MEDIA_SIZE, MEDIA_SIZE),
|
||||||
middleware,
|
middleware,
|
||||||
lazyLoadQueue,
|
lazyLoadQueue,
|
||||||
noBlur: true,
|
noBlur: true,
|
||||||
|
@ -2574,8 +2574,8 @@ export class AppMessagesManager {
|
|||||||
addPart(undefined, plain ? prefix + media.game.title : RichTextProcessor.wrapEmojiText(prefix + media.game.title));
|
addPart(undefined, plain ? prefix + media.game.title : RichTextProcessor.wrapEmojiText(prefix + media.game.title));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'messageMediaDocument':
|
case 'messageMediaDocument': {
|
||||||
let document = media.document;
|
const document = media.document;
|
||||||
|
|
||||||
if(document.type === 'video') {
|
if(document.type === 'video') {
|
||||||
addPart('AttachVideo', undefined, message.message);
|
addPart('AttachVideo', undefined, message.message);
|
||||||
@ -2586,13 +2586,15 @@ export class AppMessagesManager {
|
|||||||
} else if(document.type === 'round') {
|
} else if(document.type === 'round') {
|
||||||
addPart('AttachRound', undefined, message.message);
|
addPart('AttachRound', undefined, message.message);
|
||||||
} else if(document.type === 'sticker') {
|
} else if(document.type === 'sticker') {
|
||||||
addPart(undefined, ((plain ? document.stickerEmojiRaw : document.stickerEmoji) || '') + 'Sticker');
|
addPart(undefined, ((plain ? document.stickerEmojiRaw : document.stickerEmoji) || ''));
|
||||||
|
addPart('AttachSticker');
|
||||||
text = '';
|
text = '';
|
||||||
} else {
|
} else {
|
||||||
addPart(undefined, plain ? document.file_name : RichTextProcessor.wrapEmojiText(document.file_name), message.message);
|
addPart(undefined, plain ? document.file_name : RichTextProcessor.wrapEmojiText(document.file_name), message.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
//messageText += media._;
|
//messageText += media._;
|
||||||
|
@ -418,8 +418,8 @@ export {i18n_};
|
|||||||
const _i18n = I18n._i18n;
|
const _i18n = I18n._i18n;
|
||||||
export {_i18n};
|
export {_i18n};
|
||||||
|
|
||||||
export function join(elements: HTMLElement[], useLast = true) {
|
export function join(elements: (Node | string)[], useLast = true) {
|
||||||
const arr: HTMLElement[] = elements.slice(0, 1);
|
const arr = elements.slice(0, 1);
|
||||||
for(let i = 1; i < elements.length; ++i) {
|
for(let i = 1; i < elements.length; ++i) {
|
||||||
const isLast = (elements.length - 1) === i;
|
const isLast = (elements.length - 1) === i;
|
||||||
const delimiterKey: LangPackKey = isLast && useLast ? 'WordDelimiterLast' : 'WordDelimiter';
|
const delimiterKey: LangPackKey = isLast && useLast ? 'WordDelimiterLast' : 'WordDelimiter';
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$btn-send-margin: .5rem;
|
$btn-send-margin: .5rem;
|
||||||
$chat-helper-size: 39px;
|
$chat-helper-size: 36px;
|
||||||
|
|
||||||
/* #bubble-contextmenu > div {
|
/* #bubble-contextmenu > div {
|
||||||
padding: 0 5.25 0 1rem;
|
padding: 0 5.25 0 1rem;
|
||||||
@ -136,7 +136,7 @@ $chat-helper-size: 39px;
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-height: 30rem) {
|
@media only screen and (max-height: 30rem) {
|
||||||
max-height: unquote('max(39px, calc(100vh - 10rem))');
|
max-height: unquote('max(36px, calc(100vh - 10rem))');
|
||||||
}
|
}
|
||||||
|
|
||||||
@include respond-to(handhelds) {
|
@include respond-to(handhelds) {
|
||||||
@ -861,9 +861,9 @@ $chat-helper-size: 39px;
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
// z-index: 2;
|
||||||
background-color: inherit;
|
background-color: inherit;
|
||||||
border-radius: 12px;
|
border-radius: .75rem;
|
||||||
padding: var(--padding);
|
padding: var(--padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -879,16 +879,22 @@ $chat-helper-size: 39px;
|
|||||||
height: 0;
|
height: 0;
|
||||||
width: calc(100% - var(--padding-horizontal) * 2);
|
width: calc(100% - var(--padding-horizontal) * 2);
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-top: .3125rem;//var(--padding-vertical);
|
margin-top: .5625rem;//var(--padding-vertical);
|
||||||
margin-bottom: -.3125rem;
|
margin-bottom: -.5625rem;
|
||||||
transition: height var(--layer-transition);
|
|
||||||
//height: calc(#{$chat-helper-size} + .3125rem);
|
//height: calc(#{$chat-helper-size} + .3125rem);
|
||||||
align-items: flex-start;
|
align-items: center;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
|
||||||
@include animation-level(0) {
|
@include animation-level(2) {
|
||||||
transition: none;
|
transition: height var(--layer-transition), opacity var(--layer-transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
@include respond-to(esg-bottom-new) {
|
||||||
|
margin-top: .3125rem;
|
||||||
|
margin-bottom: -.3125rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @include respond-to(handhelds) {
|
/* @include respond-to(handhelds) {
|
||||||
@ -902,7 +908,9 @@ $chat-helper-size: 39px;
|
|||||||
} */
|
} */
|
||||||
|
|
||||||
.chat.is-helper-active & {
|
.chat.is-helper-active & {
|
||||||
height: 39px;
|
pointer-events: unset;
|
||||||
|
height: #{$chat-helper-size};
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* &.active {
|
/* &.active {
|
||||||
@ -911,15 +919,20 @@ $chat-helper-size: 39px;
|
|||||||
|
|
||||||
.reply {
|
.reply {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-left: .5rem;
|
margin: 0 .625rem;
|
||||||
min-height: 35px;
|
// min-height: 35px;
|
||||||
|
|
||||||
|
&-title {
|
||||||
|
margin-top: -1px;
|
||||||
|
margin-bottom: 1px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
span.emoji {
|
/* span.emoji {
|
||||||
font-size: .8rem;
|
font-size: .8rem;
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
.new-message-wrapper {
|
.new-message-wrapper {
|
||||||
//padding: 4.5px 0;
|
//padding: 4.5px 0;
|
||||||
//padding-bottom: 4.5px;
|
//padding-bottom: 4.5px;
|
||||||
|
@ -128,7 +128,7 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-right: 1rem;
|
margin-right: 1rem;
|
||||||
max-height: 35px;
|
// max-height: 35px;
|
||||||
position: relative;
|
position: relative;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
/* padding: .25rem; */
|
/* padding: .25rem; */
|
||||||
@ -145,9 +145,6 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-left: .5rem;
|
margin-left: .5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +166,7 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: .125rem;
|
||||||
|
|
||||||
&.is-round {
|
&.is-round {
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
@ -224,13 +221,17 @@
|
|||||||
background: var(--primary-color);
|
background: var(--primary-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
&-content {
|
/* &-content {
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
}
|
} */
|
||||||
|
|
||||||
&-media {
|
&-media {
|
||||||
border-radius: .25rem;
|
border-radius: .25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-cancel {
|
||||||
|
margin-bottom: 0 !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pinned-container {
|
.pinned-container {
|
||||||
@ -299,7 +300,7 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: .25rem;
|
padding: .25rem;
|
||||||
border-radius: 4px;
|
border-radius: .25rem;
|
||||||
|
|
||||||
/* html.no-touch &:hover {
|
/* html.no-touch &:hover {
|
||||||
background-color: var(--light-secondary-text-color);
|
background-color: var(--light-secondary-text-color);
|
||||||
|
1
tweb-design
Submodule
1
tweb-design
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit d7664548de0373baa27e006bbe1f62467f566277
|
Loading…
Reference in New Issue
Block a user