ui: rework DataStore content Panel

instead of having the files as a column, put the files into the tree
as a third level

with this, we can move the actions into an action column and remove
the top buttons (except reload)

clicking the download action now downloads directly, so we would
not need the download window anymore

clicking the browse action, opens the pxar browser like before,
but expands and selects (&focus) the selected pxar file

also changes the icon of 'signed' to the one to locked
but color codes them (singed => greyed out, encrypted => green),
similar to what browsers do/did for certificates

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2020-07-23 13:03:49 +02:00
committed by Dietmar Maurer
parent bccdc5fa04
commit 3e395378bc
4 changed files with 159 additions and 133 deletions

View File

@ -145,7 +145,16 @@ Ext.define("PBS.window.FileBrowser", {
store.load(() => {
let root = store.getRoot();
root.expand(); // always expand invisible root node
if (root.childNodes.length === 1) {
if (view.archive) {
let child = root.findChild('text', view.archive);
if (child) {
child.expand();
setTimeout(function() {
tree.setSelection(child);
tree.getView().focusRow(child);
}, 10);
}
} else if (root.childNodes.length === 1) {
root.firstChild.expand();
}
});