mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-24 08:00:05 -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();
|
||||
});
|
||||
|
||||
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', () => {
|
||||
|
@ -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'
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user