diff --git a/media/img/folder-no-write-20.png b/media/img/folder-no-write-20.png deleted file mode 100644 index aec25f54d6..0000000000 Binary files a/media/img/folder-no-write-20.png and /dev/null differ diff --git a/media/img/lib-16.png b/media/img/lib-16.png deleted file mode 100644 index 1655a569df..0000000000 Binary files a/media/img/lib-16.png and /dev/null differ diff --git a/media/img/lib/24/lib-encrypted.png b/media/img/lib/24/lib-encrypted.png index de6c8a03a2..9b3ef71a16 100644 Binary files a/media/img/lib/24/lib-encrypted.png and b/media/img/lib/24/lib-encrypted.png differ diff --git a/media/img/lib/24/lib-readonly.png b/media/img/lib/24/lib-readonly.png index aec25f54d6..0b655a98f7 100644 Binary files a/media/img/lib/24/lib-readonly.png and b/media/img/lib/24/lib-readonly.png differ diff --git a/media/img/lib/24/lib.png b/media/img/lib/24/lib.png index c634103388..e0ffc010fb 100644 Binary files a/media/img/lib/24/lib.png and b/media/img/lib/24/lib.png differ diff --git a/media/img/lib/256/lib-encrypted.png b/media/img/lib/256/lib-encrypted.png new file mode 100755 index 0000000000..2d35e94e7c Binary files /dev/null and b/media/img/lib/256/lib-encrypted.png differ diff --git a/media/img/lib/256/lib-readonly.png b/media/img/lib/256/lib-readonly.png new file mode 100755 index 0000000000..e96153913f Binary files /dev/null and b/media/img/lib/256/lib-readonly.png differ diff --git a/media/img/lib/256/lib.png b/media/img/lib/256/lib.png new file mode 100755 index 0000000000..8b2a51026d Binary files /dev/null and b/media/img/lib/256/lib.png differ diff --git a/media/img/lib/48/lib-encrypted.png b/media/img/lib/48/lib-encrypted.png new file mode 100644 index 0000000000..1626d789a4 Binary files /dev/null and b/media/img/lib/48/lib-encrypted.png differ diff --git a/media/img/lib/48/lib-readonly.png b/media/img/lib/48/lib-readonly.png new file mode 100644 index 0000000000..9185b6b753 Binary files /dev/null and b/media/img/lib/48/lib-readonly.png differ diff --git a/media/img/lib/48/lib.png b/media/img/lib/48/lib.png new file mode 100644 index 0000000000..ac0f59f9ea Binary files /dev/null and b/media/img/lib/48/lib.png differ diff --git a/media/img/lib/96/lib-encrypted.png b/media/img/lib/96/lib-encrypted.png deleted file mode 100644 index 13918387d9..0000000000 Binary files a/media/img/lib/96/lib-encrypted.png and /dev/null differ diff --git a/media/img/lib/96/lib-readonly.png b/media/img/lib/96/lib-readonly.png deleted file mode 100644 index a3f9b9a41d..0000000000 Binary files a/media/img/lib/96/lib-readonly.png and /dev/null differ diff --git a/media/img/lib/96/lib.png b/media/img/lib/96/lib.png deleted file mode 100644 index 53c5873e7c..0000000000 Binary files a/media/img/lib/96/lib.png and /dev/null differ diff --git a/media/img/sync-folder-20.png b/media/img/sync-folder-20.png deleted file mode 100644 index c634103388..0000000000 Binary files a/media/img/sync-folder-20.png and /dev/null differ diff --git a/media/img/sync-folder-encrypt-20.png b/media/img/sync-folder-encrypt-20.png deleted file mode 100644 index de6c8a03a2..0000000000 Binary files a/media/img/sync-folder-encrypt-20.png and /dev/null differ diff --git a/seahub/institutions/templates/institutions/user_info.html b/seahub/institutions/templates/institutions/user_info.html index 3bfbd95890..3ba3bd604f 100644 --- a/seahub/institutions/templates/institutions/user_info.html +++ b/seahub/institutions/templates/institutions/user_info.html @@ -72,9 +72,9 @@ {% for repo in owned_repos %} {% if repo.encrypted %} - {% trans + {% trans {% else %} - {% trans + {% trans {% endif %} {% if not repo.name %} diff --git a/seahub/templates/js/templates.html b/seahub/templates/js/templates.html index 02b9eabd58..0db6236946 100644 --- a/seahub/templates/js/templates.html +++ b/seahub/templates/js/templates.html @@ -1512,9 +1512,9 @@ <% if (encrypted) { %> - {% trans + {% trans <% } else { %> - {% trans + {% trans <% } %> <%- name %> diff --git a/seahub/templates/sysadmin/sys_org_info_library.html b/seahub/templates/sysadmin/sys_org_info_library.html index 37b3c12e1a..4ea402f03a 100644 --- a/seahub/templates/sysadmin/sys_org_info_library.html +++ b/seahub/templates/sysadmin/sys_org_info_library.html @@ -24,9 +24,9 @@ {% for repo in org_repos %} {% if repo.encrypted %} - {% trans + {% trans {% else %} - {% trans + {% trans {% endif %} {{ repo.name }} {{ repo.id }} diff --git a/seahub/templates/sysadmin/userinfo.html b/seahub/templates/sysadmin/userinfo.html index 33bfb70b8a..84856c283e 100644 --- a/seahub/templates/sysadmin/userinfo.html +++ b/seahub/templates/sysadmin/userinfo.html @@ -156,9 +156,9 @@ {% for repo in owned_repos %} {% if repo.encrypted %} - {% trans + {% trans {% else %} - {% trans + {% trans {% endif %} {% if not repo.name %} @@ -205,11 +205,11 @@ {% for repo in in_repos %} {% if repo.encrypted %} - {% trans + {% trans {% elif repo.permission == 'r' %} - {% trans + {% trans {% else %} - {% trans + {% trans {% endif %} {% if enable_sys_admin_view_repo %} {{ repo.name }} diff --git a/static/scripts/app/views/deleted-repo.js b/static/scripts/app/views/deleted-repo.js index 16f4817248..087c7ad9c7 100644 --- a/static/scripts/app/views/deleted-repo.js +++ b/static/scripts/app/views/deleted-repo.js @@ -24,7 +24,7 @@ define([ render: function() { var obj = this.model.toJSON(); - var icon_size = Common.isHiDPI() ? 96 : 24; + var icon_size = Common.isHiDPI() ? 48 : 24; var icon_url = this.model.getIconUrl(icon_size); var m = Moment(this.model.get('del_time')); var tmpl; diff --git a/static/scripts/app/views/group-repo.js b/static/scripts/app/views/group-repo.js index 35ceb6a05b..d8f53c09d7 100644 --- a/static/scripts/app/views/group-repo.js +++ b/static/scripts/app/views/group-repo.js @@ -33,7 +33,7 @@ define([ render: function() { var obj = this.model.toJSON(); - var icon_size = Common.isHiDPI() ? 96 : 24; + var icon_size = Common.isHiDPI() ? 48 : 24; var icon_url = this.model.getIconUrl(icon_size); var tmpl = $(window).width() >= 768 ? this.template : this.mobileTemplate; $.extend(obj, { diff --git a/static/scripts/app/views/organization-repo.js b/static/scripts/app/views/organization-repo.js index c7444bb303..3a7483c595 100644 --- a/static/scripts/app/views/organization-repo.js +++ b/static/scripts/app/views/organization-repo.js @@ -19,7 +19,7 @@ define([ render: function() { var obj = this.model.toJSON(); - var icon_size = Common.isHiDPI() ? 96 : 24; + var icon_size = Common.isHiDPI() ? 48 : 24; var icon_url = this.model.getIconUrl(icon_size); var tmpl = $(window).width() >= 768 ? this.template : this.mobileTemplate; _.extend(obj, { diff --git a/static/scripts/app/views/repo.js b/static/scripts/app/views/repo.js index d0ee414ad0..766b453bd3 100644 --- a/static/scripts/app/views/repo.js +++ b/static/scripts/app/views/repo.js @@ -49,7 +49,7 @@ define([ render: function() { var obj = this.model.toJSON(); - var icon_size = Common.isHiDPI() ? 96 : 24; + var icon_size = Common.isHiDPI() ? 48 : 24; var icon_url = this.model.getIconUrl(icon_size); var tmpl, dropdownOptions = {}; if ($(window).width() >= 768) { @@ -331,10 +331,10 @@ define([ viewDetails: function() { var obj = this.model.toJSON(); - var icon_size = Common.isHiDPI() ? 96 : 24; + var icon_size = Common.isHiDPI() ? 48 : 24; var data = $.extend({}, obj, { icon_url: this.model.getIconUrl(icon_size), - big_icon_url: this.model.getIconUrl(96) + big_icon_url: this.model.getIconUrl() }); var detailsView = this.myReposView.repoDetailsView; detailsView.show(data); diff --git a/static/scripts/app/views/share-admin-repo.js b/static/scripts/app/views/share-admin-repo.js index 9c848a48af..72ab086319 100644 --- a/static/scripts/app/views/share-admin-repo.js +++ b/static/scripts/app/views/share-admin-repo.js @@ -104,7 +104,7 @@ define([ render: function() { var obj = this.model.toJSON(), - icon_size = Common.isHiDPI() ? 96 : 24, + icon_size = Common.isHiDPI() ? 48 : 24, icon_url = this.model.getIconUrl(icon_size); _.extend(obj, { diff --git a/static/scripts/app/views/shared-repo.js b/static/scripts/app/views/shared-repo.js index d859b7c5ef..00543b5bbc 100644 --- a/static/scripts/app/views/shared-repo.js +++ b/static/scripts/app/views/shared-repo.js @@ -47,7 +47,7 @@ define([ render: function() { var obj = this.model.toJSON(); - var icon_size = Common.isHiDPI() ? 96 : 24; + var icon_size = Common.isHiDPI() ? 48 : 24; var icon_url = this.model.getIconUrl(icon_size); var tmpl = $(window).width() >= 768 ? this.template : this.mobileTemplate; _.extend(obj, { diff --git a/static/scripts/common.js b/static/scripts/common.js index 26e0da88a1..624ef00ef2 100644 --- a/static/scripts/common.js +++ b/static/scripts/common.js @@ -295,23 +295,20 @@ 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"; - } + + // icon name + var icon_name = 'lib.png'; + if (is_encrypted) { + icon_name = 'lib-encrypted.png'; } + if (is_readonly) { + icon_name = 'lib-readonly.png'; + } + + // icon size + var icon_size = size || 256; // 'size' can be 24, 48, or undefined. (2017.7.31) + + return app.config.mediaUrl + 'img/lib/' + icon_size + '/' + icon_name; }, getLibIconTitle: function(is_encrypted, is_readonly) { diff --git a/static/scripts/sysadmin-app/views/group-repo.js b/static/scripts/sysadmin-app/views/group-repo.js index b47fbffbb5..bdd51a5bef 100644 --- a/static/scripts/sysadmin-app/views/group-repo.js +++ b/static/scripts/sysadmin-app/views/group-repo.js @@ -56,7 +56,7 @@ define([ render: function() { var data = this.model.toJSON(), - icon_size = Common.isHiDPI() ? 96 : 24, + icon_size = Common.isHiDPI() ? 48 : 24, icon_url = this.model.getIconUrl(icon_size); data['icon_url'] = icon_url; diff --git a/static/scripts/sysadmin-app/views/repo.js b/static/scripts/sysadmin-app/views/repo.js index 7f54c87188..67c0eaa0fe 100644 --- a/static/scripts/sysadmin-app/views/repo.js +++ b/static/scripts/sysadmin-app/views/repo.js @@ -153,7 +153,7 @@ define([ render: function() { var data = this.model.toJSON(), - icon_size = Common.isHiDPI() ? 96 : 24, + icon_size = Common.isHiDPI() ? 48 : 24, icon_url = this.model.getIconUrl(icon_size), last_accessed = Moment(data['last_accessed']); diff --git a/static/scripts/sysadmin-app/views/trash-repo.js b/static/scripts/sysadmin-app/views/trash-repo.js index b716d5fa6f..20687b2f46 100644 --- a/static/scripts/sysadmin-app/views/trash-repo.js +++ b/static/scripts/sysadmin-app/views/trash-repo.js @@ -84,7 +84,7 @@ define([ render: function() { var data = this.model.toJSON(), - icon_size = Common.isHiDPI() ? 96 : 24, + icon_size = Common.isHiDPI() ? 48 : 24, icon_url = this.model.getIconUrl(icon_size), delete_time = Moment(data['delete_time']);