diff options
author | Cutls <web-pro@cutls.com> | 2022-11-12 05:19:48 +0900 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-11-12 13:59:03 +0100 |
commit | e2315876f4c7bf591c535f10628fe6e145505a84 (patch) | |
tree | afe20a8863e222b9cff18b292b4a6446708fed4d /app/javascript/flavours/glitch/features | |
parent | 8ac4165c721cf1c70d1d682e183b169230326f36 (diff) |
[Glitch] Do not show drag&drop dialog when not logined
Port 553b169d483e9b2f28007e130a494aec08a1720a to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features')
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/index.js b/app/javascript/flavours/glitch/features/ui/index.js index 3d385eee2..72e13d9d6 100644 --- a/app/javascript/flavours/glitch/features/ui/index.js +++ b/app/javascript/flavours/glitch/features/ui/index.js @@ -303,7 +303,7 @@ class UI extends React.Component { this.dragTargets.push(e.target); } - if (e.dataTransfer && e.dataTransfer.types.includes('Files') && this.props.canUploadMore) { + if (e.dataTransfer && e.dataTransfer.types.includes('Files') && this.props.canUploadMore && this.context.identity.signedIn) { this.setState({ draggingOver: true }); } } @@ -330,7 +330,7 @@ class UI extends React.Component { this.setState({ draggingOver: false }); this.dragTargets = []; - if (e.dataTransfer && e.dataTransfer.files.length >= 1 && this.props.canUploadMore) { + if (e.dataTransfer && e.dataTransfer.files.length >= 1 && this.props.canUploadMore && this.context.identity.signedIn) { this.props.dispatch(uploadCompose(e.dataTransfer.files)); } } |