diff --git a/ui/src/app/pages/apps-routes/app-installed-list/app-installed-list.page.html b/ui/src/app/pages/apps-routes/app-installed-list/app-installed-list.page.html index 5f1af7edc..9f416d406 100644 --- a/ui/src/app/pages/apps-routes/app-installed-list/app-installed-list.page.html +++ b/ui/src/app/pages/apps-routes/app-installed-list/app-installed-list.page.html @@ -24,9 +24,9 @@ diff --git a/ui/src/app/pages/apps-routes/app-installed-list/app-installed-list.page.ts b/ui/src/app/pages/apps-routes/app-installed-list/app-installed-list.page.ts index 4ac2cd3c0..9b858098e 100644 --- a/ui/src/app/pages/apps-routes/app-installed-list/app-installed-list.page.ts +++ b/ui/src/app/pages/apps-routes/app-installed-list/app-installed-list.page.ts @@ -100,7 +100,7 @@ export class AppInstalledListPage extends Cleanup { } async launchUiTab (address: string) { - console.log('launching', address) + address = address.startsWith('http') ? address : `http://${address}` return window.open(address, '_blank') } diff --git a/ui/src/app/pages/apps-routes/app-installed-show/app-installed-show.page.html b/ui/src/app/pages/apps-routes/app-installed-show/app-installed-show.page.html index 927ee27ab..d230369ba 100644 --- a/ui/src/app/pages/apps-routes/app-installed-show/app-installed-show.page.html +++ b/ui/src/app/pages/apps-routes/app-installed-show/app-installed-show.page.html @@ -77,13 +77,13 @@ - + - + - + LAUNCH diff --git a/ui/src/app/pages/apps-routes/app-installed-show/app-installed-show.page.ts b/ui/src/app/pages/apps-routes/app-installed-show/app-installed-show.page.ts index 2c62c917e..8b3341ca4 100644 --- a/ui/src/app/pages/apps-routes/app-installed-show/app-installed-show.page.ts +++ b/ui/src/app/pages/apps-routes/app-installed-show/app-installed-show.page.ts @@ -38,8 +38,9 @@ export class AppInstalledShowPage extends Cleanup { isTor: boolean dependencyDefintion = () => `Dependencies are other services which must be installed, configured appropriately, and started in order to start ${this.app.title.getValue()}` - launchDefinition = () => `Launch A Service

This button appears only for services that can be accessed inside the browser. If a service does not have this button, you must access it using another interface, such as a mobile app, desktop app, or another service on the Embassy. Please view the instructions for a service for details on how to use it.

` - launchOffDefinition = () => `Launch A Service

This button appears only for services that can be accessed inside the browser. Get your service running in order to launch!

` + launchDefinition = `Launch A Service

This button appears only for services that can be accessed inside the browser. If a service does not have this button, you must access it using another interface, such as a mobile app, desktop app, or another service on the Embassy. Please view the instructions for a service for details on how to use it.

` + launchOffDefinition = `Launch A Service

This button appears only for services that can be accessed inside the browser. Get your service running in order to launch!

` + launchLocalDefinition = `Launch A Service

This button appears only for services that can be accessed inside the browser. Visit your Embassy at its Tor address to launch this service!

` @ViewChild(IonContent) content: IonContent @@ -102,8 +103,8 @@ export class AppInstalledShowPage extends Cleanup { } async launchUiTab () { - const uiAddress = this.app.torAddress.getValue() - console.log('launching', uiAddress) + let uiAddress = this.app.torAddress.getValue() + uiAddress = uiAddress.startsWith('http') ? uiAddress : `http://${uiAddress}` return window.open(uiAddress, '_blank') } @@ -273,6 +274,18 @@ export class AppInstalledShowPage extends Cleanup { return this.navCtrl.navigateRoot('/services/installed') } + async presentLaunchPopover (status: AppStatus, ev: any) { + let desc: string + if (!this.isTor) { + desc = this.launchLocalDefinition + } else if (status !== AppStatus.RUNNING) { + desc = this.launchOffDefinition + } else { + desc = this.launchDefinition + } + return this.presentPopover(desc, ev) + } + async presentPopover (information: string, ev: any) { const popover = await this.popoverController.create({ component: InformationPopoverComponent,