Backlog of miscellaneous fixes.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3234 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2016-06-02 23:01:55 +00:00
parent fb94e1cde9
commit dca3ad9b79
7 changed files with 96 additions and 26 deletions

View File

@ -1,16 +1,6 @@
"use strict";
function fileList(settings) {
terminal.setEcho(false);
terminal.clear();
terminal.print(settings.title);
if (core.user.credentials
&& core.user.credentials.permissions
&& core.user.credentials.permissions.authenticated) {
terminal.print({command: "new"});
}
let prefix = settings.prefix || "";
let makeSaveCallback = function(oldName, oldValue) {
@ -39,6 +29,16 @@ function fileList(settings) {
core.register("hashChange", hashChange);
return database.getAll().then(function(entries) {
terminal.cork();
terminal.setEcho(false);
terminal.clear();
terminal.print(settings.title);
if (core.user.credentials
&& core.user.credentials.permissions
&& core.user.credentials.permissions.authenticated) {
terminal.print({command: "new"});
}
terminal.readLine().then(function(input) {
if (input == "new") {
terminal.setHash(name);
@ -97,6 +97,7 @@ function fileList(settings) {
}
}
}
terminal.uncork();
});
}