HelloZeroNet / HelloZeroNet/ZeroNet

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

オープン
#2,162 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
18.8k
フォーク
2.3k
PR マージ指標
30日以内にマージされた PR はありません

説明

### 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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。