From 572e87c903c749a78ef22b7e521b964b97cc5b28 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Tue, 1 Mar 2016 18:18:12 +0100 Subject: Show folders first --- app/js/app.js | 1 + 1 file changed, 1 insertion(+) (limited to 'app') diff --git a/app/js/app.js b/app/js/app.js index c942e60..4f84ea2 100644 --- a/app/js/app.js +++ b/app/js/app.js @@ -81,6 +81,7 @@ function loadDirectory(filePath) { if (error) return console.error(error); if (result.statusCode === 401) return logout(); + result.body.entries.sort(function (a, b) { return a.isDirectory && b.isFile ? -1 : 1 }); app.entries = result.body.entries.map(function (entry) { entry.previewUrl = getPreviewUrl(entry, filePath); return entry; -- cgit v1.2.3