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:
Salah Benmoussati 2023-10-06 10:14:23 +02:00 committed by GitHub
parent 3189c54310
commit bca688167a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 29 deletions

View File

@ -119,16 +119,16 @@ describe('Call toast notification component', () => {
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';
ipcRenderer.send(IPC_RENDERER_NOTIFICATION_DATA_CHANNEL, {
...defaultProps,
icon,
});
const defaultLogoContainer = wrapper.find('.default-logo');
expect(defaultLogoContainer).toBeTruthy();
expect(defaultLogoContainer.exists()).toBeFalsy();
const imageContainer = wrapper.find('.profile-picture');
expect(imageContainer.exists()).toBeFalsy();
expect(imageContainer).toBeTruthy();
});
it('should flash in a custom way when theme is set', () => {

View File

@ -99,7 +99,6 @@ export default class CallNotification extends React.Component<
company,
companyIconUrl,
color,
actionIconUrl,
profilePlaceHolderText,
callType,
acceptButtonText,
@ -226,22 +225,6 @@ export default class CallNotification extends React.Component<
})}
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>
</button>
</div>
@ -304,15 +287,14 @@ export default class CallNotification extends React.Component<
let imgClass = 'default-logo';
let url = '../renderer/assets/notification-symphony-logo.svg';
let alt = 'Symphony logo';
const isDefaultUrl = imageUrl && imageUrl.includes('default.png');
if (imageUrl && !isDefaultUrl) {
if (imageUrl) {
imgClass = 'profile-picture';
url = imageUrl;
alt = 'Profile picture';
}
if (!imageUrl || isDefaultUrl) {
if (!imageUrl) {
const profilePlaceHolderClassName =
callType === 'IM'
? 'profilePlaceHolderContainer'

View File

@ -229,26 +229,29 @@ text {
.actions {
display: flex;
justify-content: center;
align-items: flex-start;
flex-flow: row;
width: 100%;
gap: 16px;
align-self: stretch;
button {
display: flex;
flex-grow: 1;
flex-basis: calc(100% / 2);
padding: 4px 8px;
padding: 4px 12px;
justify-content: center;
width: var(--button-width);
align-items: center;
gap: 8px;
border-radius: 16px;
border-style: none;
cursor: pointer;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
.label {
color: @red-05;
text-align: center;
font-size: 12px;
font-size: 11px;
font-family: @font-family;
font-style: normal;
font-weight: 600;