diff options
author | Jakob Stendahl <jakob.stendahl@outlook.com> | 2021-09-19 19:43:11 +0200 |
---|---|---|
committer | Jakob Stendahl <jakob.stendahl@outlook.com> | 2021-09-19 19:43:11 +0200 |
commit | 7bdce37fd3f18e2712e18c4e2c64cac69af0aca1 (patch) | |
tree | b7ad3f1cca92e2dfd2664ae9e65652bd03ff58b2 /src_frontend/ComponentLib/PrettyVar.svelte | |
parent | e6880cd8ccf82d993f222cb14b4860581654acb8 (diff) | |
download | Luxcena-Neo-7bdce37fd3f18e2712e18c4e2c64cac69af0aca1.tar.gz Luxcena-Neo-7bdce37fd3f18e2712e18c4e2c64cac69af0aca1.zip |
:boom: Introduce new UI based on svelte, and rewrite a lot of the node app and the NeoRuntime
Diffstat (limited to 'src_frontend/ComponentLib/PrettyVar.svelte')
-rw-r--r-- | src_frontend/ComponentLib/PrettyVar.svelte | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src_frontend/ComponentLib/PrettyVar.svelte b/src_frontend/ComponentLib/PrettyVar.svelte new file mode 100644 index 0000000..68f082f --- /dev/null +++ b/src_frontend/ComponentLib/PrettyVar.svelte @@ -0,0 +1,16 @@ +<script> + export let varText; + let prettyVarText; + + function prettify(text) { + try { + prettyVarText = text.replace("_", " "); + prettyVarText = prettyVarText.charAt(0).toUpperCase() + prettyVarText.slice(1); + } catch { + prettyVarText = varText; + } + } + $: prettify(varText); +</script> + +{prettyVarText} |