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