mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-08 08:39:59 +00:00
Require explicit public modifier
This commit is contained in:
@@ -138,7 +138,7 @@ export default class Bridge extends Component<BridgeProps, BridgeState> {
|
||||
this.onPackageTypeChange = this.onPackageTypeChange.bind(this);
|
||||
}
|
||||
|
||||
render () {
|
||||
public render () {
|
||||
return (
|
||||
<div className="bridge">
|
||||
{ this.props.loading
|
||||
|
||||
@@ -46,7 +46,7 @@ export default class EditableList extends Component<
|
||||
this.handleNewItemEdit = this.handleNewItemEdit.bind(this);
|
||||
}
|
||||
|
||||
render () {
|
||||
public render () {
|
||||
const items = Array.from(this.state.items.values());
|
||||
|
||||
return (
|
||||
|
||||
@@ -40,7 +40,7 @@ export default class EditableListItem extends Component<
|
||||
this.handleInputKeyPress = this.handleInputKeyPress.bind(this);
|
||||
}
|
||||
|
||||
render () {
|
||||
public render () {
|
||||
const selected = this.state.editing
|
||||
? "editable-list__item--selected" : "";
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ class OptionsApp extends Component<{}, OptionsAppState> {
|
||||
= this.getWhitelistItemPatternError.bind(this);
|
||||
}
|
||||
|
||||
async componentDidMount () {
|
||||
public async componentDidMount () {
|
||||
const { options } = await browser.storage.sync.get("options");
|
||||
|
||||
this.setState({
|
||||
@@ -95,7 +95,7 @@ class OptionsApp extends Component<{}, OptionsAppState> {
|
||||
});
|
||||
}
|
||||
|
||||
render () {
|
||||
public render () {
|
||||
if (!this.state.hasLoaded) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ class PopupApp extends Component<{}, PopupAppState> {
|
||||
this.onCast = this.onCast.bind(this);
|
||||
}
|
||||
|
||||
componentDidMount () {
|
||||
public componentDidMount () {
|
||||
const backgroundPort = browser.runtime.connect({
|
||||
name: "popup"
|
||||
});
|
||||
@@ -71,7 +71,7 @@ class PopupApp extends Component<{}, PopupAppState> {
|
||||
});
|
||||
}
|
||||
|
||||
render () {
|
||||
public render () {
|
||||
const shareMedia =
|
||||
this.state.selectedMedia === "tab"
|
||||
|| this.state.selectedMedia === "screen";
|
||||
@@ -188,25 +188,10 @@ class Receiver extends Component<ReceiverProps, ReceiverState> {
|
||||
, ellipsis: ""
|
||||
};
|
||||
|
||||
this.onClick = this.onClick.bind(this);
|
||||
this.handleCast = this.handleCast.bind(this);
|
||||
}
|
||||
|
||||
onClick () {
|
||||
this.props.onCast(this.props.receiver);
|
||||
|
||||
this.setState({
|
||||
isLoading: true
|
||||
});
|
||||
|
||||
setInterval(() => {
|
||||
this.setState(state => ({
|
||||
ellipsis: getNextEllipsis(state.ellipsis)
|
||||
}));
|
||||
|
||||
}, 500);
|
||||
}
|
||||
|
||||
render () {
|
||||
public render () {
|
||||
return (
|
||||
<li className="receiver">
|
||||
<div className="receiver-name">
|
||||
@@ -220,7 +205,7 @@ class Receiver extends Component<ReceiverProps, ReceiverState> {
|
||||
`- ${this.props.receiver.currentApp}` }
|
||||
</div>
|
||||
<button className="receiver-connect"
|
||||
onClick={ this.onClick }
|
||||
onClick={ this.handleCast }
|
||||
disabled={this.props.isLoading}>
|
||||
{ this.state.isLoading
|
||||
? _("popupCastingButtonLabel") +
|
||||
@@ -232,6 +217,21 @@ class Receiver extends Component<ReceiverProps, ReceiverState> {
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
private handleCast () {
|
||||
this.props.onCast(this.props.receiver);
|
||||
|
||||
this.setState({
|
||||
isLoading: true
|
||||
});
|
||||
|
||||
setInterval(() => {
|
||||
this.setState(state => ({
|
||||
ellipsis: getNextEllipsis(state.ellipsis)
|
||||
}));
|
||||
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ class UpdaterApp extends Component<{}, UpdaterAppState> {
|
||||
};
|
||||
}
|
||||
|
||||
async componentDidMount () {
|
||||
public async componentDidMount () {
|
||||
this.port = browser.runtime.connect({
|
||||
name: "updater"
|
||||
});
|
||||
@@ -104,7 +104,7 @@ class UpdaterApp extends Component<{}, UpdaterAppState> {
|
||||
browser.downloads.onChanged.addListener(this.onDownloadChanged);
|
||||
}
|
||||
|
||||
componentDidUpdate () {
|
||||
public componentDidUpdate () {
|
||||
// Size window to content
|
||||
browser.windows.update(this.win.id, {
|
||||
width: document.body.clientWidth + this.frameWidth
|
||||
@@ -112,7 +112,7 @@ class UpdaterApp extends Component<{}, UpdaterAppState> {
|
||||
});
|
||||
}
|
||||
|
||||
render () {
|
||||
public render () {
|
||||
if (!this.state.hasLoaded) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"limit": 80
|
||||
, "ignore-pattern": "//|.*(\"|`);?$"
|
||||
}]
|
||||
, "member-access": [ true, "no-public" ]
|
||||
, "member-access": [ true ]
|
||||
, "no-console": [ true, "log" ]
|
||||
, "no-namespace": [ true, "allow-declarations" ]
|
||||
, "object-literal-sort-keys": false
|
||||
|
||||
Reference in New Issue
Block a user