diff options
author | Nick Schonning <nschonni@gmail.com> | 2023-01-29 19:45:35 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-30 01:45:35 +0100 |
commit | c49213f0ea311daba590db1d7a14a641cbd9fe93 (patch) | |
tree | 4a6bbb162b1fa906c2d3737caa4871e2b6bf5b76 /app/javascript/mastodon/features/ui/index.js | |
parent | b58bf74e35039a29ca3794ea100a19d4d07cc810 (diff) |
Upgrade ESlint to v8 (#23305)
Diffstat (limited to 'app/javascript/mastodon/features/ui/index.js')
-rw-r--r-- | app/javascript/mastodon/features/ui/index.js | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js index 78dc9ea40..4f0ea0450 100644 --- a/app/javascript/mastodon/features/ui/index.js +++ b/app/javascript/mastodon/features/ui/index.js @@ -148,7 +148,7 @@ class SwitchingColumnsArea extends React.PureComponent { if (c) { this.node = c; } - } + }; render () { const { children, mobile } = this.props; @@ -270,16 +270,16 @@ class UI extends React.PureComponent { // but we set user-friendly message for other browsers, e.g. Edge. e.returnValue = intl.formatMessage(messages.beforeUnload); } - } + }; handleWindowFocus = () => { this.props.dispatch(focusApp()); this.props.dispatch(submitMarkers({ immediate: true })); - } + }; handleWindowBlur = () => { this.props.dispatch(unfocusApp()); - } + }; handleDragEnter = (e) => { e.preventDefault(); @@ -295,7 +295,7 @@ class UI extends React.PureComponent { if (e.dataTransfer && Array.from(e.dataTransfer.types).includes('Files') && this.props.canUploadMore && this.context.identity.signedIn) { this.setState({ draggingOver: true }); } - } + }; handleDragOver = (e) => { if (this.dataTransferIsText(e.dataTransfer)) return false; @@ -310,7 +310,7 @@ class UI extends React.PureComponent { } return false; - } + }; handleDrop = (e) => { if (this.dataTransferIsText(e.dataTransfer)) return; @@ -323,7 +323,7 @@ class UI extends React.PureComponent { if (e.dataTransfer && e.dataTransfer.files.length >= 1 && this.props.canUploadMore && this.context.identity.signedIn) { this.props.dispatch(uploadCompose(e.dataTransfer.files)); } - } + }; handleDragLeave = (e) => { e.preventDefault(); @@ -336,15 +336,15 @@ class UI extends React.PureComponent { } this.setState({ draggingOver: false }); - } + }; dataTransferIsText = (dataTransfer) => { return (dataTransfer && Array.from(dataTransfer.types).filter((type) => type === 'text/plain').length === 1); - } + }; closeUploadModal = () => { this.setState({ draggingOver: false }); - } + }; handleServiceWorkerPostMessage = ({ data }) => { if (data.type === 'navigate') { @@ -352,7 +352,7 @@ class UI extends React.PureComponent { } else { console.warn('Unknown message type:', data.type); } - } + }; handleLayoutChange = debounce(() => { this.props.dispatch(clearHeight()); // The cached heights are no longer accurate, invalidate @@ -369,7 +369,7 @@ class UI extends React.PureComponent { } else { this.handleLayoutChange(); } - } + }; componentDidMount () { const { signedIn } = this.context.identity; @@ -423,7 +423,7 @@ class UI extends React.PureComponent { setRef = c => { this.node = c; - } + }; handleHotkeyNew = e => { e.preventDefault(); @@ -433,7 +433,7 @@ class UI extends React.PureComponent { if (element) { element.focus(); } - } + }; handleHotkeySearch = e => { e.preventDefault(); @@ -443,17 +443,17 @@ class UI extends React.PureComponent { if (element) { element.focus(); } - } + }; handleHotkeyForceNew = e => { this.handleHotkeyNew(e); this.props.dispatch(resetCompose()); - } + }; handleHotkeyToggleComposeSpoilers = e => { e.preventDefault(); this.props.dispatch(changeComposeSpoilerness()); - } + }; handleHotkeyFocusColumn = e => { const index = (e.key * 1) + 1; // First child is drawer, skip that @@ -471,7 +471,7 @@ class UI extends React.PureComponent { status.focus(); } } - } + }; handleHotkeyBack = () => { if (window.history && window.history.length === 1) { @@ -479,11 +479,11 @@ class UI extends React.PureComponent { } else { this.context.router.history.goBack(); } - } + }; setHotkeysRef = c => { this.hotkeys = c; - } + }; handleHotkeyToggleHelp = () => { if (this.props.location.pathname === '/keyboard-shortcuts') { @@ -491,55 +491,55 @@ class UI extends React.PureComponent { } else { this.context.router.history.push('/keyboard-shortcuts'); } - } + }; handleHotkeyGoToHome = () => { this.context.router.history.push('/home'); - } + }; handleHotkeyGoToNotifications = () => { this.context.router.history.push('/notifications'); - } + }; handleHotkeyGoToLocal = () => { this.context.router.history.push('/public/local'); - } + }; handleHotkeyGoToFederated = () => { this.context.router.history.push('/public'); - } + }; handleHotkeyGoToDirect = () => { this.context.router.history.push('/conversations'); - } + }; handleHotkeyGoToStart = () => { this.context.router.history.push('/getting-started'); - } + }; handleHotkeyGoToFavourites = () => { this.context.router.history.push('/favourites'); - } + }; handleHotkeyGoToPinned = () => { this.context.router.history.push('/pinned'); - } + }; handleHotkeyGoToProfile = () => { this.context.router.history.push(`/@${this.props.username}`); - } + }; handleHotkeyGoToBlocked = () => { this.context.router.history.push('/blocks'); - } + }; handleHotkeyGoToMuted = () => { this.context.router.history.push('/mutes'); - } + }; handleHotkeyGoToRequests = () => { this.context.router.history.push('/follow_requests'); - } + }; render () { const { draggingOver } = this.state; |