config display Name
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
color: '#a6bbcf',
|
||||
defaults: {
|
||||
host: { value: ""},
|
||||
nickname: {value: "ServerQuery"}
|
||||
nickname: {value: "ServerQuery"},
|
||||
name: {value: ""}
|
||||
},
|
||||
credentials: {
|
||||
username: {type: "text"},
|
||||
@@ -18,19 +19,23 @@
|
||||
|
||||
<script type="text/html" data-template-name="ts3-config">
|
||||
<div class="form-row">
|
||||
<label for="node-input-host"><i class="fa fa-globe"></i>Hostname</label>
|
||||
<label for="node-input-host"><i class="fa fa-globe"></i> Name</label>
|
||||
<input type="text" id="node-config-input-name">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-host"><i class="fa fa-globe"></i> Hostname</label>
|
||||
<input type="text" id="node-config-input-host">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-nickname"><i class="fa fa-comment"></i>Nickname</label>
|
||||
<label for="node-input-nickname"><i class="fa fa-comment"></i> Nickname</label>
|
||||
<input type="text" id="node-config-input-nickname">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-username"><i class="fa fa-user"></i>Username</label>
|
||||
<label for="node-input-username"><i class="fa fa-user"></i> Username</label>
|
||||
<input type="text" id="node-config-input-username">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-password"><i class="fa fa-key"></i>Password</label>
|
||||
<label for="node-input-password"><i class="fa fa-key"></i> Password</label>
|
||||
<input type="password" id="node-config-input-password">
|
||||
</div>
|
||||
</script>
|
||||
|
||||
@@ -12,6 +12,8 @@ const nodeInit: NodeInitializer = (RED): void => {
|
||||
const host = config.host
|
||||
const nickname = config.nickname
|
||||
|
||||
this.name = config.name
|
||||
|
||||
let client: TeamSpeak | null = null
|
||||
let connectPromise: Promise<TeamSpeak> | null = null
|
||||
let shouldDissconect = false
|
||||
|
||||
@@ -2,12 +2,13 @@ import { NodeDef, Node } from "node-red";
|
||||
import { TeamSpeak } from "ts3-nodejs-library"
|
||||
|
||||
export interface Ts3ConfigProps{
|
||||
host: string,
|
||||
host: string
|
||||
nickname: string
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface Ts3ConfigCreds {
|
||||
username: string,
|
||||
username: string
|
||||
password: string
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user