Skip to content

Commit

Permalink
Added Update Channel option to Updates menu
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderfrangos committed Dec 4, 2022
1 parent 68fbbba commit 4f70610
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
20 changes: 9 additions & 11 deletions src/components/SettingsWindow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,15 @@ export default class SettingsWindow extends PureComponent {
{ this.renderToggle("checkForUpdates") }
</div>


<div className="pageSection" data-active={this.isSection("updates")} style={{ display: (window.isAppX ? "none" : (this.isSection("updates") ? "block" : "none")) }}>
<label>{T.t("SETTINGS_UPDATES_CHANNEL")}</label>
<select value={this.state.rawSettings.branch} onChange={(e) => { window.sendSettings({ branch: e.target.value }) }}>
<option value="master">{T.t("SETTINGS_UPDATES_BRANCH_STABLE")}</option>
<option value="beta">{T.t("SETTINGS_UPDATES_BRANCH_BETA")}</option>
</select>
</div>

<div className="pageSection debug" data-active={this.isSection("debug")}>
<div className="sectionTitle">All Displays</div>
<label>Every detected display (including those not compatible) is listed below.</label>
Expand All @@ -1205,17 +1214,6 @@ export default class SettingsWindow extends PureComponent {
<p style={{ whiteSpace: "pre-wrap" }}>{JSON.stringify(this.state.rawSettings, undefined, 2)}</p>
</div>


<div className="pageSection debug" data-active={this.isSection("debug")}>
<div className="sectionTitle">Update channel</div>
<p>
<select value={this.state.rawSettings.branch} onChange={(e) => { window.sendSettings({ branch: e.target.value }) }}>
<option value="master">Stable (default)</option>
<option value="beta">Beta</option>
</select>
</p>
</div>

<div className="pageSection debug" data-active={this.isSection("debug")}>
<div className="sectionTitle">Other</div>
<br />
Expand Down
5 changes: 4 additions & 1 deletion src/localization/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,8 @@
"SETTINGS_UPDATES_AVAILABLE": "New version of Twinkle Tray available!",
"SETTINGS_UPDATES_NONE_AVAILABLE": "Up to date. The current version includes the following changes:",
"SETTINGS_UPDATES_DOWNLOADING": "Downloading update…",
"SETTINGS_UPDATES_DOWNLOAD": "Download & Install {{1}}"
"SETTINGS_UPDATES_DOWNLOAD": "Download & Install {{1}}",
"SETTINGS_UPDATES_CHANNEL": "Update channel",
"SETTINGS_UPDATES_BRANCH_STABLE": "Stable (default)",
"SETTINGS_UPDATES_BRANCH_BETA": "Beta"
}

0 comments on commit 4f70610

Please sign in to comment.