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