summary refs log tree commit diff
path: root/v2
diff options
context:
space:
mode:
Diffstat (limited to 'v2')
-rw-r--r--v2/client.ts3
-rw-r--r--v2/screen.ts4
2 files changed, 4 insertions, 3 deletions
diff --git a/v2/client.ts b/v2/client.ts
index 16358c8..3e09f7e 100644
--- a/v2/client.ts
+++ b/v2/client.ts
@@ -1,3 +1,4 @@
+
 import { Screen } from "./screen.ts";
 import type { Text } from "./elements.ts";
 import strftime from "./strftime.js";
@@ -35,7 +36,7 @@ export async function login(username: string, password: string) {
         screen.logs.push("INC: " + JSON.stringify(data))
         if(data.cmd != "post") return;
         home.push(data.val);
-        const textHome: string[] = home.map(p => `[${strftime("%H:%M:%S")}] ${p.u}: ${p.p}`);
+        const textHome: string[] = home.map(p => `[${strftime("%H:%M:%S", new Date(p.t.e * 1000))}] ${p.u}: ${p.p}`);
         const homeElem: Text = screen.elements.get("home") as Text;
         homeElem.text = textHome.join("\n")+"\n";
         screen.render()        
diff --git a/v2/screen.ts b/v2/screen.ts
index 99cc5a2..5e09d57 100644
--- a/v2/screen.ts
+++ b/v2/screen.ts
@@ -34,12 +34,12 @@ export class Screen {
             process.exit();
         }
         
-        if (['up', 'left'].includes(key.name)) {
+        if (['up', 'left'].includes(key.name) || key.name == "tab" && key.shift) {
             // logs.push(`Got up key, moving focus upward ${focusedIndex} ${(focusedIndex - 1) % focusableIDs.length}`)
             screen.focus(focusableIDs[(focusedIndex - 1) % focusableIDs.length]);
             return screen.render()
         }
-        if (['down', 'right'].includes(key.name)) {
+        if (['down', 'right'].includes(key.name) || key.name == "tab" && !key.shift) {
             // logs.push(`Got down key, moving focus downward ${focusedIndex} ${(focusedIndex + 1) % focusableIDs.length}`)
             screen.focus(focusableIDs[(focusedIndex + 1) % focusableIDs.length]);
             return screen.render()