Skip to content

Commit

Permalink
Merge pull request #81 from docker/feature/use-open-external
Browse files Browse the repository at this point in the history
Update Tailscale sample with `openExternal` API method
  • Loading branch information
gtardif authored Feb 3, 2022
2 parents b8296a6 + 7dfe12b commit d8e6a7f
Showing 5 changed files with 29 additions and 44 deletions.
2 changes: 0 additions & 2 deletions tailscale/Dockerfile
Original file line number Diff line number Diff line change
@@ -44,7 +44,5 @@ COPY wait-for-exit.sh /app/wait-for-exit.sh
COPY vm/docker-compose.yaml .
COPY host/hostname darwin/hostname
COPY host/hostname.cmd windows/hostname.cmd
COPY host/tsbrowser darwin/tsbrowser
COPY host/tsbrowser.cmd windows/tsbrowser.cmd
ENV TS_HOST_ENV dde
CMD /app/tailscaled --state=/var/lib/tailscale/tailscaled.state --tun=userspace-networking
4 changes: 1 addition & 3 deletions tailscale/client/src/App.tsx
Original file line number Diff line number Diff line change
@@ -158,9 +158,7 @@ export function App() {

// start a browser in the host
function doOpenBrowser(url: string) {
window.ddClient
.execHostCmd(`tsbrowser ${url}`)
.then(() => setStatus(undefined));
window.ddClient.openExternal(`${url}`).then(() => setStatus(undefined));
}

function PrintTableHeaders() {
2 changes: 0 additions & 2 deletions tailscale/host/tsbrowser

This file was deleted.

2 changes: 0 additions & 2 deletions tailscale/host/tsbrowser.cmd

This file was deleted.

63 changes: 28 additions & 35 deletions tailscale/metadata.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,31 @@
{
"name":"tailscale",
"provider": "Tailscale Inc.",
"icon":"tailscale.svg",
"vm": {
"composefile":"docker-compose.yaml"
},
"ui":{
"dashboard-tab":
{
"title":"Tailscale",
"root":"/ui",
"src":"index.html"
}
},
"host": {
"binaries": [
{
"darwin": [
{
"path": "/darwin/hostname"
},
{
"path": "/darwin/tsbrowser"
}
],
"windows": [
{
"path": "/windows/hostname.cmd"
},
{
"path": "/windows/tsbrowser.cmd"
}
]
}
]
"name": "tailscale",
"provider": "Tailscale Inc.",
"icon": "tailscale.svg",
"vm": {
"composefile": "docker-compose.yaml"
},
"ui": {
"dashboard-tab": {
"title": "Tailscale",
"root": "/ui",
"src": "index.html"
}
},
"host": {
"binaries": [
{
"darwin": [
{
"path": "/darwin/hostname"
}
],
"windows": [
{
"path": "/windows/hostname.cmd"
}
]
}
]
}
}

0 comments on commit d8e6a7f

Please sign in to comment.