let commands = [ { name: "welcome", output:[ { color: "white", content: "\nWelcome to:\n", delay: 100 }, { color: "green", content: " __ __\n" + " /\\ \\ /\\ \\__\n" + " ___ __ __\\ \\ \\____ _____ ____ \\ \\ _\\ ____ __ __ __ ______\n" + " / ___\\/\\ \\/\\ \\\\ \\ __ \\/\\ __\\/ __ \\ \\ \\ \\/ / __ \\/\\ \\/\\ \\/\\ \\/\\ __ \\\n" + "/\\ \\__/\\ \\ \\_\\ \\\\ \\ \\_\\ \\ \\ \\_/\\ __/ __\\ \\ \\_/\\ \\_\\ \\ \\ \\_\\ \\_\\ \\ \\ \\/\\ \\\n" + "\\ \\____\\\\ \\____ \\\\ \\____/\\ \\_\\\\ \\____\\/\\_\\\\ \\__\\ \\____/\\ \\________/\\ \\_\\ \\_\\\n" + " \\/____/ \\/___/\\ \\\\/___/ \\/_/ \\/____/\\/_/ \\/__/\\/___/ \\/_______/ \\/_/\\/_/\n" + " /\\___/\n" + " \\/__/ @adb.sh\n\n", delay: 200 }, { color: "white", content: "free services on this server:\n" + "\n" + " - Mastodon > social\n" + " - Gitea > git\n" + " - Matrix > element\n" + " - Etherpad > ether\n" + " - short url > surl\n" + " - Jitsi > meet\n", delay: 300 }, ] } ] let history = [{ host: "[cybre.town]$ ", command: "welcome --help", output: [] }] export default { data(){ return { commands, history } }, methods:{ renderCommand(input){ if (input === undefined) input = history[history.length-1].command; input = input.split(" "); let command = commands.find((command) => command.name === input[0]); command.output.forEach(group => { /*setTimeout(() => { history[history.length-1].output.push(group); }, group.delay)*/ history[history.length-1].output.push(group); }) history.push({ host: "[cybre.town]$ ", command: "", output: [] }) } } } //this.methods.renderCommand("welcome --help")