mirror of
https://github.com/danog/telegram-tt.git
synced 2025-01-22 05:11:55 +01:00
Revert "Profile: Parallax scrolling (#1427)"
This reverts commit f3b474056ce868e04e1b8dfc730272bab315c4d2.
This commit is contained in:
parent
8c6fc3514d
commit
e88f19f6ac
@ -1,12 +1,6 @@
|
||||
.ProfileInfo {
|
||||
aspect-ratio: 1 / 1;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
body.is-safari #Main & {
|
||||
transform: translateZ(-1px) scale(2);
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
|
||||
@supports not (aspect-ratio: 1 / 1) {
|
||||
&::before {
|
||||
@ -29,11 +23,6 @@
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
|
||||
body:not(.is-firefox):not(.is-safari) & {
|
||||
transform: translateZ(-1px) scale(2);
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
|
||||
> .Transition {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
@ -99,7 +99,6 @@
|
||||
margin: 0 -.5rem .625rem;
|
||||
box-shadow: inset 0 -.0625rem 0 0 var(--color-background-secondary-accent);
|
||||
border-bottom: .625rem solid var(--color-background-secondary);
|
||||
background-color: var(--color-background);
|
||||
|
||||
.ListItem.narrow {
|
||||
margin-bottom: .25rem;
|
||||
|
@ -47,7 +47,7 @@ const SettingsMain: FC<OwnProps & StateProps & DispatchProps> = ({
|
||||
useHistoryBack(isActive, onReset, onScreenSelect, SettingsScreens.Main);
|
||||
|
||||
return (
|
||||
<div className="settings-content custom-scroll parallax-scroll">
|
||||
<div className="settings-content custom-scroll">
|
||||
<div className="settings-main-menu">
|
||||
{currentUser && (
|
||||
<ProfileInfo
|
||||
|
@ -53,11 +53,6 @@ export function animateOpening(
|
||||
fromHeight = uncovered.height;
|
||||
}
|
||||
|
||||
if (origin === MediaViewerOrigin.ProfileAvatar || origin === MediaViewerOrigin.SettingsAvatar) {
|
||||
fromWidth = fromImage.offsetWidth;
|
||||
fromHeight = fromImage.offsetHeight;
|
||||
}
|
||||
|
||||
const fromTranslateX = (fromLeft + fromWidth / 2) - (toLeft + toWidth / 2);
|
||||
const fromTranslateY = (fromTop + fromHeight / 2) - (toTop + toHeight / 2);
|
||||
const fromScaleX = fromWidth / toWidth;
|
||||
@ -110,8 +105,9 @@ export function animateClosing(origin: MediaViewerOrigin, bestImageData: string,
|
||||
const {
|
||||
top: fromTop, left: fromLeft, width: fromWidth, height: fromHeight,
|
||||
} = fromImage.getBoundingClientRect();
|
||||
const { top: targetTop, left: toLeft } = toImage.getBoundingClientRect();
|
||||
const { offsetWidth: toWidth, offsetHeight: toHeight } = toImage;
|
||||
const {
|
||||
top: targetTop, left: toLeft, width: toWidth, height: toHeight,
|
||||
} = toImage.getBoundingClientRect();
|
||||
|
||||
let toTop = targetTop;
|
||||
if (!isElementInViewport(container)) {
|
||||
|
@ -21,7 +21,6 @@
|
||||
padding: .875rem .5rem .5rem;
|
||||
box-shadow: inset 0 -.0625rem 0 0 var(--color-background-secondary-accent);
|
||||
border-bottom: .625rem solid var(--color-background-secondary);
|
||||
background-color: var(--color-background);
|
||||
|
||||
.narrow {
|
||||
margin-bottom: 0;
|
||||
@ -51,7 +50,6 @@
|
||||
.shared-media {
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
background-color: var(--color-background);
|
||||
|
||||
.TabList {
|
||||
background: var(--color-background);
|
||||
|
@ -375,7 +375,7 @@ const Profile: FC<OwnProps & StateProps & DispatchProps> = ({
|
||||
return (
|
||||
<InfiniteScroll
|
||||
ref={containerRef}
|
||||
className="Profile custom-scroll parallax-scroll"
|
||||
className="Profile custom-scroll"
|
||||
itemSelector={buildInfiniteScrollItemSelector(resultType)}
|
||||
items={canRenderContents ? viewportIds : undefined}
|
||||
cacheBuster={cacheBuster}
|
||||
|
@ -2,7 +2,7 @@ import { addReducer, getGlobal, setGlobal } from '../../../lib/teact/teactn';
|
||||
|
||||
import { ANIMATION_LEVEL_MAX } from '../../../config';
|
||||
import {
|
||||
IS_ANDROID, IS_FIREFOX, IS_IOS, IS_MAC_OS, IS_SAFARI, IS_TOUCH_ENV,
|
||||
IS_ANDROID, IS_IOS, IS_MAC_OS, IS_TOUCH_ENV,
|
||||
} from '../../../util/environment';
|
||||
import { setLanguage } from '../../../util/langProvider';
|
||||
import switchTheme from '../../../util/switchTheme';
|
||||
@ -38,11 +38,6 @@ addReducer('init', (global) => {
|
||||
} else if (IS_MAC_OS) {
|
||||
document.body.classList.add('is-macos');
|
||||
}
|
||||
if (IS_FIREFOX) {
|
||||
document.body.classList.add('is-firefox');
|
||||
} else if (IS_SAFARI) {
|
||||
document.body.classList.add('is-safari');
|
||||
}
|
||||
});
|
||||
|
||||
addReducer('setIsUiReady', (global, actions, payload) => {
|
||||
|
@ -147,12 +147,6 @@ body:not(.is-ios) {
|
||||
}
|
||||
}
|
||||
|
||||
body:not(.is-firefox) .parallax-scroll {
|
||||
perspective: 1px;
|
||||
perspective-origin: left top;
|
||||
transform: translateZ(0px);
|
||||
}
|
||||
|
||||
.emoji-small {
|
||||
background: no-repeat;
|
||||
background-size: 1.25rem;
|
||||
|
@ -39,7 +39,6 @@ export const IS_MAC_OS = PLATFORM_ENV === 'macOS';
|
||||
export const IS_IOS = PLATFORM_ENV === 'iOS';
|
||||
export const IS_ANDROID = PLATFORM_ENV === 'Android';
|
||||
export const IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
||||
export const IS_FIREFOX = /firefox|iceweasel/i.test(navigator.userAgent);
|
||||
export const IS_PWA = window.matchMedia('(display-mode: standalone)').matches
|
||||
|| (window.navigator as any).standalone
|
||||
|| document.referrer.includes('android-app://');
|
||||
|
Loading…
x
Reference in New Issue
Block a user