diff --git a/public/index.html b/public/index.html index 84cd880..e69b874 100644 --- a/public/index.html +++ b/public/index.html @@ -3,7 +3,7 @@ - + <%= htmlWebpackPlugin.options.title %> diff --git a/src/components/console.vue b/src/components/console.vue index 923d80c..7b0a7de 100644 --- a/src/components/console.vue +++ b/src/components/console.vue @@ -21,6 +21,7 @@ export default { methods:{ execCommand(){ commands.methods.renderCommand() + this.$forceUpdate() } } } diff --git a/src/render-commands.js b/src/render-commands.js index d8c3dcf..75b72b9 100644 --- a/src/render-commands.js +++ b/src/render-commands.js @@ -1,4 +1,27 @@ let commands = [ + { + name: "unknown", + output:[ + { + color: "white", + content: "\nthe command you entered is undefined!\n", + delay: 100 + }, + { + color: "white", + content: + "try something like:\n" + + "\n" + + " - Mastodon > social\n" + + " - Gitea > git\n" + + " - Matrix > element\n" + + " - Etherpad > ether\n" + + " - short url > surl\n" + + " - Jitsi > meet\n", + delay: 200 + }, + ] + }, { name: "welcome", output:[ @@ -10,15 +33,15 @@ let commands = [ { color: "green", content: - " __ __\n" + - " /\\ \\ /\\ \\__\n" + - " ____ __ \\_\\ \\____ _____ ____ \\ \\ _\\ ____ __ __ __ ______\n" + - " / ___\\\\ \\/\\ \\\\ __ \\\\ __\\/ __ \\ \\ \\ \\/ / __ \\\\ \\/\\ \\/\\ \\\\ __ \\\n" + - "/\\ \\__/ \\ \\_\\ \\\\ \\_\\ \\\\ \\_/\\ __/ __\\ \\ \\_\\ \\_\\ \\\\ \\/ \\/ / \\ \\/\\ \\\n" + - "\\ \\____\\ \\____ \\\\____/ \\_\\\\ \\____\\/\\_\\\\ \\__\\\\____/ \\__/\\__/ \\ \\_\\ \\_\\\n" + - " \\/____/\\/___/\\ \\___/ \\/_/ \\/____/\\/_/ \\/__//___/ \\/_/\\/_/ \\/_/\\/_/\n" + - " /\\___/\n" + - " \\/__/ @adb.sh\n\n", + " __ __\n" + + " /\\ \\ /\\ \\__\n" + + " ____ __ \\_\\ \\____ _____ ____ \\ \\ _\\ ____ __ __ __ ______\n" + + " / ___\\\\ \\/\\ \\\\ __ \\\\ __\\/ __ \\ \\ \\ \\/ / __ \\\\ \\/\\ \\/\\ \\\\ __ \\\n" + + "/\\ \\__/ \\ \\_\\ \\\\ \\_\\ \\\\ \\_/\\ __/ __\\ \\ \\_\\ \\_\\ \\\\ \\/ \\/ / \\ \\/\\ \\\n" + + "\\ \\____\\ \\____ \\\\____/ \\_\\\\ \\____\\/\\_\\\\ \\__\\\\____/ \\__/\\__/ \\ \\_\\ \\_\\\n" + + " \\/____/\\/___/\\ \\___/ \\/_/ \\/____/\\/_/ \\/__//___/ \\/_/\\/_/ \\/_/\\/_/\n" + + " /\\___/\n" + + " \\/__/ @adb.sh\n\n", delay: 200 }, { @@ -33,9 +56,24 @@ let commands = [ " - short url > surl\n" + " - Jitsi > meet\n", delay: 300 + } + ] + }, + { + name: "social", + output:[ + { + color: "blue", + content: "\nsocial", + delay: 100 + }, + { + color: "white", + content: " is loading\n", + delay: 100 }, ] - } + }, ] let history = [{ @@ -56,6 +94,7 @@ export default { if (input === undefined) input = history[history.length-1].command; input = input.split(" "); let command = commands.find((command) => command.name === input[0]); + if (command === undefined) command = commands[0]; command.output.forEach(group => { /*setTimeout(() => { history[history.length-1].output.push(group); @@ -69,6 +108,4 @@ export default { }) } } -} - -//this.methods.renderCommand("welcome --help") \ No newline at end of file +} \ No newline at end of file