Skip to content

Commit 147bbe1

Browse files
committed
feat: update translations,
fix hold animation
1 parent a1f65e7 commit 147bbe1

File tree

6 files changed

+30
-41
lines changed

6 files changed

+30
-41
lines changed

public/locales/en/translations.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,7 @@
797797
"Pick up": "Pick up",
798798
"Parking": "Parking",
799799
"Hold": "Hold",
800+
"No parked call": "No parked calls found",
800801
"Click and hold to take current parking in call": "Click and hold to take current parking in call"
801802
},
802803
"Devices": {

public/locales/it/translations.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,7 @@
798798
"Pick up": "Riprendi",
799799
"Parking": "Parcheggio",
800800
"Hold": "Tieni premuto",
801+
"No parked call": "Nessuna chimata parcheggiata trovata",
801802
"Click and hold to take current parking in call": "Clicca e tieni premuto per riprendere la chiamata parcheggiata"
802803
},
803804
"Devices": {

src/renderer/public/locales/en/translations.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,7 @@
797797
"Pick up": "Pick up",
798798
"Parking": "Parking",
799799
"Hold": "Hold",
800+
"No parked call": "No parked calls found",
800801
"Click and hold to take current parking in call": "Click and hold to take current parking in call"
801802
},
802803
"Devices": {

src/renderer/public/locales/it/translations.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,7 @@
798798
"Pick up": "Riprendi",
799799
"Parking": "Parcheggio",
800800
"Hold": "Tieni premuto",
801+
"No parked call": "Nessuna chimata parcheggiata trovata",
801802
"Click and hold to take current parking in call": "Clicca e tieni premuto per riprendere la chiamata parcheggiata"
802803
},
803804
"Devices": {

src/renderer/src/components/Modules/NethVoice/Parking/ParkedCall.tsx

Lines changed: 25 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,19 @@ export const ParkedCall = ({ parkingDetails, onPickup }: ParkingCallProps) => {
7777
}
7878

7979
return (
80-
<div className="relative flex flex-row justify-between items-center min-h-[44px] py-2 ">
80+
<div className="relative flex flex-row justify-between items-center min-h-[44px] py-2 mr-[-8px]">
8181
<div className="flex flex-col gap-0">
8282
<div className="flex flex-row items-center text-sm text-textYellowLight dark:text-textYellowDark gap-2">
8383
<FontAwesomeIcon size="1x" icon={ParkedCallIcon} className="text-[14px]" />
8484
<span>
8585
{t('Parks.Parking')} {parkingDetails.name}
8686
</span>
8787
</div>
88-
<span className='text-sm text-left text-gray-900 dark:text-gray-100 w-44 truncate tooltip-parked-user'>
88+
<span className='text-sm text-left text-gray-900 dark:text-gray-100 truncate tooltip-parked-user'>
8989
<div className='scrolling-text-container' ref={nameText}>
9090
{nameText?.current?.clientWidth && nameText?.current?.clientWidth > 180 ? (
9191
<>
9292
<div className='scrolling-text'>{parkingDetails?.parkedCaller?.name}</div>
93-
<div className='scrolling-text'>{parkingDetails?.parkedCaller?.name}</div>
9493
</>
9594
) : (
9695
<>
@@ -100,58 +99,44 @@ export const ParkedCall = ({ parkingDetails, onPickup }: ParkingCallProps) => {
10099
</div>
101100
</span>
102101
</div>
103-
<div>
104-
<span
105-
className={classNames(status === 'begin'
106-
? 'text-titleLight dark:text-titleDark'
107-
: status === 'middle'
108-
? 'text-amber-700 dark:text-amber-500'
109-
: 'text-red-700 dark:text-red-500',
110-
'w-12 font-mono')}
111-
>
112-
{formattedTime}
113-
</span>
114-
</div>
102+
<div className='flex-grow' />
103+
<span
104+
className={classNames(status === 'begin'
105+
? 'text-titleLight dark:text-titleDark'
106+
: status === 'middle'
107+
? 'text-amber-700 dark:text-amber-500'
108+
: 'text-red-700 dark:text-red-500',
109+
'w-10 font-mono')}
110+
>
111+
{formattedTime}
112+
</span>
115113
<div className='flex-grow' />
116114
<div
117-
className='relative w-20 mr-5'
115+
className='relative'
118116
onMouseDown={handleButtonDown}
119117
onMouseUp={handleButtonUp}
120118
onMouseLeave={handleButtonUp}
121119
>
122-
<Button variant='white' className='tooltip-parking-button'>
123-
<FontAwesomeIcon
124-
icon={CallIcon}
125-
className='h-4 w-4 text-gray-500 dark:text-gray-200 mr-2'
126-
/>
127-
<span className='w-14 overflow-hidden whitespace-nowrap'>
128-
{cardPressStates ? `${t('Parks.Hold')}` : `${t('Parks.Pick up')}`}
129-
</span>
130-
</Button>
120+
131121
<motion.div
132122
initial={{ width: 0 }}
133123
animate={
134124
cardPressStates
135125
? { width: '100%', transition: { duration: 2 } }
136126
: { width: 0 }
137127
}
138-
className='absolute top-0 left-0 w-full h-8 bg-emerald-500 rounded-md overflow-hidden'
128+
className='absolute top-[1px] left-0 w-full h-8 bg-emerald-500 rounded-md overflow-hidden'
139129
>
140-
<motion.button
141-
className='w-full h-full bg-transparent text-emerald-500 hover:text-emerald-600 rounded-md focus:outline-none'
142-
onMouseDown={handleButtonDown}
143-
onMouseUp={handleButtonUp}
144-
onMouseLeave={handleButtonUp}
145-
>
146-
<div className='flex items-center pl-2'>
147-
<FontAwesomeIcon
148-
icon={CallIcon}
149-
className='h-4 w-4 text-gray-100 dark:text-gray-200 ml-2 mr-2 '
150-
/>
151-
<span className='text-gray-100 text-base overflow-hidden whitespace-nowrap'>{t('Parks.Hold')}</span>
152-
</div>
153-
</motion.button>
154130
</motion.div>
131+
<Button variant='white' className='tooltip-parking-button min-w-28' >
132+
<FontAwesomeIcon
133+
icon={CallIcon}
134+
className='h-4 w-4 text-gray-500 dark:text-gray-200 mr-2'
135+
/>
136+
<span className='w-16 overflow-hidden text-gray-100 whitespace-nowrap'>
137+
{cardPressStates ? `${t('Parks.Hold')}` : `${t('Parks.Pick up')}`}
138+
</span>
139+
</Button>
155140
</div>
156141
</div>
157142

src/renderer/src/components/Modules/NethVoice/Parking/ParkingBox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const ParkingBox = () => {
4242
return (
4343
<>
4444
<ModuleTitle
45-
title={`${t('Parks.Title')} ${parkedCalls && parkedCalls.length > 0 ? `(${parkedCalls.length})` : ''}`}
45+
title={`${t('Parks.Parking')} ${parkedCalls && parkedCalls.length > 0 ? `(${parkedCalls.length})` : ''}`}
4646
/>
4747
<Scrollable innerClassName={'min-w-[344px]'}>
4848
{parkedCalls ? (

0 commit comments

Comments
 (0)