Skip to content

Commit 17a3eca

Browse files
tonyco97edospadoni
andauthored
fix: missing call without dev mode (#66)
Co-authored-by: Edoardo Spadoni <[email protected]>
1 parent 7cf33b9 commit 17a3eca

File tree

5 files changed

+29
-31
lines changed

5 files changed

+29
-31
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
it: {
4949
description:
5050
"Scarica l'aggiornamento NethLink con correzioni di bug e nuove funzionalità per le impostazioni e lo stato.",
51-
release: 'Rilascio: ',
51+
release: 'Release: ',
5252
downloadUpdate: "Scarica l'aggiornamento",
5353
chooseOS:
5454
'Scegli il tuo sistema operativo e clicca per avviare il download',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
1818
"typecheck": "npm run typecheck:node && npm run typecheck:web",
1919
"start": "electron-vite preview",
20-
"dev": "DEV=true electron-vite dev",
20+
"dev": "electron-vite dev",
2121
"pack": "electron-builder --dir",
2222
"dist": "electron-builder",
2323
"preversion": "git add . ",

src/renderer/src/components/Modules/NethVoice/About/AboutModule.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ export function AboutModule({ }: AboutBoxProps) {
1717
const [theme] = useSharedState('theme')
1818
const [notifications] = useSharedState('notifications')
1919

20+
// Donwload NethLink release page
21+
const releasePage = 'https://nethserver.github.io/nethlink/'
22+
2023
const onDownloadButtonClick = () => {
21-
window.api.openExternalPage(notifications!.system.update.message)
24+
window.api.openExternalPage(releasePage)
2225
}
2326

2427
const openNethesisPage = () => {

src/renderer/src/components/Modules/NethVoice/SearchResults/SearchNumberDetail.tsx

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -134,22 +134,24 @@ const ContactDetail = ({ children, label, icon, copy, protocol }: { label: strin
134134
{label}
135135
</div>
136136
<div className='relative flex flex-row truncate max-w-[calc(100%-170px)] gap-2'>
137-
<span className={classNames('truncate', protocol && children
138-
? linkClassName
139-
: '',
140-
protocol === 'callto'
141-
? isCallsEnabled
142-
? ''
143-
: 'cursor-not-allowed'
144-
: ''
145-
)}
146-
onClick={protocol ? runProtocol : undefined}
147-
data-tooltip-id={`tooltip-data-${label}`}
148-
data-tooltip-content={children}
149-
data-tooltip-place={'bottom'}
137+
<a
138+
href={`callto://${('' + children).replace(/ /g, '')}`}
139+
className={classNames('truncate', protocol && children
140+
? linkClassName
141+
: '',
142+
protocol === 'callto'
143+
? isCallsEnabled
144+
? ''
145+
: 'cursor-not-allowed'
146+
: ''
147+
)}
150148
>
151-
{children || '-'}
152-
</span>
149+
<div
150+
className={`'dark:text-titleDark text-titleLight font-normal`}
151+
>
152+
{children}
153+
</div>
154+
</a>
153155

154156
{children && copy && <div className='relative'>
155157
<FontAwesomeIcon
Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { ClassNames } from '@renderer/utils'
22
import { ReactNode } from 'react'
3-
43
type NumberCallerProps = {
54
number: number | string
65
children: JSX.Element | JSX.Element[] | ReactNode | ReactNode[]
@@ -16,26 +15,20 @@ export const NumberCaller = ({
1615
isNumberHiglighted = true,
1716
...args
1817
}: NumberCallerProps) => {
19-
const onClick = () => {
20-
const url = `callto://${('' + number).replace(/ /g, '')}`
21-
window.api.openExternalPage(url);
22-
}
2318

2419
return disabled ? (
2520
<div className={ClassNames(className, 'cursor-not-allowed',)}>{children}</div>
2621
) : (
27-
<div
28-
className={ClassNames(className,
29-
'dark:text-textBlueDark text-textBlueLight',
30-
'cursor-pointer dark:focus:outline-none dark:focus:ring-2 focus:outline-none focus:ring-2 dark:ring-offset-1 ring-offset-1 dark:ring-offset-slate-900 ring-offset-slate-50 focus:ring-primaryRing dark:focus:ring-primaryRingDark rounded-md')}
22+
<a
23+
href={`callto://${('' + number).replace(/ /g, '')}`}
24+
className={ClassNames(className, 'dark:focus:outline-none dark:focus:ring-2 focus:outline-none focus:ring-2 dark:ring-offset-1 ring-offset-1 dark:ring-offset-slate-900 ring-offset-slate-50 focus:ring-primaryRing dark:focus:ring-primaryRingDark rounded-md')}
3125
{...args}
32-
onClick={onClick}
3326
>
3427
<div
35-
className={`${isNumberHiglighted ? 'dark:text-textBlueDark text-textBlueLight' : ''} font-normal`}
28+
className={`${isNumberHiglighted ? 'dark:text-titleDark text-titleLight' : ''} font-normal`}
3629
>
3730
{children}
3831
</div>
39-
</div>
32+
</a>
4033
)
41-
}
34+
}

0 commit comments

Comments
 (0)