force reload, add fallback (unknown), add social

master
adb 3 years ago
parent 7603345384
commit 4482c4673b

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="viewport" content="width=device-width,initial-scale=8.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>

@ -21,6 +21,7 @@ export default {
methods:{
execCommand(){
commands.methods.renderCommand()
this.$forceUpdate()
}
}
}

@ -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")
}
Loading…
Cancel
Save