Remove native receiver selector

This commit is contained in:
hensm
2021-05-26 17:39:12 +01:00
parent 6d80e258a9
commit ab00bcdd6a
30 changed files with 294 additions and 1704 deletions

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../photon-colors.css">
<link rel="stylesheet" href="../photon-widgets.css">
<link rel="stylesheet" href="styles/index.css">
<script src="index.js" defer></script>
</head>
<body>
<div id="root"></div>
</body>
</html>

View File

@@ -14,8 +14,6 @@ import logger from "../../lib/logger";
import options, { Options } from "../../lib/options";
import { REMOTE_MATCH_PATTERN_REGEX } from "../../lib/utils";
import { ReceiverSelectorType } from "../../background/receiverSelector";
const _ = browser.i18n.getMessage;
@@ -86,9 +84,6 @@ class OptionsApp extends Component<
this.handleInputChange = this.handleInputChange.bind(this);
this.handleWhitelistChange = this.handleWhitelistChange.bind(this);
this.handleReceiverSelectorTypeChange =
this.handleReceiverSelectorTypeChange.bind(this);
this.getWhitelistItemPatternError =
this.getWhitelistItemPatternError.bind(this);
}
@@ -287,27 +282,6 @@ class OptionsApp extends Component<
{ _("optionsReceiverSelectorCategoryDescription") }
</p>
{ this.state.platform === "mac" &&
<label className="option">
<div className="option__label">
{ _("optionsReceiverSelectorType") }
</div>
<div className="option__control">
<div className="select-wrapper">
<select name="receiverSelectorType"
value={ this.state.options?.receiverSelectorType }
onChange={ this.handleReceiverSelectorTypeChange }>
<option value={ ReceiverSelectorType.Popup }>
{ _("optionsReceiverSelectorTypeBrowser") }
</option>
<option value={ ReceiverSelectorType.Native }>
{ _("optionsReceiverSelectorTypeNative") }
</option>
</select>
</div>
</div>
</label> }
<label className="option option--inline">
<div className="option__control">
<input name="receiverSelectorWaitForConnection"
@@ -463,19 +437,6 @@ class OptionsApp extends Component<
});
}
private handleReceiverSelectorTypeChange(
ev: React.ChangeEvent<HTMLSelectElement>) {
this.setState(currentState => {
if (currentState.options) {
currentState.options[ev.target.name] =
parseInt(ev.target.value);
}
return currentState;
});
}
private handleWhitelistChange(whitelist: string[]) {
this.setState(currentState => {
if (currentState.options) {

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../photon-colors.css">
<link rel="stylesheet" href="../photon-widgets.css">
<link rel="stylesheet" href="styles/index.css">
<script src="index.js" defer></script>
</head>
<body>
<div id="root"></div>
</body>
</html>