mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
* style: format lan page component * Link to tor address on LAN setup page (#1277)
This commit is contained in:
@@ -8,36 +8,62 @@
|
|||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
<ion-content class="ion-padding-top">
|
<ion-content class="ion-padding-top">
|
||||||
|
|
||||||
<ion-item-group>
|
<ion-item-group>
|
||||||
<!-- about -->
|
<!-- about -->
|
||||||
<ion-item class="ion-padding-bottom">
|
<ion-item class="ion-padding-bottom">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<h2>
|
<h2>
|
||||||
Connecting to your Embassy over LAN provides a lightning fast experience and is a reliable fallback in case Tor is having problems. To connect to your Embassy's .local address, you must:
|
Connecting to your Embassy over LAN provides a lightning fast
|
||||||
|
experience and is a reliable fallback in case Tor is having problems.
|
||||||
|
To connect to your Embassy's .local address, you must:
|
||||||
<ol>
|
<ol>
|
||||||
<li>Be connected to the same Local Area Network (LAN) as your Embassy.</li>
|
<li>
|
||||||
<li>Download and trust your Embassy's SSL Certificate Authority (below).</li>
|
Be connected to the same Local Area Network (LAN) as your Embassy.
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Download and trust your Embassy's SSL Certificate Authority
|
||||||
|
(below).
|
||||||
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
View the full <a href="https://start9.com/latest/user-manual/connecting/connecting-lan" target="_blank" rel="noreferrer">instructions</a>.
|
View the full
|
||||||
|
<a
|
||||||
|
href="https://start9.com/latest/user-manual/connecting/connecting-lan"
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
>instructions</a
|
||||||
|
>.
|
||||||
</h2>
|
</h2>
|
||||||
<ng-container *ngIf="lanDisabled">
|
<ng-container *ngIf="downloadIsDisabled && server$ | async as server">
|
||||||
<br />
|
<br />
|
||||||
<ion-text color="warning" [innerHtml]="lanDisabled"></ion-text>
|
<ion-text color="warning">
|
||||||
|
For security reasons, you must setup LAN over a
|
||||||
|
<a
|
||||||
|
[attr.href]="server['tor-address']"
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
>Tor connection</a
|
||||||
|
>.
|
||||||
|
</ion-text>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
<ion-item button (click)="installCert()" [disabled]="lanDisabled">
|
<ion-item button (click)="installCert()" [disabled]="downloadIsDisabled">
|
||||||
<ion-icon slot="start" name="download-outline" size="large"></ion-icon>
|
<ion-icon slot="start" name="download-outline" size="large"></ion-icon>
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<h1>Download Root CA</h1>
|
<h1>Download Root CA</h1>
|
||||||
<p>Download and trust your Embassy's Root Certificate Authority to establish a secure, https connection over LAN.</p>
|
<p>
|
||||||
|
Download and trust your Embassy's Root Certificate Authority to
|
||||||
|
establish a secure, https connection over LAN.
|
||||||
|
</p>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-item-group>
|
</ion-item-group>
|
||||||
|
|
||||||
<!-- hidden element for downloading cert -->
|
<!-- hidden element for downloading cert -->
|
||||||
<a id="install-cert" href="/public/eos/local.crt" download="Embassy Local CA.crt"></a>
|
<a
|
||||||
|
id="install-cert"
|
||||||
|
href="/public/eos/local.crt"
|
||||||
|
download="Embassy Local CA.crt"
|
||||||
|
></a>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { Component } from '@angular/core'
|
import { Component } from '@angular/core'
|
||||||
import { ConfigService } from 'src/app/services/config.service'
|
import { ConfigService } from 'src/app/services/config.service'
|
||||||
|
import { PatchDbService } from 'src/app/services/patch-db/patch-db.service'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'lan',
|
selector: 'lan',
|
||||||
@@ -7,20 +8,20 @@ import { ConfigService } from 'src/app/services/config.service'
|
|||||||
styleUrls: ['./lan.page.scss'],
|
styleUrls: ['./lan.page.scss'],
|
||||||
})
|
})
|
||||||
export class LANPage {
|
export class LANPage {
|
||||||
lanAddress: string
|
downloadIsDisabled: boolean
|
||||||
lanDisabled: string
|
|
||||||
|
|
||||||
constructor (
|
readonly server$ = this.patch.watch$('server-info')
|
||||||
|
|
||||||
|
constructor(
|
||||||
private readonly config: ConfigService,
|
private readonly config: ConfigService,
|
||||||
) { }
|
private readonly patch: PatchDbService,
|
||||||
|
) {}
|
||||||
|
|
||||||
ngOnInit () {
|
ngOnInit() {
|
||||||
if (!this.config.isTor()) {
|
this.downloadIsDisabled = !this.config.isTor()
|
||||||
this.lanDisabled = 'For security reasons, you must setup LAN over a Tor connection. Please navigate to your Embassy Tor Address and try again.'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
installCert (): void {
|
installCert(): void {
|
||||||
document.getElementById('install-cert').click()
|
document.getElementById('install-cert').click()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user