diff --git a/ext/src/options/Bridge.tsx b/ext/src/options/Bridge.tsx index 8c3725a..a45d074 100644 --- a/ext/src/options/Bridge.tsx +++ b/ext/src/options/Bridge.tsx @@ -138,7 +138,7 @@ export default class Bridge extends Component { this.onPackageTypeChange = this.onPackageTypeChange.bind(this); } - render () { + public render () { return (
{ this.props.loading diff --git a/ext/src/options/EditableList.tsx b/ext/src/options/EditableList.tsx index ee51bc1..459c3db 100644 --- a/ext/src/options/EditableList.tsx +++ b/ext/src/options/EditableList.tsx @@ -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 ( diff --git a/ext/src/options/EditableListItem.tsx b/ext/src/options/EditableListItem.tsx index 0ad53e5..00dfc5c 100644 --- a/ext/src/options/EditableListItem.tsx +++ b/ext/src/options/EditableListItem.tsx @@ -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" : ""; diff --git a/ext/src/options/index.tsx b/ext/src/options/index.tsx index 9dd750b..1deb4e9 100644 --- a/ext/src/options/index.tsx +++ b/ext/src/options/index.tsx @@ -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; } diff --git a/ext/src/popup/index.tsx b/ext/src/popup/index.tsx index ebd31f2..c50e789 100755 --- a/ext/src/popup/index.tsx +++ b/ext/src/popup/index.tsx @@ -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 { , 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 (
  • @@ -220,7 +205,7 @@ class Receiver extends Component { `- ${this.props.receiver.currentApp}` }
  • ); } + + private handleCast () { + this.props.onCast(this.props.receiver); + + this.setState({ + isLoading: true + }); + + setInterval(() => { + this.setState(state => ({ + ellipsis: getNextEllipsis(state.ellipsis) + })); + + }, 500); + } } diff --git a/ext/src/updater/index.tsx b/ext/src/updater/index.tsx index c22babf..5b2e5c9 100644 --- a/ext/src/updater/index.tsx +++ b/ext/src/updater/index.tsx @@ -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; } diff --git a/tslintCommon.json b/tslintCommon.json index 0e18b50..08adf00 100644 --- a/tslintCommon.json +++ b/tslintCommon.json @@ -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