Adding a button to open a POIsearch in a browser
This commit is contained in:
parent
2fae581449
commit
ee000862f8
|
@ -15,6 +15,7 @@
|
|||
"@awesome-cordova-plugins/web-intent": "^6.3.0",
|
||||
"@capacitor-community/background-geolocation": "^1.2.7",
|
||||
"@capacitor/android": "^4.6.1",
|
||||
"@capacitor/browser": "^4.1.0",
|
||||
"@capacitor/core": "^4.6.1",
|
||||
"@capacitor/ios": "^4.6.1",
|
||||
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
|
||||
|
@ -627,6 +628,14 @@
|
|||
"@capacitor/core": "^4.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@capacitor/browser": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@capacitor/browser/-/browser-4.1.0.tgz",
|
||||
"integrity": "sha512-WKAZDc9ECYQesEXlVhJu5/qbqkL5rj15wg9yBqSC0RXYsOU7aDiTMjXIu+Vu68jA8IQqIuNIp8slDvDQa+U/Kw==",
|
||||
"peerDependencies": {
|
||||
"@capacitor/core": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@capacitor/cli": {
|
||||
"version": "4.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-4.6.1.tgz",
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
"@awesome-cordova-plugins/web-intent": "^6.3.0",
|
||||
"@capacitor-community/background-geolocation": "^1.2.7",
|
||||
"@capacitor/android": "^4.6.1",
|
||||
"@capacitor/browser": "^4.1.0",
|
||||
"@capacitor/core": "^4.6.1",
|
||||
"@capacitor/ios": "^4.6.1",
|
||||
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
|
||||
|
|
|
@ -11,6 +11,7 @@ import styled from '@suid/material/styles/styled';
|
|||
import Dialog from '../dialog';
|
||||
import Tree from '../tree';
|
||||
import { GpxViewer } from '../gpx';
|
||||
import { Browser } from '@capacitor/browser';
|
||||
|
||||
const Item = styled(Paper)(({ theme }) => ({
|
||||
...theme.typography.body2,
|
||||
|
@ -170,7 +171,16 @@ const Infos: Component<{}> = (props) => {
|
|||
${feature.get('name') || ''}`}
|
||||
</div>
|
||||
<div>
|
||||
<IconButton>
|
||||
<IconButton
|
||||
onClick={async () => {
|
||||
await Browser.open({
|
||||
url: `https://www.qwant.com/?q=${encodeURIComponent(`${feature.get(
|
||||
'class'
|
||||
)}
|
||||
${feature.get('name') || ''}`)}&t=web`,
|
||||
});
|
||||
}}
|
||||
>
|
||||
<TravelExploreIcon />
|
||||
</IconButton>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue