File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8080 cursor : pointer ;
8181 font-weight : 400 ;
8282 text-transform : none ;
83- user-select : none ;
8483
8584 & :active ,
8685 & :hover ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import React from 'react';
88import DropdownMenu from '../DropdownMenu' ;
99import { Menu , MenuItem } from '../Menu' ;
1010import { Button } from '../Button' ;
11- import type { BoxItem } from '../../flowTypes ' ;
11+ import isMobile from '../../util/mobile ' ;
1212import {
1313 PERMISSION_CAN_DOWNLOAD ,
1414 PERMISSION_CAN_RENAME ,
@@ -18,6 +18,7 @@ import {
1818 TYPE_FILE ,
1919 TYPE_WEBLINK
2020} from '../../constants' ;
21+ import type { BoxItem } from '../../flowTypes' ;
2122import './MoreOptionsCell.scss' ;
2223
2324export default (
@@ -53,7 +54,7 @@ export default (
5354 const allowDelete = canDelete && permissions [ PERMISSION_CAN_DELETE ] ;
5455 const allowShare = canShare && permissions [ PERMISSION_CAN_SHARE ] ;
5556 const allowRename = canRename && permissions [ PERMISSION_CAN_RENAME ] ;
56- const allowDownload = canDownload && permissions [ PERMISSION_CAN_DOWNLOAD ] && type === TYPE_FILE ;
57+ const allowDownload = canDownload && permissions [ PERMISSION_CAN_DOWNLOAD ] && type === TYPE_FILE && ! isMobile ( ) ;
5758 const allowed = allowDelete || allowRename || allowDownload || allowPreview || allowShare || allowOpen ;
5859
5960 if ( ! allowed ) {
Original file line number Diff line number Diff line change 11@import ' ../variables' ;
22
3- .buik-btn.buik-btn-plain.buik- item-label {
3+ .buik-item-label {
44 max-width : 290px ;
55 overflow : hidden ;
66 text-overflow : ellipsis ;
Original file line number Diff line number Diff line change 44 line-height : 15px ;
55 overflow : hidden ;
66 text-align : left ;
7+ text-overflow : ellipsis ;
78}
Original file line number Diff line number Diff line change 1616 padding : 0 ;
1717 position : relative ;
1818 text-rendering : optimizeLegibility ;
19+ user-select : none ;
1920 width : 100% ;
2021
2122 @mixin placeholder {
233234 cursor : pointer ;
234235 display : block ;
235236 position : relative ;
236- user-select : none ;
237237
238238 > input {
239239 & [type = ' checkbox' ] {
Original file line number Diff line number Diff line change 1+ /**
2+ * @flow
3+ * @file Helper to get mobile
4+ * @author Box
5+ */
6+
7+ export default function isMobile ( ) {
8+ // Relying on the user agent to avoid desktop browsers on machines with touch screens.
9+ return / i p h o n e | i p a d | i p o d | a n d r o i d | b l a c k b e r r y | b b 1 0 | m i n i | w i n d o w s \s c e | p a l m / i. test ( navigator . userAgent ) ;
10+ }
You can’t perform that action at this time.
0 commit comments