Zoom-in gifts on hover
This commit is contained in:
parent
e77c6c40f8
commit
4487370790
@ -147,7 +147,7 @@ const SavedGift = ({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={buildClassName(styles.root, 'scroll-item')}
|
className={buildClassName('interactive-gift scroll-item', styles.root)}
|
||||||
style={style}
|
style={style}
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
onContextMenu={handleContextMenu}
|
onContextMenu={handleContextMenu}
|
||||||
|
|||||||
@ -31,9 +31,6 @@
|
|||||||
|
|
||||||
.stickerWrapper {
|
.stickerWrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
width: 7.5rem;
|
width: 7.5rem;
|
||||||
height: 7.5rem;
|
height: 7.5rem;
|
||||||
margin-block: 0.5rem;
|
margin-block: 0.5rem;
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { memo, useRef } from '@teact';
|
|||||||
import type { ApiStarGiftUnique } from '../../../api/types';
|
import type { ApiStarGiftUnique } from '../../../api/types';
|
||||||
|
|
||||||
import { IS_TOUCH_ENV } from '../../../util/browser/windowEnvironment.ts';
|
import { IS_TOUCH_ENV } from '../../../util/browser/windowEnvironment.ts';
|
||||||
|
import buildClassName from '../../../util/buildClassName.ts';
|
||||||
import { getGiftAttributes } from '../../common/helpers/gifts';
|
import { getGiftAttributes } from '../../common/helpers/gifts';
|
||||||
|
|
||||||
import useFlag from '../../../hooks/useFlag.ts';
|
import useFlag from '../../../hooks/useFlag.ts';
|
||||||
@ -39,7 +40,7 @@ const WebPageUniqueGift = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={styles.root}
|
className={buildClassName('interactive-gift', styles.root)}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
onMouseEnter={!IS_TOUCH_ENV ? markHover : undefined}
|
onMouseEnter={!IS_TOUCH_ENV ? markHover : undefined}
|
||||||
onMouseLeave={!IS_TOUCH_ENV ? unmarkHover : undefined}
|
onMouseLeave={!IS_TOUCH_ENV ? unmarkHover : undefined}
|
||||||
|
|||||||
@ -123,7 +123,7 @@ const StarGiftAction = ({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={buildClassName(styles.contentBox, styles.starGift)}
|
className={buildClassName('interactive-gift', styles.contentBox, styles.starGift)}
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
role="button"
|
role="button"
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
|
|||||||
@ -85,7 +85,7 @@ const StarGiftAction = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={buildClassName(styles.contentBox, styles.starGift, styles.uniqueGift)}
|
className={buildClassName('interactive-gift', styles.contentBox, styles.starGift, styles.uniqueGift)}
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
role="button"
|
role="button"
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
|
|||||||
@ -167,6 +167,7 @@ function GiftItemStar({
|
|||||||
<div
|
<div
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={buildClassName(
|
className={buildClassName(
|
||||||
|
'interactive-gift',
|
||||||
styles.container,
|
styles.container,
|
||||||
styles.starGift,
|
styles.starGift,
|
||||||
'starGiftItem',
|
'starGiftItem',
|
||||||
|
|||||||
@ -76,7 +76,7 @@ const UniqueGiftHeader = ({
|
|||||||
<div className={buildClassName(styles.root, className)}>
|
<div className={buildClassName(styles.root, className)}>
|
||||||
<Transition
|
<Transition
|
||||||
className={styles.transition}
|
className={styles.transition}
|
||||||
slideClassName={styles.transitionSlide}
|
slideClassName={buildClassName('interactive-gift', styles.transitionSlide)}
|
||||||
activeKey={activeKey}
|
activeKey={activeKey}
|
||||||
direction={1}
|
direction={1}
|
||||||
name="zoomBounceSemiFade"
|
name="zoomBounceSemiFade"
|
||||||
|
|||||||
@ -54,8 +54,10 @@ noscript {
|
|||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.nojs-video {
|
.nojs-video {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
||||||
&::-webkit-media-controls {
|
&::-webkit-media-controls {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -265,6 +267,20 @@ body:not(.is-ios) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.interactive-gift {
|
||||||
|
canvas {
|
||||||
|
transition: 250ms transform;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (hover: hover) {
|
||||||
|
&:hover, &:focus-visible {
|
||||||
|
canvas {
|
||||||
|
transform: scale(1.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.color-primary {
|
.color-primary {
|
||||||
color: var(--color-primary) !important;
|
color: var(--color-primary) !important;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user