mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
adds ui tag and launch button in AIS
This commit is contained in:
committed by
Aiden McClelland
parent
5b248013e5
commit
66c08c730b
@@ -34,6 +34,7 @@ export interface AppAvailableVersionSpecificInfo {
|
||||
export interface AppInstalledPreview extends BaseApp {
|
||||
torAddress: string
|
||||
versionInstalled: string
|
||||
ui: boolean
|
||||
}
|
||||
|
||||
export interface AppInstalledFull extends AppInstalledPreview {
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
lastBackup: app.lastBackup | async,
|
||||
hasFetchedFull: app.hasFetchedFull | async,
|
||||
iconURL: app.iconURL | async,
|
||||
title: app.title | async
|
||||
title: app.title | async,
|
||||
ui: app.ui | async
|
||||
} as vars" class="ion-padding-bottom">
|
||||
<ion-spinner *ngIf="$loading$ | async" class="center" name="lines" color="warning"></ion-spinner>
|
||||
|
||||
@@ -75,6 +76,14 @@
|
||||
</ion-button>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<!-- TODO get rid of || true below lol. -->
|
||||
<ion-item class="no-cushion-item" *ngIf="vars.ui || true" lines="none">
|
||||
<ion-label style="margin: 10px 0px; display: flex; justify-content: space-between; align-items: center;" class="ion-text-wrap">
|
||||
<ion-button [fill]="vars.status !== 'RUNNING' ? 'outline' : 'solid'" [disabled]="vars.status !== 'RUNNING'"style="width: 100%; padding: 0px 10px" (click)="launchUiTab()">
|
||||
Launch
|
||||
</ion-button>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="app && app.id && vars.status !== 'INSTALLING'">
|
||||
|
||||
@@ -93,6 +93,11 @@ export class AppInstalledShowPage extends Cleanup {
|
||||
}
|
||||
}
|
||||
|
||||
async launchUiTab () {
|
||||
const uiAddress = this.app.torAddress.getValue()
|
||||
return window.open(uiAddress, '_blank')
|
||||
}
|
||||
|
||||
async checkForUpdates () {
|
||||
const app = peekProperties(this.app)
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ export function toInstalledPreview (f: AppInstalledFull): AppInstalledPreview {
|
||||
title: f.title,
|
||||
iconURL: f.iconURL,
|
||||
torAddress: f.torAddress,
|
||||
ui: f.ui,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +52,7 @@ export const bitcoinI: AppInstalledFull = {
|
||||
lastBackup: new Date().toISOString(),
|
||||
configuredRequirements: [],
|
||||
hasFetchedFull: true,
|
||||
ui: false,
|
||||
}
|
||||
|
||||
export const lightningI: AppInstalledFull = {
|
||||
@@ -73,6 +75,7 @@ export const lightningI: AppInstalledFull = {
|
||||
}),
|
||||
],
|
||||
hasFetchedFull: true,
|
||||
ui: true,
|
||||
}
|
||||
|
||||
export const cupsI: AppInstalledFull = {
|
||||
@@ -85,6 +88,7 @@ export const cupsI: AppInstalledFull = {
|
||||
|
||||
instructions: 'some instructions',
|
||||
lastBackup: new Date().toISOString(),
|
||||
ui: true,
|
||||
configuredRequirements: [
|
||||
toServiceRequirement(lightningI,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user