mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
Removed accept button icon + larger buttons (#1970)
* Removed accept button icon + larger buttons * Removed default image logic in call notifications * UT fix
This commit is contained in:
parent
3189c54310
commit
bca688167a
@ -119,16 +119,16 @@ describe('Call toast notification component', () => {
|
|||||||
expect(imClass.exists()).toBeTruthy();
|
expect(imClass.exists()).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render Symphony logo if Symphony default image provided', () => {
|
it('should render profile picture if Symphony default image provided', () => {
|
||||||
const icon = './default.png';
|
const icon = './default.png';
|
||||||
ipcRenderer.send(IPC_RENDERER_NOTIFICATION_DATA_CHANNEL, {
|
ipcRenderer.send(IPC_RENDERER_NOTIFICATION_DATA_CHANNEL, {
|
||||||
...defaultProps,
|
...defaultProps,
|
||||||
icon,
|
icon,
|
||||||
});
|
});
|
||||||
const defaultLogoContainer = wrapper.find('.default-logo');
|
const defaultLogoContainer = wrapper.find('.default-logo');
|
||||||
expect(defaultLogoContainer).toBeTruthy();
|
expect(defaultLogoContainer.exists()).toBeFalsy();
|
||||||
const imageContainer = wrapper.find('.profile-picture');
|
const imageContainer = wrapper.find('.profile-picture');
|
||||||
expect(imageContainer.exists()).toBeFalsy();
|
expect(imageContainer).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should flash in a custom way when theme is set', () => {
|
it('should flash in a custom way when theme is set', () => {
|
||||||
|
@ -99,7 +99,6 @@ export default class CallNotification extends React.Component<
|
|||||||
company,
|
company,
|
||||||
companyIconUrl,
|
companyIconUrl,
|
||||||
color,
|
color,
|
||||||
actionIconUrl,
|
|
||||||
profilePlaceHolderText,
|
profilePlaceHolderText,
|
||||||
callType,
|
callType,
|
||||||
acceptButtonText,
|
acceptButtonText,
|
||||||
@ -226,22 +225,6 @@ export default class CallNotification extends React.Component<
|
|||||||
})}
|
})}
|
||||||
onClick={this.eventHandlers.onAccept(id)}
|
onClick={this.eventHandlers.onAccept(id)}
|
||||||
>
|
>
|
||||||
{actionIconUrl ? (
|
|
||||||
<img
|
|
||||||
onError={(event) => {
|
|
||||||
(event.target as any).src =
|
|
||||||
'../renderer/assets/call-icon.svg';
|
|
||||||
}}
|
|
||||||
className={'action-icon'}
|
|
||||||
src={actionIconUrl}
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<img
|
|
||||||
src='../renderer/assets/call-icon.svg'
|
|
||||||
alt='join call icon'
|
|
||||||
className='profile-picture-badge'
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<div className='label'>{acceptText}</div>
|
<div className='label'>{acceptText}</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -304,15 +287,14 @@ export default class CallNotification extends React.Component<
|
|||||||
let imgClass = 'default-logo';
|
let imgClass = 'default-logo';
|
||||||
let url = '../renderer/assets/notification-symphony-logo.svg';
|
let url = '../renderer/assets/notification-symphony-logo.svg';
|
||||||
let alt = 'Symphony logo';
|
let alt = 'Symphony logo';
|
||||||
const isDefaultUrl = imageUrl && imageUrl.includes('default.png');
|
|
||||||
|
|
||||||
if (imageUrl && !isDefaultUrl) {
|
if (imageUrl) {
|
||||||
imgClass = 'profile-picture';
|
imgClass = 'profile-picture';
|
||||||
url = imageUrl;
|
url = imageUrl;
|
||||||
alt = 'Profile picture';
|
alt = 'Profile picture';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!imageUrl || isDefaultUrl) {
|
if (!imageUrl) {
|
||||||
const profilePlaceHolderClassName =
|
const profilePlaceHolderClassName =
|
||||||
callType === 'IM'
|
callType === 'IM'
|
||||||
? 'profilePlaceHolderContainer'
|
? 'profilePlaceHolderContainer'
|
||||||
|
@ -229,26 +229,29 @@ text {
|
|||||||
|
|
||||||
.actions {
|
.actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
flex-flow: row;
|
||||||
align-items: flex-start;
|
width: 100%;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
align-self: stretch;
|
|
||||||
|
|
||||||
button {
|
button {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-grow: 1;
|
||||||
|
flex-basis: calc(100% / 2);
|
||||||
|
padding: 4px 8px;
|
||||||
padding: 4px 12px;
|
padding: 4px 12px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: var(--button-width);
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
border-style: none;
|
border-style: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
color: @red-05;
|
color: @red-05;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 12px;
|
font-size: 11px;
|
||||||
font-family: @font-family;
|
font-family: @font-family;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
Loading…
Reference in New Issue
Block a user