config display Name

This commit is contained in:
2021-04-22 19:35:34 +02:00
parent 2fdcf5935f
commit 208110d1de
3 changed files with 15 additions and 7 deletions

View File

@@ -4,7 +4,8 @@
color: '#a6bbcf',
defaults: {
host: { value: ""},
nickname: {value: "ServerQuery"}
nickname: {value: "ServerQuery"},
name: {value: ""}
},
credentials: {
username: {type: "text"},
@@ -17,6 +18,10 @@
</script>
<script type="text/html" data-template-name="ts3-config">
<div class="form-row">
<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">

View File

@@ -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

View File

@@ -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
}