force reload, add fallback (unknown), add social
This commit is contained in:
parent
7603345384
commit
4482c4673b
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<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">
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||||
</head>
|
</head>
|
||||||
|
@ -21,6 +21,7 @@ export default {
|
|||||||
methods:{
|
methods:{
|
||||||
execCommand(){
|
execCommand(){
|
||||||
commands.methods.renderCommand()
|
commands.methods.renderCommand()
|
||||||
|
this.$forceUpdate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,27 @@
|
|||||||
let commands = [
|
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",
|
name: "welcome",
|
||||||
output:[
|
output:[
|
||||||
@ -10,15 +33,15 @@ let commands = [
|
|||||||
{
|
{
|
||||||
color: "green",
|
color: "green",
|
||||||
content:
|
content:
|
||||||
" __ __\n" +
|
" __ __\n" +
|
||||||
" /\\ \\ /\\ \\__\n" +
|
" /\\ \\ /\\ \\__\n" +
|
||||||
" ____ __ \\_\\ \\____ _____ ____ \\ \\ _\\ ____ __ __ __ ______\n" +
|
" ____ __ \\_\\ \\____ _____ ____ \\ \\ _\\ ____ __ __ __ ______\n" +
|
||||||
" / ___\\\\ \\/\\ \\\\ __ \\\\ __\\/ __ \\ \\ \\ \\/ / __ \\\\ \\/\\ \\/\\ \\\\ __ \\\n" +
|
" / ___\\\\ \\/\\ \\\\ __ \\\\ __\\/ __ \\ \\ \\ \\/ / __ \\\\ \\/\\ \\/\\ \\\\ __ \\\n" +
|
||||||
"/\\ \\__/ \\ \\_\\ \\\\ \\_\\ \\\\ \\_/\\ __/ __\\ \\ \\_\\ \\_\\ \\\\ \\/ \\/ / \\ \\/\\ \\\n" +
|
"/\\ \\__/ \\ \\_\\ \\\\ \\_\\ \\\\ \\_/\\ __/ __\\ \\ \\_\\ \\_\\ \\\\ \\/ \\/ / \\ \\/\\ \\\n" +
|
||||||
"\\ \\____\\ \\____ \\\\____/ \\_\\\\ \\____\\/\\_\\\\ \\__\\\\____/ \\__/\\__/ \\ \\_\\ \\_\\\n" +
|
"\\ \\____\\ \\____ \\\\____/ \\_\\\\ \\____\\/\\_\\\\ \\__\\\\____/ \\__/\\__/ \\ \\_\\ \\_\\\n" +
|
||||||
" \\/____/\\/___/\\ \\___/ \\/_/ \\/____/\\/_/ \\/__//___/ \\/_/\\/_/ \\/_/\\/_/\n" +
|
" \\/____/\\/___/\\ \\___/ \\/_/ \\/____/\\/_/ \\/__//___/ \\/_/\\/_/ \\/_/\\/_/\n" +
|
||||||
" /\\___/\n" +
|
" /\\___/\n" +
|
||||||
" \\/__/ @adb.sh\n\n",
|
" \\/__/ @adb.sh\n\n",
|
||||||
delay: 200
|
delay: 200
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -33,9 +56,24 @@ let commands = [
|
|||||||
" - short url > surl\n" +
|
" - short url > surl\n" +
|
||||||
" - Jitsi > meet\n",
|
" - Jitsi > meet\n",
|
||||||
delay: 300
|
delay: 300
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "social",
|
||||||
|
output:[
|
||||||
|
{
|
||||||
|
color: "blue",
|
||||||
|
content: "\nsocial",
|
||||||
|
delay: 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
color: "white",
|
||||||
|
content: " is loading\n",
|
||||||
|
delay: 100
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
let history = [{
|
let history = [{
|
||||||
@ -56,6 +94,7 @@ export default {
|
|||||||
if (input === undefined) input = history[history.length-1].command;
|
if (input === undefined) input = history[history.length-1].command;
|
||||||
input = input.split(" ");
|
input = input.split(" ");
|
||||||
let command = commands.find((command) => command.name === input[0]);
|
let command = commands.find((command) => command.name === input[0]);
|
||||||
|
if (command === undefined) command = commands[0];
|
||||||
command.output.forEach(group => {
|
command.output.forEach(group => {
|
||||||
/*setTimeout(() => {
|
/*setTimeout(() => {
|
||||||
history[history.length-1].output.push(group);
|
history[history.length-1].output.push(group);
|
||||||
@ -69,6 +108,4 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//this.methods.renderCommand("welcome --help")
|
|
Loading…
Reference in New Issue
Block a user