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