ui: make protected column header use the icon only

to avoid using to much space, as the icon appears on hitting "change
protection" and the tooltip is set to "Protected" it should be still
quite clear.

Further UX improvement can be made by adding a context menu with can
use words for all actions

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-11-16 13:22:26 +01:00
parent bc54c47377
commit 528c24b569
2 changed files with 8 additions and 6 deletions

View File

@ -330,9 +330,10 @@ Ext.define('PVE.grid.BackupView', {
renderer: Ext.htmlEncode,
},
{
header: gettext('Protected'),
width: 100,
renderer: (value) => value ? '<i class="fa fa-shield"></i>' : '',
header: `<i class="fa fa-shield"></i>`,
tooltip: gettext('Protected'),
width: 30,
renderer: v => v ? `<i data-qtip="${gettext('Protected')}" class="fa fa-shield"></i>` : '',
sorter: (a, b) => (b.data.protected || 0) - (a.data.protected || 0),
dataIndex: 'protected',
},

View File

@ -161,9 +161,10 @@ Ext.define('PVE.storage.ContentView', {
dataIndex: 'notes',
},
'protected': {
header: gettext('Protected'),
width: 100,
renderer: (value) => value ? '<i class="fa fa-shield"></i>' : '',
header: `<i class="fa fa-shield"></i>`,
tooltip: gettext('Protected'),
width: 30,
renderer: v => v ? `<i data-qtip="${gettext('Protected')}" class="fa fa-shield"></i>` : '',
sorter: (a, b) => (b.data.protected || 0) - (a.data.protected || 0),
dataIndex: 'protected',
},