From 57aeac53d9a898c7e17e7e443356e614e46e4aef Mon Sep 17 00:00:00 2001 From: adb Date: Fri, 12 Feb 2021 04:04:23 +0100 Subject: [PATCH] add time and date --- src/components/console.vue | 1 + src/render-commands.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/components/console.vue b/src/components/console.vue index 49347b9..f817223 100644 --- a/src/components/console.vue +++ b/src/components/console.vue @@ -92,6 +92,7 @@ export default { .white{color: #fff;} .green{color: #44dd88;} .blue{color: #0081b1;} + .red{color: #ac311c;} input{ background-color: #0000; border: 0; diff --git a/src/render-commands.js b/src/render-commands.js index 9c3d31a..03b304b 100644 --- a/src/render-commands.js +++ b/src/render-commands.js @@ -82,6 +82,20 @@ let commands = [ {color: "white", content: "meet", delay: 500}, ] }, + { + name: "time", + output(){ return[ + {color: "white", content: "your current time is: ", delay: 100}, + {color: "blue", content: function(){return new Date().toLocaleTimeString()}(), delay: 200}, + ]} + }, + { + name: "date", + output(){ return[ + {color: "white", content: "your current date is: ", delay: 100}, + {color: "blue", content: function(){return new Date().toLocaleDateString()}(), delay: 200}, + ]} + }, { name: ["social", "mastodon", "Mastodon", "mstdn"], output:[