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

Improve library icon

This commit is contained in:
Daniel Pan
2016-03-11 12:10:55 +08:00
parent 565c05ee66
commit 0931bd0103
14 changed files with 66 additions and 22 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) {