Skip to content

Commit 82ddd1d

Browse files
committed
Offline mode: expose UI/option in Settings panel
1 parent 240f39c commit 82ddd1d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/Settings.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ var Settings = React.createClass({
3838
</label>
3939
<p>Show "reply" links to Hacker News</p>
4040
</div>
41+
<div className="Settings__setting Settings__setting--checkbox">
42+
<label htmlFor="offlineMode">
43+
<input type="checkbox" name="offlineMode" id="offlineMode" checked={SettingsStore.offlineMode}/> Offline Mode
44+
</label>
45+
<p>Show items flagged as dead.</p>
46+
</div>
4147
<div className="Settings__setting Settings__setting--checkbox">
4248
<label htmlFor="showDead">
4349
<input type="checkbox" name="showDead" id="showDead" checked={SettingsStore.showDead}/> show dead

src/stores/SettingsStore.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ var SettingsStore = {
1010
showDeleted: false,
1111
titleFontSize: 18,
1212
listSpacing: 16,
13+
offlineMode: false,
1314

1415
load() {
1516
var json = storage.get(STORAGE_KEY)
@@ -25,7 +26,8 @@ var SettingsStore = {
2526
showDead: this.showDead,
2627
showDeleted: this.showDeleted,
2728
titleFontSize: this.titleFontSize,
28-
listSpacing: this.listSpacing
29+
listSpacing: this.listSpacing,
30+
offlineMode: this.offlineMode
2931
}))
3032
}
3133
}

0 commit comments

Comments
 (0)