|
|
@ -24,7 +24,7 @@ let commands = [
|
|
|
|
{color: "white", content: "\nWelcome to:\n", delay: 100},
|
|
|
|
{color: "white", content: "\nWelcome to:\n", delay: 100},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
color: "green",
|
|
|
|
color: "green",
|
|
|
|
content(){
|
|
|
|
content: function (){
|
|
|
|
let fontSize = window.getComputedStyle(document.body,null).fontSize.split("px")[0];
|
|
|
|
let fontSize = window.getComputedStyle(document.body,null).fontSize.split("px")[0];
|
|
|
|
return window.innerWidth/fontSize<35?
|
|
|
|
return window.innerWidth/fontSize<35?
|
|
|
|
" __ \n" +
|
|
|
|
" __ \n" +
|
|
|
@ -51,7 +51,7 @@ let commands = [
|
|
|
|
" \\/____/\\/___/\\ \\___/ \\/_/ \\/____/\\/_/ \\/__//___/ \\/_/\\/_/ \\/_/\\/_/\n" +
|
|
|
|
" \\/____/\\/___/\\ \\___/ \\/_/ \\/____/\\/_/ \\/__//___/ \\/_/\\/_/ \\/_/\\/_/\n" +
|
|
|
|
" /\\___/\n" +
|
|
|
|
" /\\___/\n" +
|
|
|
|
" \\/__/ @adb.sh\n\n";
|
|
|
|
" \\/__/ @adb.sh\n\n";
|
|
|
|
},
|
|
|
|
}(),
|
|
|
|
delay: 300
|
|
|
|
delay: 300
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -133,33 +133,38 @@ let commands = [
|
|
|
|
{color: "white", content: "forwarding", delay: 400},
|
|
|
|
{color: "white", content: "forwarding", delay: 400},
|
|
|
|
{color: "white", content: " ...", forward: "https://meet.adb.sh", delay: 600}
|
|
|
|
{color: "white", content: " ...", forward: "https://meet.adb.sh", delay: 600}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: ["test"],
|
|
|
|
|
|
|
|
output(input){ return[
|
|
|
|
|
|
|
|
{color: "blue", content: "\nJitsi", delay: 100},
|
|
|
|
|
|
|
|
{color: "white", content: " is loading\n", delay: 200},
|
|
|
|
|
|
|
|
{color: "white", content: input, delay: 400}
|
|
|
|
|
|
|
|
]}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
let history = [{
|
|
|
|
|
|
|
|
host: "[cybre.town]$ ",
|
|
|
|
|
|
|
|
command: "welcome --help",
|
|
|
|
|
|
|
|
output: []
|
|
|
|
|
|
|
|
}]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
data(){
|
|
|
|
data(){
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
commands,
|
|
|
|
commands
|
|
|
|
history
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods:{
|
|
|
|
methods:{
|
|
|
|
renderCommand(input){
|
|
|
|
renderCommand(input){
|
|
|
|
history[history.length-1].output = this.getCommand(input).output;
|
|
|
|
let toRender = this.getCommand(input).output
|
|
|
|
history.push({
|
|
|
|
let payload = [];
|
|
|
|
host: "[cybre.town]$ ",
|
|
|
|
if (typeof toRender === "function"){
|
|
|
|
command: "",
|
|
|
|
payload = toRender(input)
|
|
|
|
output: []
|
|
|
|
}else{
|
|
|
|
})
|
|
|
|
toRender.forEach(part =>
|
|
|
|
|
|
|
|
payload.push(typeof part === "function"?part(input):part)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return payload;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getCommand(input) {
|
|
|
|
getCommand(input) {
|
|
|
|
input = (input?input:history[history.length-1].command).split(" ")[0];
|
|
|
|
input = input.split(" ")[0];
|
|
|
|
let command = commands.find(
|
|
|
|
let command = commands.find(
|
|
|
|
command => Array.isArray(command.name)?command.name.find(
|
|
|
|
command => Array.isArray(command.name)?command.name.find(
|
|
|
|
altName => altName === input):command.name === input);
|
|
|
|
altName => altName === input):command.name === input);
|
|
|
|