1
0
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:
llj
2019-08-14 15:10:58 +08:00
committed by Daniel Pan
parent 8dc7c950a3
commit 8839207207
7 changed files with 197 additions and 64 deletions

View File

@@ -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;