diff --git a/examples/Dashboard.svelte b/examples/Dashboard.svelte new file mode 100644 index 0000000..e0dfa64 --- /dev/null +++ b/examples/Dashboard.svelte @@ -0,0 +1,1676 @@ + + + + +{#if connectionType == "MQTT"} + {#if MQTTconnections[1]} +
+ {/if} +{:else} ++ {NetworkDevice.deviceIP} + {NetworkDevice.deviceName} waiting +
+ {/if} + {#if NetworkDevice.status == true} ++ {NetworkDevice.deviceIP} + {NetworkDevice.deviceName} connected +
+ {/if} + {#if NetworkDevice.status == false} ++ {NetworkDevice.deviceIP} + {NetworkDevice.deviceName} disconnected +
+ {/if} + {/each} + ++ {#each pages as page, i} + + {/each} +
+{#if newPage == 1} +| + {widget.descr} + | + ++ + |
+ {#if widget.status == "1"}
+
+ | {/if}
+
+ {#if widget.widget === "anydata"}
+
+ {#if widget.descrColor}
+
+
+ {!widget.nodeInfo ? "" : widget.nodeInfo}
+
+
+ {/if}
+ |
+ + + | +
+
+ {#if Array.isArray(widget.color) && widget.status}
+ {#each widget.color as anydataColor, i}
+
+ {#if anydataColor.level && widget.status < anydataColor.level && widget.status > widget.color[i - 1].level && i > 0}
+ |
+ {/if}
+
+ {#if widget.widget === "input"}
+ {widget.descr} | ++ {#if widget.type === "number"} + |
+
+
+
+
+
+ |
+ {:else if widget.type === "time"}
+
+
+
+
+ |
+ {:else}
+
+
+ |
+ {/if}
+ {/if}
+
+ {#if widget.widget == "btn"}
+ {widget.descr} | ++ |
+ {#if widget.status != 0 && widget.status != 1}
+ + {:else} + + {/if} + |
+ {/if}
+
+ {#if widget.widget === "select"}
+ {widget.descr} | ++ |
+ {#if widget.status == 0}
+ + {:else} + + {/if} + |
+ {/if}
+
+ {#if widget.widget === "chart"}
+
+ {#if widget.status}
+ {#if widget.topic.includes("_2")}
+ |
+ {/if}
+
+ {#if widget.widget === "range"}
+
+
+ {widget.descr}
+ {widget.status / 10}
+ {widget.after}
+
+
+
+ |
+ {/if}
+ ||||