1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 14:42:10 +00:00

Merge pull request #1059 from haiwen/lib-icon

Improve library icon
This commit is contained in:
llj
2016-03-14 12:18:14 +08:00
14 changed files with 82 additions and 43 deletions

View File

@@ -227,6 +227,26 @@ define([
}
},
getLibIconUrl: function(is_encrypted, is_readonly, size) {
if (size > 24) {
if (is_encrypted) {
return app.config.mediaUrl + "img/lib/96/lib-encrypted.png";
} else if (is_readonly) {
return app.config.mediaUrl + "img/lib/96/lib-readonly.png";
} else {
return app.config.mediaUrl + "img/lib/96/lib.png";
}
} else {
if (is_encrypted) {
return app.config.mediaUrl + "img/lib/24/lib-encrypted.png";
} else if (is_readonly) {
return app.config.mediaUrl + "img/lib/24/lib-readonly.png";
} else {
return app.config.mediaUrl + "img/lib/24/lib.png";
}
}
},
isHiDPI: function() {
var pixelRatio = window.devicePixelRatio ? window.devicePixelRatio : 1;
if (pixelRatio > 1) {