mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 08:28:11 +00:00
[share admin] libraries: added support for mobile (#3981)
* and 'bugfix & improvement'
This commit is contained in:
@@ -33,6 +33,10 @@ export const Utils = {
|
||||
}
|
||||
},
|
||||
|
||||
isDesktop: function() {
|
||||
return window.innerWidth >= 768;
|
||||
},
|
||||
|
||||
FILEEXT_ICON_MAP: {
|
||||
|
||||
// text file
|
||||
@@ -90,7 +94,7 @@ export const Utils = {
|
||||
},
|
||||
|
||||
// check if a file is an image
|
||||
imageCheck: function (filename) {
|
||||
imageCheck: function(filename) {
|
||||
// no file ext
|
||||
if (filename.lastIndexOf('.') == -1) {
|
||||
return false;
|
||||
@@ -119,7 +123,7 @@ export const Utils = {
|
||||
},
|
||||
|
||||
// check if a file is a video
|
||||
videoCheck: function (filename) {
|
||||
videoCheck: function(filename) {
|
||||
// no file ext
|
||||
if (filename.lastIndexOf('.') == -1) {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user