diff --git a/ui/src/app/pages/apps-routes/app-actions/app-actions.page.ts b/ui/src/app/pages/apps-routes/app-actions/app-actions.page.ts index 64ed16f7a..50522eab6 100644 --- a/ui/src/app/pages/apps-routes/app-actions/app-actions.page.ts +++ b/ui/src/app/pages/apps-routes/app-actions/app-actions.page.ts @@ -10,6 +10,7 @@ import { Subscription } from 'rxjs' import { GenericFormPage } from 'src/app/modals/generic-form/generic-form.page' import { ErrorToastService } from 'src/app/services/error-toast.service' import { AppRestoreComponent } from 'src/app/modals/app-restore/app-restore.component' +import { isEmptyObject } from 'src/app/util/misc.util' @Component({ selector: 'app-actions', @@ -48,7 +49,7 @@ export class AppActionsPage { async handleAction (pkg: PackageDataEntry, action: { key: string, value: Action }) { if ((action.value['allowed-statuses'] as PackageMainStatus[]).includes(pkg.installed.status.main.status)) { - if (action.value['input-spec']) { + if (!isEmptyObject(action.value['input-spec'])) { const modal = await this.modalCtrl.create({ component: GenericFormPage, componentProps: { diff --git a/ui/src/app/pages/apps-routes/app-logs/app-logs.page.html b/ui/src/app/pages/apps-routes/app-logs/app-logs.page.html index 59193bdaa..e89b73e9a 100644 --- a/ui/src/app/pages/apps-routes/app-logs/app-logs.page.html +++ b/ui/src/app/pages/apps-routes/app-logs/app-logs.page.html @@ -14,13 +14,13 @@ - + - +
diff --git a/ui/src/app/pages/apps-routes/app-logs/app-logs.page.ts b/ui/src/app/pages/apps-routes/app-logs/app-logs.page.ts index f2c319dbe..48a1f61c4 100644 --- a/ui/src/app/pages/apps-routes/app-logs/app-logs.page.ts +++ b/ui/src/app/pages/apps-routes/app-logs/app-logs.page.ts @@ -12,7 +12,7 @@ import { ErrorToastService } from 'src/app/services/error-toast.service' export class AppLogsPage { @ViewChild(IonContent, { static: false }) private content: IonContent pkgId: string - firstTimeLoaded = false + loading = true needInfinite = true before: string @@ -22,11 +22,21 @@ export class AppLogsPage { private readonly embassyApi: ApiService, ) { } - ngOnInit () { + async ngOnInit () { this.pkgId = this.route.snapshot.paramMap.get('pkgId') this.getLogs() } + async refresh () { + this.before = undefined + this.loading = true + const container = document.getElementById('container') + const newLogs = document.getElementById('template').cloneNode(true) as HTMLElement + while (container.firstChild) { container.removeChild(container.firstChild) } + container.append(newLogs) + this.getLogs() + } + async getLogs () { const limit = 200 try { @@ -37,8 +47,6 @@ export class AppLogsPage { limit, }) - this.firstTimeLoaded = true - this.before = logs[0].timestamp const container = document.getElementById('container') @@ -57,6 +65,8 @@ export class AppLogsPage { } } catch (e) { this.errToast.present(e) + } finally { + this.loading = false } } diff --git a/ui/src/app/pages/server-routes/security-routes/ssh-keys/ssh-keys.page.html b/ui/src/app/pages/server-routes/security-routes/ssh-keys/ssh-keys.page.html index 856021044..c64725f8c 100644 --- a/ui/src/app/pages/server-routes/security-routes/ssh-keys/ssh-keys.page.html +++ b/ui/src/app/pages/server-routes/security-routes/ssh-keys/ssh-keys.page.html @@ -38,9 +38,9 @@ - - - + + + diff --git a/ui/src/app/pages/server-routes/server-specs/server-specs.page.html b/ui/src/app/pages/server-routes/server-specs/server-specs.page.html index 8032a13f9..8295bea16 100644 --- a/ui/src/app/pages/server-routes/server-specs/server-specs.page.html +++ b/ui/src/app/pages/server-routes/server-specs/server-specs.page.html @@ -24,18 +24,18 @@

Tor Address

-

http://{{ server['tor-address'] }}

+

{{ server['tor-address'] }}

- +

LAN Address

-

https://{{ server['lan-address'] }}

+

{{ server['lan-address'] }}

- +
diff --git a/ui/src/app/services/api/api.fixures.ts b/ui/src/app/services/api/api.fixures.ts index 55835bcc5..2d825c960 100644 --- a/ui/src/app/services/api/api.fixures.ts +++ b/ui/src/app/services/api/api.fixures.ts @@ -1517,7 +1517,7 @@ export module Mock { // expireId: null, // value: { // 'server-info': { - // id: 'start9-abcdefgmm', + // id: 'start9-abcdefgm', // version: '1.0.0', // status: ServerStatus.Running, // 'lan-address': 'start9-abcdefgh.local',