Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fancy location icon on mobile message popups #20772

Merged
merged 5 commits into from
Nov 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions shared/chat/conversation/messages/message-popup/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import {formatTimeForPopup, formatTimeForRevoked} from '../../../../util/timesta
import {DeviceType} from '../../../../constants/types/devices'

const iconNameForDeviceType = Styles.isMobile
? (deviceType: string, isRevoked: boolean): Kb.IconType => {
? (deviceType: string, isRevoked: boolean, isLocation: Boolean): Kb.IconType => {
switch (deviceType) {
case 'mobile':
return isRevoked
? 'icon-fancy-revoked-phone-mobile-226-96'
: isLocation
? 'icon-fancy-location-phone-mobile-226-96'
: 'icon-fancy-encrypted-phone-mobile-226-96'
default:
return isRevoked
Expand All @@ -23,7 +25,7 @@ const iconNameForDeviceType = Styles.isMobile
return isRevoked
? 'icon-fancy-revoked-phone-desktop-150-72'
: isLocation
? 'icon-fancy-encrypted-location-phone-desktop-150-72'
? 'icon-fancy-location-phone-desktop-150-72'
: 'icon-fancy-encrypted-phone-desktop-150-72'
default:
return isRevoked
Expand Down
33 changes: 15 additions & 18 deletions shared/common-adapters/icon.constants-gen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1576,13 +1576,7 @@ const iconMeta_ = {
return require('../images/icons/icon-dark-fancy-encrypted-computer-mobile-226-96.png')
},
},
'icon-dark-fancy-encrypted-location-phone-desktop-150-72': {
extension: 'png',
isFont: false,
get require() {
return require('../images/icons/icon-dark-fancy-encrypted-location-phone-desktop-150-72.png')
},
},

'icon-dark-fancy-encrypted-phone-mobile-226-96': {
extension: 'png',
isFont: false,
Expand Down Expand Up @@ -3245,17 +3239,6 @@ const iconMeta_ = {
return require('../images/icons/icon-dark-fancy-encrypted-computer-mobile-226-96.png')
},
},
'icon-fancy-encrypted-location-phone-desktop-150-72': {
extension: 'png',
isFont: false,
nameDark: 'icon-dark-fancy-encrypted-location-phone-desktop-150-72',
get require() {
return require('../images/icons/icon-fancy-encrypted-location-phone-desktop-150-72.png')
},
get requireDark() {
return require('../images/icons/icon-dark-fancy-encrypted-location-phone-desktop-150-72.png')
},
},
'icon-fancy-encrypted-phone-desktop-150-72': {
extension: 'png',
isFont: false,
Expand Down Expand Up @@ -3317,6 +3300,20 @@ const iconMeta_ = {
return require('../images/icons/icon-fancy-hellobot-hi-96.png')
},
},
'icon-fancy-location-phone-desktop-150-72': {
extension: 'png',
isFont: false,
get require() {
return require('../images/icons/icon-fancy-location-phone-desktop-150-72.png')
},
},
'icon-fancy-location-phone-mobile-226-96': {
extension: 'png',
isFont: false,
get require() {
return require('../images/icons/icon-fancy-location-phone-mobile-226-96.png')
},
},
'icon-fancy-no-access-desktop-96-94': {
extension: 'png',
isFont: false,
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 35 additions & 35 deletions shared/stories/__tests__/__snapshots__/Storyshots.test.js.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.