Reformat code
This commit is contained in:
@@ -138,7 +138,7 @@ const defField = {
|
||||
},
|
||||
verify(v) {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -264,7 +264,7 @@ class Prompt {
|
||||
|
||||
this.f[data.inputs[i].name.toLowerCase()] = {
|
||||
value: f.value,
|
||||
verify: f.verify
|
||||
verify: f.verify,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -376,7 +376,7 @@ function next(type, data) {
|
||||
},
|
||||
data() {
|
||||
return data;
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ export function done(success, successData, errorTitle, errorMessage) {
|
||||
success: success,
|
||||
successData: successData,
|
||||
errorTitle: errorTitle,
|
||||
errorMessage: errorMessage
|
||||
errorMessage: errorMessage,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ export function done(success, successData, errorTitle, errorMessage) {
|
||||
export function wait(title, message) {
|
||||
return next(NEXT_WAIT, {
|
||||
title: title,
|
||||
message: message
|
||||
message: message,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ export function prompt(title, message, actionText, respond, cancel, inputs) {
|
||||
actionText: actionText,
|
||||
inputs: inputs,
|
||||
respond: respond,
|
||||
cancel: cancel
|
||||
cancel: cancel,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -617,7 +617,7 @@ class Builder {
|
||||
*/
|
||||
constructor(command) {
|
||||
this.cid = command.id();
|
||||
this.represeter = n => {
|
||||
this.represeter = (n) => {
|
||||
return command.represet(n);
|
||||
};
|
||||
this.wizarder = (n, i, r, u, y, x, l) => {
|
||||
@@ -629,7 +629,7 @@ class Builder {
|
||||
this.launchCmd = (n, i, r, u, y, x) => {
|
||||
return command.launch(n, i, r, u, y, x);
|
||||
};
|
||||
this.launcherCmd = c => {
|
||||
this.launcherCmd = (c) => {
|
||||
return command.launcher(c);
|
||||
};
|
||||
this.type = command.name();
|
||||
|
||||
@@ -60,7 +60,7 @@ class Telnet {
|
||||
"connect.succeed",
|
||||
"@inband",
|
||||
"close",
|
||||
"@completed"
|
||||
"@completed",
|
||||
],
|
||||
callbacks
|
||||
);
|
||||
@@ -214,7 +214,7 @@ const initialFieldDef = {
|
||||
}
|
||||
|
||||
return "Look like " + addr.type + " address";
|
||||
}
|
||||
},
|
||||
},
|
||||
Encoding: {
|
||||
name: "Encoding",
|
||||
@@ -236,8 +236,8 @@ const initialFieldDef = {
|
||||
}
|
||||
|
||||
throw new Error('The character encoding "' + d + '" is not supported');
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
class Wizard {
|
||||
@@ -324,7 +324,7 @@ class Wizard {
|
||||
|
||||
let parsedConfig = {
|
||||
host: address.parseHostPort(configInput.host, DEFAULT_PORT),
|
||||
charset: configInput.charset
|
||||
charset: configInput.charset,
|
||||
};
|
||||
|
||||
return new Telnet(sender, parsedConfig, {
|
||||
@@ -362,7 +362,7 @@ class Wizard {
|
||||
close() {
|
||||
return commandHandler.sendClose();
|
||||
},
|
||||
events: commandHandler.events
|
||||
events: commandHandler.events,
|
||||
}),
|
||||
self.controls.ui()
|
||||
)
|
||||
@@ -386,7 +386,7 @@ class Wizard {
|
||||
},
|
||||
"@inband"(rd) {},
|
||||
close() {},
|
||||
"@completed"() {}
|
||||
"@completed"() {},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -397,15 +397,15 @@ class Wizard {
|
||||
"Telnet",
|
||||
"Teletype Network",
|
||||
"Connect",
|
||||
r => {
|
||||
(r) => {
|
||||
self.hasStarted = true;
|
||||
|
||||
self.streams.request(COMMAND_ID, sd => {
|
||||
self.streams.request(COMMAND_ID, (sd) => {
|
||||
return self.buildCommand(
|
||||
sd,
|
||||
{
|
||||
host: r.host,
|
||||
charset: r.encoding
|
||||
charset: r.encoding,
|
||||
},
|
||||
self.session
|
||||
);
|
||||
@@ -434,15 +434,15 @@ class Wizard {
|
||||
title: hosts[i].title,
|
||||
value: hosts[i].data.host,
|
||||
meta: {
|
||||
Encoding: hosts[i].data.charset
|
||||
}
|
||||
Encoding: hosts[i].data.charset,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return sugg;
|
||||
}
|
||||
},
|
||||
},
|
||||
{ name: "Encoding" }
|
||||
{ name: "Encoding" },
|
||||
],
|
||||
self.preset
|
||||
)
|
||||
@@ -482,12 +482,12 @@ class Executor extends Wizard {
|
||||
|
||||
self.hasStarted = true;
|
||||
|
||||
self.streams.request(COMMAND_ID, sd => {
|
||||
self.streams.request(COMMAND_ID, (sd) => {
|
||||
return self.buildCommand(
|
||||
sd,
|
||||
{
|
||||
host: self.config.host,
|
||||
charset: self.config.charset ? self.config.charset : "utf-8"
|
||||
charset: self.config.charset ? self.config.charset : "utf-8",
|
||||
},
|
||||
self.session
|
||||
);
|
||||
@@ -566,7 +566,7 @@ export class Command {
|
||||
info,
|
||||
{
|
||||
host: d[0],
|
||||
charset: charset
|
||||
charset: charset,
|
||||
},
|
||||
null,
|
||||
streams,
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
v-if="presets.length > 0"
|
||||
id="connect-known-list-presets"
|
||||
:class="{
|
||||
'last-planel': knownList.length > 0
|
||||
'last-planel': knownList.length > 0,
|
||||
}"
|
||||
>
|
||||
<h3>Presets</h3>
|
||||
@@ -134,34 +134,34 @@ export default {
|
||||
props: {
|
||||
presets: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
default: () => [],
|
||||
},
|
||||
restrictedToPresets: {
|
||||
type: Boolean,
|
||||
default: () => false
|
||||
default: () => false,
|
||||
},
|
||||
knowns: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
default: () => [],
|
||||
},
|
||||
launcherBuilder: {
|
||||
type: Function,
|
||||
default: () => []
|
||||
default: () => [],
|
||||
},
|
||||
knownsExport: {
|
||||
type: Function,
|
||||
default: () => []
|
||||
default: () => [],
|
||||
},
|
||||
knownsImport: {
|
||||
type: Function,
|
||||
default: () => []
|
||||
}
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
knownList: [],
|
||||
reloaded: false,
|
||||
busy: false
|
||||
busy: false,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -182,7 +182,7 @@ export default {
|
||||
setTimeout(() => {
|
||||
self.reloaded = false;
|
||||
}, 500);
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.reload(this.knowns);
|
||||
@@ -195,7 +195,7 @@ export default {
|
||||
this.knownList.unshift({
|
||||
data: knownList[i],
|
||||
copying: false,
|
||||
copyStatus: "Copy link"
|
||||
copyStatus: "Copy link",
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -312,7 +312,7 @@ export default {
|
||||
"overflow: hidden; opacity: 0; width: 1px; height: 1px; top: -1px;" +
|
||||
"left: -1px; position: absolute;"
|
||||
);
|
||||
el.addEventListener("change", ev => {
|
||||
el.addEventListener("change", (ev) => {
|
||||
const t = ev.target;
|
||||
|
||||
if (t.files.length <= 0) {
|
||||
@@ -346,7 +346,7 @@ export default {
|
||||
}
|
||||
|
||||
document.body.removeChild(el);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user