restart tor instead of reset

This commit is contained in:
Matt Hill
2025-08-13 10:53:46 -06:00
parent 63323faa97
commit 3848e8f2df
7 changed files with 32 additions and 44 deletions

View File

@@ -159,13 +159,13 @@ import { SystemWipeComponent } from './wipe.component'
<div tuiCell tuiAppearance="outline-grayscale">
<tui-icon icon="@tui.circle-power" (click)="count = count + 1" />
<span tuiTitle>
<strong>{{ 'Reset Tor' | i18n }}</strong>
<strong>{{ 'Restart Tor' | i18n }}</strong>
<span tuiSubtitle>
{{ 'Restart the Tor daemon on your server' | i18n }}
</span>
</span>
<button tuiButton appearance="glass" (click)="onReset()">
{{ 'Reset' | i18n }}
<button tuiButton appearance="glass" (click)="onTorRestart()">
{{ 'Restart' | i18n }}
</button>
</div>
@if (count > 4) {
@@ -308,7 +308,7 @@ export default class SystemGeneralComponent {
})
}
onReset() {
onTorRestart() {
this.wipe = false
this.dialog
.openConfirm({
@@ -318,7 +318,7 @@ export default class SystemGeneralComponent {
SystemWipeComponent,
this.injector,
),
yes: 'Reset',
yes: 'Restart',
no: 'Cancel',
},
})
@@ -387,11 +387,11 @@ export default class SystemGeneralComponent {
}
private async resetTor(wipeState: boolean) {
const loader = this.loader.open('Resetting Tor').subscribe()
const loader = this.loader.open().subscribe()
try {
await this.api.resetTor({ wipeState, reason: 'User triggered' })
this.dialog.openAlert('Tor reset in progress').subscribe()
this.dialog.openAlert('Tor restart in progress').subscribe()
} catch (e: any) {
this.errorService.handleError(e)
} finally {

View File

@@ -8,16 +8,14 @@ import { i18nPipe } from '@start9labs/shared'
@Component({
template: `
<p>
@if (isTor) {
@if (isTor) {
<p>
{{
'You are currently connected over Tor. If you reset the Tor daemon, you will lose connectivity until it comes back online.'
'You are currently connected over Tor. If you restart the Tor daemon, you will lose connectivity until it comes back online.'
| i18n
}}
} @else {
{{ 'Reset Tor?' | i18n }}
}
</p>
</p>
}
<p>
{{
'Optionally wipe state to forcibly acquire new guard nodes. It is recommended to try without wiping state first.'