Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

Commit

Permalink
Merge pull request #194 from KyleMaas/fix-hops
Browse files Browse the repository at this point in the history
Fix the Hops setting
  • Loading branch information
arj03 authored Feb 8, 2021
2 parents f603320 + 02f243a commit 4771541
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion defaultprefs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"appTitle": "SSB Browser Demo",
"replicationHops": 1,
"replicationHops": 2,
"publicFilters": "",
"favoriteChannels": [],
"hiddenChannels": [],
Expand Down
2 changes: 2 additions & 0 deletions messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"useSystemDefault": "(Use system default)",
"colorTheme": "Color theme:",
"replicateHops": "Number of hops to replicate:",
"highHopCountWarning": "WARNING: Hops counts over 2 will very likely slow this app down to the point it is unusable. Use at your own risk.",
"directFollows": "(only people you follow)",
"autorefresh": "Automatically refresh messages when scrolled to the top",
"advanced": "ADVANCED",
Expand Down Expand Up @@ -432,6 +433,7 @@
"useSystemDefault": "(システムデフォルトを使用)",
"colorTheme": "カラーテーマ:",
"replicateHops": "複製するホップ数:",
"highHopCountWarning": "警告:ホップ数が2を超えると、このアプリが使用できなくなるまで遅くなる可能性があります。 自己責任。",
"directFollows": "(あなたがフォローしている人だけ)",
"autorefresh": "ページが一番上にスクロールされると、メッセージが自動的に更新されます",
"advanced": "高度な",
Expand Down
3 changes: 3 additions & 0 deletions ui/browser.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
const localPrefs = require('../localprefs')
const optionsForCore = {
caps: { shs: Buffer.from(localPrefs.getCaps(), 'base64') },
friends: {
hops: localPrefs.getHops()
},
hops: localPrefs.getHops(),
core: {
startOffline: localPrefs.getOfflineMode()
Expand Down
6 changes: 3 additions & 3 deletions ui/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ module.exports = function () {
<p>
<label for="replicationHops">{{ $t('settings.replicateHops') }}</label><br />
<select id="replicationHops" v-model="hops">
<option value="0">0 {{ $t('settings.directFollows') }}</option>
<option value="1">1</option>
<option value="1">1 {{ $t('settings.directFollows') }}</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<span v-if="hops > 2"><br /><strong>{{ $t('settings.highHopCountWarning') }}</strong></span>
</p>
<p>
Expand All @@ -67,7 +67,7 @@ module.exports = function () {
locale: 'en',
localeOptions: [],
autorefresh: false,
hops: 1
hops: 2
}
},

Expand Down

0 comments on commit 4771541

Please sign in to comment.