HelloZeroNet / HelloZeroNet/ZeroNet

Toggling "Open web browser on ZeroNet startup" twice doesn't restore old browser

Aperta
#2,162 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
18.8k
Fork
2.3k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Step 1: Please describe your environment

* ZeroNet version: v0.7.0, rev4172
* Operating system: reproducible on all
* Web browser: doesn't matter
* Tor status: doesn't matter
* Opened port: doesn't matter
* Special configuration: none

### Step 2: Describe the problem:

Quote from UiConfig.coffee:

```coffee
if key == "open_browser"
if value
value = "default_browser"
else
value = "False"
```

This means that once you click the checkbox (even accidentally) and you've manually set a browser (which might have a long path with CLI options), there's no easy way to restore it.

This also leads to a fact that toggling the checkbox twice doesn't remove the "1 configuration item value changed" banner, while toggling any other checkbox twice *does* remove it. This leads to confusion.

#### Steps to reproduce:

1. Setup a non-standard browser path in zeronet.conf (even `open_browser = chrome` will work)
2. Open UI Config
3. Toggle "Open web browser on ZeroNet startup" checkbox
4. Toggle "Open web browser on ZeroNet startup" checkbox
5. Press "Save settings"
6. Reboot ZeroNet

#### Observed Results:

`chrome` is replaced with `default_browser`

#### Expected Results:

`chrome` is not changed

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.