mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
last minute changes
This commit is contained in:
committed by
Aiden McClelland
parent
a6e00449f6
commit
df16943502
@@ -2,22 +2,44 @@
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col class="ion-text-center">
|
||||
|
||||
<div style="padding-bottom: 32px;">
|
||||
<img src="assets/img/logo.png" style="max-width: 240px;" />
|
||||
<div style="padding-bottom: 32px">
|
||||
<img src="assets/img/logo.png" style="max-width: 240px" />
|
||||
</div>
|
||||
|
||||
<success [hidden]="!stateService.embassyLoaded" (onDownload)="download()"></success>
|
||||
<success
|
||||
[hidden]="!stateService.embassyLoaded"
|
||||
(onDownload)="download()"
|
||||
></success>
|
||||
|
||||
<ion-card [hidden]="stateService.embassyLoaded" color="dark">
|
||||
<ion-card-header>
|
||||
<ion-card-title style="font-size: 40px;">Initializing Embassy</ion-card-title>
|
||||
<ion-card-title style="font-size: 40px"
|
||||
>Initializing Embassy</ion-card-title
|
||||
>
|
||||
<ion-card-subtitle>Progress: {{ progress }}%</ion-card-subtitle>
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card-content class="ion-margin">
|
||||
<ion-progress-bar color="primary" style="max-width: 700px; margin: auto; padding-bottom: 20px; margin-bottom: 40px;" [value]="progress / 100"></ion-progress-bar>
|
||||
<p class="ion-text-start">After completion, you will be prompted to download a file from your Embassy. Save the file somewhere safe, it is the easiest way to recover your Embassy's addresses and SSL certificate in case you lose them.</p>
|
||||
<ion-progress-bar
|
||||
color="primary"
|
||||
style="
|
||||
max-width: 700px;
|
||||
margin: auto;
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 40px;
|
||||
"
|
||||
[value]="progress / 100"
|
||||
></ion-progress-bar>
|
||||
<p class="ion-text-start">
|
||||
After completion, you will be prompted to download a file from
|
||||
your Embassy. Save the file somewhere safe, it is the easiest way
|
||||
to recover your Embassy's addresses and SSL certificate in case
|
||||
you lose them.
|
||||
</p>
|
||||
<p class="ion-text-start" style="color: var(--ion-color-danger)">
|
||||
<b>DO NOT:</b> Close or refresh the browser window during
|
||||
intialization process.
|
||||
</p>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
</ion-col>
|
||||
|
||||
@@ -2,20 +2,30 @@
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col class="ion-text-center">
|
||||
|
||||
<div style="padding-bottom: 32px;">
|
||||
<img src="assets/img/logo.png" style="max-width: 240px;" />
|
||||
<div style="padding-bottom: 32px">
|
||||
<img src="assets/img/logo.png" style="max-width: 240px" />
|
||||
</div>
|
||||
|
||||
<ion-card color="dark">
|
||||
<ion-card-header>
|
||||
<ion-card-title style="font-size: 40px;">Recovering</ion-card-title>
|
||||
<ion-card-subtitle>Progress: {{ (stateService.dataProgress * 100).toFixed(0) }}%</ion-card-subtitle>
|
||||
<ion-card-title style="font-size: 40px">Recovering</ion-card-title>
|
||||
<ion-card-subtitle
|
||||
>Progress: {{ (stateService.dataProgress * 100).toFixed(0)
|
||||
}}%</ion-card-subtitle
|
||||
>
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card-content class="ion-margin">
|
||||
<ion-progress-bar color="primary" style="max-width: 700px; margin: auto; padding-bottom: 20px; margin-bottom: 40px;" [value]="stateService.dataProgress"></ion-progress-bar>
|
||||
<p class="ion-text-start">After completion, you will be prompted to download a file from your Embassy. Save the file somewhere safe, it is the easiest way to recover your Embassy's addresses and SSL certificate in case you lose them.</p>
|
||||
<ion-progress-bar
|
||||
color="primary"
|
||||
style="
|
||||
max-width: 700px;
|
||||
margin: auto;
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 40px;
|
||||
"
|
||||
[value]="stateService.dataProgress"
|
||||
></ion-progress-bar>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
</ion-col>
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Component, Input } from '@angular/core'
|
||||
import { ModalController, IonicSafeString } from '@ionic/angular'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { getErrorMessage } from 'src/app/services/error-toast.service'
|
||||
import { pauseFor } from '../../../../../shared/src/util/misc.util'
|
||||
|
||||
@Component({
|
||||
selector: 'markdown',
|
||||
@@ -25,6 +26,11 @@ export class MarkdownPage {
|
||||
if (!this.content) {
|
||||
this.content = await this.embassyApi.getStatic(this.contentUrl)
|
||||
}
|
||||
} catch (e) {
|
||||
this.loadingError = getErrorMessage(e)
|
||||
} finally {
|
||||
this.loading = false
|
||||
await pauseFor(50)
|
||||
const links = document.links
|
||||
for (let i = 0, linksLength = links.length; i < linksLength; i++) {
|
||||
if (links[i].hostname != window.location.hostname) {
|
||||
@@ -33,10 +39,6 @@ export class MarkdownPage {
|
||||
links[i].className += ' externalLink'
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
this.loadingError = getErrorMessage(e)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -108,8 +108,11 @@ export class AppShowStatusComponent {
|
||||
|
||||
async stop(): Promise<void> {
|
||||
const { id, title, version } = this.pkg.manifest
|
||||
const hasDependents = !!Object.keys(
|
||||
this.pkg.installed['current-dependents'],
|
||||
).filter(depId => depId !== this.pkg.manifest.id).length
|
||||
|
||||
if (isEmptyObject(this.pkg.installed['current-dependents'])) {
|
||||
if (!hasDependents) {
|
||||
const loader = await this.loadingCtrl.create({
|
||||
message: `Stopping...`,
|
||||
spinner: 'lines',
|
||||
|
||||
@@ -90,7 +90,7 @@ export class MarketplacesPage {
|
||||
|
||||
async presentAction(id: string) {
|
||||
// no need to view actions if is selected marketplace
|
||||
if (id === this.patch.getData().ui.marketplace['selected-id']) return
|
||||
if (id === this.patch.getData().ui.marketplace?.['selected-id']) return
|
||||
|
||||
const buttons: ActionSheetButton[] = [
|
||||
{
|
||||
|
||||
@@ -79,7 +79,9 @@
|
||||
|
||||
<!-- not loading -->
|
||||
<ng-container *ngIf="!loading && wifi.country">
|
||||
<ion-item-divider>Saved Networks</ion-item-divider>
|
||||
<ion-item-divider *ngIf="!(wifi.ssids | empty)"
|
||||
>Saved Networks</ion-item-divider
|
||||
>
|
||||
<ion-item
|
||||
button
|
||||
detail="false"
|
||||
@@ -126,38 +128,40 @@
|
||||
</ion-item>
|
||||
|
||||
<ion-item-divider>Available Networks</ion-item-divider>
|
||||
<ion-item
|
||||
button
|
||||
detail="false"
|
||||
*ngFor="let avWifi of wifi['available-wifi']"
|
||||
(click)="presentModalAdd(avWifi.ssid, !!avWifi.security.length)"
|
||||
>
|
||||
<ion-label>{{ avWifi.ssid }}</ion-label>
|
||||
<img
|
||||
*ngIf="avWifi.strength < 5"
|
||||
slot="end"
|
||||
src="assets/img/icons/wifi-1.png"
|
||||
style="max-width: 32px"
|
||||
/>
|
||||
<img
|
||||
*ngIf="avWifi.strength >= 5 && avWifi.strength < 50"
|
||||
slot="end"
|
||||
src="assets/img/icons/wifi-1.png"
|
||||
style="max-width: 32px"
|
||||
/>
|
||||
<img
|
||||
*ngIf="avWifi.strength >= 50 && avWifi.strength < 90"
|
||||
slot="end"
|
||||
src="assets/img/icons/wifi-2.png"
|
||||
style="max-width: 32px"
|
||||
/>
|
||||
<img
|
||||
*ngIf="avWifi.strength >= 90"
|
||||
slot="end"
|
||||
src="assets/img/icons/wifi-3.png"
|
||||
style="max-width: 32px"
|
||||
/>
|
||||
</ion-item>
|
||||
<ng-container *ngFor="let avWifi of wifi['available-wifi']">
|
||||
<ion-item
|
||||
button
|
||||
detail="false"
|
||||
(click)="presentModalAdd(avWifi.ssid, !!avWifi.security.length)"
|
||||
*ngIf="avWifi.ssid"
|
||||
>
|
||||
<ion-label>{{ avWifi.ssid }}</ion-label>
|
||||
<img
|
||||
*ngIf="avWifi.strength < 5"
|
||||
slot="end"
|
||||
src="assets/img/icons/wifi-1.png"
|
||||
style="max-width: 32px"
|
||||
/>
|
||||
<img
|
||||
*ngIf="avWifi.strength >= 5 && avWifi.strength < 50"
|
||||
slot="end"
|
||||
src="assets/img/icons/wifi-1.png"
|
||||
style="max-width: 32px"
|
||||
/>
|
||||
<img
|
||||
*ngIf="avWifi.strength >= 50 && avWifi.strength < 90"
|
||||
slot="end"
|
||||
src="assets/img/icons/wifi-2.png"
|
||||
style="max-width: 32px"
|
||||
/>
|
||||
<img
|
||||
*ngIf="avWifi.strength >= 90"
|
||||
slot="end"
|
||||
src="assets/img/icons/wifi-3.png"
|
||||
style="max-width: 32px"
|
||||
/>
|
||||
</ion-item>
|
||||
</ng-container>
|
||||
<ion-item button detail="false" (click)="presentModalAdd()">
|
||||
<ion-icon slot="start" name="add" size="large"></ion-icon>
|
||||
<ion-label>Join other network</ion-label>
|
||||
|
||||
@@ -40,8 +40,16 @@ export class WifiPage {
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
await this.getWifi()
|
||||
}
|
||||
|
||||
async getWifi(timeout?: number): Promise<void> {
|
||||
this.loading = true
|
||||
try {
|
||||
await this.getWifi()
|
||||
this.wifi = await this.api.getWifi({}, timeout)
|
||||
if (!this.wifi.country) {
|
||||
await this.presentAlertCountry()
|
||||
}
|
||||
} catch (e) {
|
||||
this.errToast.present(e)
|
||||
} finally {
|
||||
@@ -49,13 +57,6 @@ export class WifiPage {
|
||||
}
|
||||
}
|
||||
|
||||
async getWifi(timeout?: number): Promise<void> {
|
||||
this.wifi = await this.api.getWifi({}, timeout)
|
||||
if (!this.wifi.country) {
|
||||
await this.presentAlertCountry()
|
||||
}
|
||||
}
|
||||
|
||||
async presentAlertCountry(): Promise<void> {
|
||||
if (!this.config.isLan) {
|
||||
const alert = await this.alertCtrl.create({
|
||||
|
||||
@@ -1017,6 +1017,11 @@ export module Mock {
|
||||
strength: 99,
|
||||
security: ['1', '2', '3'],
|
||||
},
|
||||
{
|
||||
ssid: '',
|
||||
strength: 40,
|
||||
security: [],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user