diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c94137..03cec29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ -## Cockpit Navigator 0.5.6-1 +## Cockpit Navigator 0.5.7-1 -* Fix mangling of large files during upload. \ No newline at end of file +* Fix bug where loading spinner doesn't go away after upload dialog is cancelled. +* Add modification and creation time columns and allow sorting by them. \ No newline at end of file diff --git a/README.md b/README.md index 4a5d543..d07bde4 100644 --- a/README.md +++ b/README.md @@ -23,17 +23,17 @@ With no command line use needed, you can: # Installation ## From Github Release ### Ubuntu -1. `$ wget https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.6/cockpit-navigator_0.5.6-1focal_all.deb` -1. `# apt install ./cockpit-navigator_0.5.6-1focal_all.deb` +1. `$ wget https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.7/cockpit-navigator_0.5.7-1focal_all.deb` +1. `# apt install ./cockpit-navigator_0.5.7-1focal_all.deb` ### EL7 -1. `# yum install https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.6/cockpit-navigator-0.5.6-1.el7.noarch.rpm` +1. `# yum install https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.7/cockpit-navigator-0.5.7-1.el7.noarch.rpm` ### EL8 -1. `# dnf install https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.6/cockpit-navigator-0.5.6-1.el8.noarch.rpm` +1. `# dnf install https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.7/cockpit-navigator-0.5.7-1.el8.noarch.rpm` ## From Source 1. Ensure dependencies are installed: `cockpit`, `python3`, `rsync`, `zip`. 1. `$ git clone https://github.com/45Drives/cockpit-navigator.git` 1. `$ cd cockpit-navigator` -1. `$ git checkout ` (v0.5.6 is latest) +1. `$ git checkout ` (v0.5.7 is latest) 1. `# make install` ## From 45Drives Repositories ### Automatic Repo Setup with Script diff --git a/manifest.json b/manifest.json index 54ea047..5a82a26 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "name": "cockpit-navigator", "title": "Cockpit Navigator", "prerelease": false, - "version": "0.5.6", + "version": "0.5.7", "buildVersion": "1", "author": "Josh Boudreau ", "url": "https://github.com/45Drives/cockpit-navigator", @@ -54,7 +54,7 @@ ], "changelog": { "urgency": "medium", - "version": "0.5.6", + "version": "0.5.7", "buildVersion": "1", "ignore": [], "date": null, diff --git a/navigator/components/NavDragDrop.js b/navigator/components/NavDragDrop.js index 31fea20..62f7941 100644 --- a/navigator/components/NavDragDrop.js +++ b/navigator/components/NavDragDrop.js @@ -47,9 +47,10 @@ export class NavDragDrop { uploader.using_webkit = false; uploads.push(uploader); } - uploads = await this.handle_conflicts(uploads); - this.upload_manager.add(... uploads); - this.nav_window_ref.stop_load(); + if (uploads.length) { + uploads = await this.handle_conflicts(uploads); + this.upload_manager.add(... uploads); + } } document.getElementById("nav-upload-btn").addEventListener("click", this.upload_dialog.bind(this)); } @@ -213,7 +214,6 @@ export class NavDragDrop { } upload_dialog() { - this.nav_window_ref.start_load(); this.upload_element.click(); } } diff --git a/navigator/components/NavEntry.js b/navigator/components/NavEntry.js index 2ea2ee3..3e80ca0 100644 --- a/navigator/components/NavEntry.js +++ b/navigator/components/NavEntry.js @@ -73,18 +73,30 @@ export class NavEntry { let owner = document.createElement("div"); let group = document.createElement("div"); let size = document.createElement("div"); + let modified = document.createElement("div"); + let created = document.createElement("div"); mode.title = mode.innerText = this.stat["mode-str"]; owner.title = owner.innerText = this.stat["owner"]; group.title = group.innerText = this.stat["group"]; size.title = size.innerText = format_bytes(this.stat["size"]); + modified.title = modified.innerText = format_time(this.stat["mtime"]); + created.title = created.innerText = format_time(this.stat["ctime"]); mode.classList.add("nav-item-title", "no-select", "monospace-sm"); owner.classList.add("nav-item-title", "no-select"); group.classList.add("nav-item-title", "no-select"); size.classList.add("nav-item-title", "no-select"); + modified.classList.add("nav-item-title", "no-select"); + created.classList.add("nav-item-title", "no-select"); + modified.style.flexGrow = 2; + modified.style.flexBasis = 0; + created.style.flexGrow = 2; + created.style.flexBasis = 0; this.dom_element.appendChild(mode); this.dom_element.appendChild(owner); this.dom_element.appendChild(group); this.dom_element.appendChild(size); + this.dom_element.appendChild(modified); + this.dom_element.appendChild(created); } this.visible = true; } diff --git a/navigator/components/SortFunctions.js b/navigator/components/SortFunctions.js index e6f322d..f4837ad 100644 --- a/navigator/components/SortFunctions.js +++ b/navigator/components/SortFunctions.js @@ -24,9 +24,11 @@ export class SortFunctions { owner: "asc", group: "asc", size: "asc", + modified: "asc", + created: "asc", } this.icons = {}; - for (let option of ["name", "owner", "group", "size"]) { + for (let option of ["name", "owner", "group", "size", "modified", "created"]) { this.icons[option] = document.getElementById(`sort-${option}-icon`); } this.current_choice = "name"; @@ -90,4 +92,20 @@ export class SortFunctions { size_desc(first, second) { return second.stat["size"] - first.stat["size"]; } + + modified_asc(first, second) { + return first.stat["mtime"] - second.stat["mtime"]; + } + + modified_desc(first, second) { + return second.stat["mtime"] - first.stat["mtime"]; + } + + created_asc(first, second) { + return first.stat["ctime"] - second.stat["ctime"]; + } + + created_desc(first, second) { + return second.stat["ctime"] - first.stat["ctime"]; + } } diff --git a/navigator/index.html b/navigator/index.html index 71a5eb9..a8aee2d 100644 --- a/navigator/index.html +++ b/navigator/index.html @@ -75,10 +75,12 @@