Skip to content

Commit

Permalink
test(suite): test new device renders
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroslavProchazka committed Jan 17, 2025
1 parent cb71804 commit 4b72d92
Show file tree
Hide file tree
Showing 30 changed files with 11 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ export const DeviceAnimation = forwardRef<HTMLVideoElement, DeviceAnimationProps

// Animations on following devices are transparent.
const themeSuffix = [
DeviceModelInternal.T1B1,
DeviceModelInternal.T2B1,
DeviceModelInternal.T2T1,
DeviceModelInternal.T3B1,
DeviceModelInternal.T3T1,
DeviceModelInternal.T3W1,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React from 'react';

import styled from 'styled-components';

import { DeviceAnimation, Image } from '@trezor/components';
import { DeviceAnimation } from '@trezor/components';
import { DeviceModelInternal } from '@trezor/connect';

export type RotateDeviceImageProps = {
Expand All @@ -13,12 +11,6 @@ export type RotateDeviceImageProps = {
animationWidth?: string;
};

// eslint-disable-next-line local-rules/no-override-ds-component
const StyledImage = styled(Image)`
/* do not apply the darkening filter in dark mode on device images */
filter: none;
`;

export const RotateDeviceImage = ({
deviceModel,
deviceColor,
Expand All @@ -30,32 +22,14 @@ export const RotateDeviceImage = ({
return null;
}

const isDeviceImageRotating =
deviceModel &&
[DeviceModelInternal.T2B1, DeviceModelInternal.T3B1, DeviceModelInternal.T3T1].includes(
deviceModel,
);

return (
<>
{isDeviceImageRotating ? (
<DeviceAnimation
className={className}
type="ROTATE"
deviceModelInternal={deviceModel}
deviceUnitColor={deviceColor}
height={animationHeight}
width={animationWidth}
/>
) : (
<StyledImage
width={animationWidth}
height={animationHeight}
alt="Trezor"
image={`TREZOR_${deviceModel}`}
className={className}
/>
)}
</>
<DeviceAnimation
className={className}
type="ROTATE"
deviceModelInternal={deviceModel}
deviceUnitColor={deviceColor}
height={animationHeight}
width={animationWidth}
/>
);
};
Binary file modified packages/suite-data/files/images/png/trezor-t1b1-large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/suite-data/files/images/png/trezor-t1b1-large@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/suite-data/files/images/png/trezor-t1b1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/suite-data/files/images/png/trezor-t1b1@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/suite-data/files/images/png/trezor-t2t1-large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/suite-data/files/images/png/trezor-t2t1-large@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/suite-data/files/images/png/trezor-t2t1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/suite-data/files/images/png/trezor-t2t1@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/suite-data/files/images/png/trezor-t3b1-large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/suite-data/files/images/png/trezor-t3b1-large@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/suite-data/files/images/png/trezor-t3b1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/suite-data/files/images/png/trezor-t3b1@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/suite-data/files/images/png/trezor-t3t1-large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/suite-data/files/images/png/trezor-t3t1-large@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/suite-data/files/images/png/trezor-t3t1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/suite-data/files/images/png/trezor-t3t1@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 4b72d92

Please sign in to comment.