From 528a22ae7d3cf1885d50d1c50b9183cefb2ca321 Mon Sep 17 00:00:00 2001 From: Tyler Date: Tue, 21 May 2019 00:06:20 -0400 Subject: [PATCH] Initial commit --- .gitignore | 2 + client/client.go | 79 ++ go.mod | 10 + go.sum | 14 + plugin_manifest/background.png | Bin 0 -> 2475 bytes plugin_manifest/icon-small.png | Bin 0 -> 1164 bytes plugin_manifest/manifest.json | 49 + plugin_manifest/pluginIcon.png | Bin 0 -> 1742 bytes plugin_manifest/ssh.png | Bin 0 -> 568 bytes plugin_manifest/website.png | Bin 0 -> 9839 bytes propertyinspector/css/sdpi.css | 1483 ++++++++++++++++++++++++ propertyinspector/index_pi.html | 66 ++ propertyinspector/index_pi.js | 274 +++++ propertyinspector/index_pi_server.html | 47 + remote.go | 31 + server.go | 81 ++ ssh.go | 99 ++ 17 files changed, 2235 insertions(+) create mode 100644 .gitignore create mode 100644 client/client.go create mode 100644 go.mod create mode 100644 go.sum create mode 100644 plugin_manifest/background.png create mode 100644 plugin_manifest/icon-small.png create mode 100644 plugin_manifest/manifest.json create mode 100644 plugin_manifest/pluginIcon.png create mode 100644 plugin_manifest/ssh.png create mode 100644 plugin_manifest/website.png create mode 100644 propertyinspector/css/sdpi.css create mode 100644 propertyinspector/index_pi.html create mode 100644 propertyinspector/index_pi.js create mode 100644 propertyinspector/index_pi_server.html create mode 100644 remote.go create mode 100644 server.go create mode 100644 ssh.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1062418 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea/ +*.iml diff --git a/client/client.go b/client/client.go new file mode 100644 index 0000000..77a2bd7 --- /dev/null +++ b/client/client.go @@ -0,0 +1,79 @@ +package client + +import ( + "crypto/tls" + "errors" + "io/ioutil" + "net/http" + "net/url" + "strconv" + "strings" + "time" +) + +const ( + urlPath = "/url/open" +) + +type RemoteClient struct { + client *http.Client + baseUrl string + token string +} + +func New(host, token string) *RemoteClient { + client := &http.Client{ + Timeout: 30 * time.Second, + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + }, + } + + return &RemoteClient{client: client, baseUrl: "https://" + host, token: token} +} + +func (r *RemoteClient) OpenURL(urlStr string) error { + formData := url.Values{ + "url": {urlStr}, + } + + status, _, err := r.doRequest(urlPath, formData) + + if err != nil { + return err + } else if status != http.StatusOK { + return errors.New("invalid status: " + strconv.Itoa(status)) + } + + return nil +} + +func (r *RemoteClient) doRequest(path string, v url.Values) (int, []byte, error) { + encoded := v.Encode() + + req, err := http.NewRequest(http.MethodPost, r.baseUrl + path, strings.NewReader(encoded)) + + if err != nil { + return -1, nil, err + } + + req.Header.Set("Authorization", "Bearer " + r.token) + req.Header.Set("Content-Length", strconv.Itoa(len(encoded))) + req.Header.Set("Content-Type", "application/x-www-form-urlencoded") + + res, err := r.client.Do(req) + + if err != nil { + return -1, nil, err + } + + defer res.Body.Close() + + b, err := ioutil.ReadAll(res.Body) + + if err != nil { + return -1, nil, err + } + + return res.StatusCode, b, nil +} \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..05dd329 --- /dev/null +++ b/go.mod @@ -0,0 +1,10 @@ +module meow.tf/streamdeck-remote + +go 1.12 + +require ( + github.com/gorilla/websocket v1.4.0 // indirect + github.com/valyala/fastjson v1.4.1 + golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f + meow.tf/streamdeck/sdk v0.0.0-20190519021527-54a933f8777d +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..a8c7753 --- /dev/null +++ b/go.sum @@ -0,0 +1,14 @@ +github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/valyala/fastjson v1.4.1 h1:hrltpHpIpkaxll8QltMU8c3QZ5+qIiCL8yKqPFJI/yE= +github.com/valyala/fastjson v1.4.1/go.mod h1:nV6MsjxL2IMJQUoHDIrjEI7oLyeqK6aBD7EFWPsvP8o= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f h1:R423Cnkcp5JABoeemiGEPlt9tHXFfw5kvc0yqlxRPWo= +golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +meow.tf/streamdeck/sdk v0.0.0-20190519021527-54a933f8777d h1:PPZHRoZFy9p4GjXssLvTneJfX6cS0bEm51md5TqXFgU= +meow.tf/streamdeck/sdk v0.0.0-20190519021527-54a933f8777d/go.mod h1:SnrBz5Bcdgk/wwIvgjo+3gXiBYV6b/dYSpb2AFxjHcA= diff --git a/plugin_manifest/background.png b/plugin_manifest/background.png new file mode 100644 index 0000000000000000000000000000000000000000..60a0169acd56439383d7688d37153c41e9689a3f GIT binary patch literal 2475 zcmeHIX;hPE7EXYK@a6jws0m5f5fZYH06_&(WDg0eK~fPRARtZEMz*jhAVsNwQj`{1 zMQAJ(k*x?Q%jhU6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ff --git a/plugin_manifest/website.png b/plugin_manifest/website.png new file mode 100644 index 0000000000000000000000000000000000000000..10679cddb597a2d9822e4ce799b6f27f55b1610b GIT binary patch literal 9839 zcmdsdbwvU^YCHe{K%lH7rv(52VfR1CLjV9k z7FLY}0AK)RIcXgqv%OsVG~Jo>!SleH&5%%zGLA9}woSuuyY6UZI1Yiu;0qQ9R-4xY z4KY-b9;wdPvXUNcVmpoV9<1|D6jZ84@0ApdnIDo!Gd_giM)SwYAmVl5?M@L{xr?w`j$&>VG!`3;QA` zg)k>VN#t62nKIOua>AB+37`;KAY)f@d@r%pIwk4GX7Li^`#X&j?Yf${RMX6|>+R}p zVdo2WcY=!bkYMtU1*#`}u3#`)rF)1IZ7?IJa^kJ+eaoZLWPVUpo`TK^SpHF%$8aczj7Jmeh~Fxp zzrIRy6j`%>fS`gPk>Vjfz62s+XPx z8V~)k*I#I*6+?0o`3!d)T#EMGn*c671UYm9k4VFsnW4C2|K)YU{^TDdCqkYbf^gICELr>DFk z{WR#joR-r8RFTpHvrFp3+KSO6fz`PoKqw%@70P#XG+dSg-}4u0bDv8Gr1P}BCn2~t z5kW>t1HiqnV3KZxjeCAeZV#T}Ywq;UqzNYmBv~H$K*0<$NcpnBb9}4pGYwA>5?Hi` zoF8E}5EKg$CZ}Hj>9pAiGJl#ZW^?3w0GgoxWhH9!3aLU-jb1+to1l-(Kms6a%+L>f zar53T$xZCsaOT;{qV@9TVuC^#1li5UtSJ#AdhV3r(4Gb$S8YwS*mE*)$drkdf$@F8 z?SIFPNY;=baDhleaM*;tM`#9%nA8@wtg zP_~yq8Fk{S1mwu}B%Ns020D|NJODx=q#;(mKiutQhcq{6F25Sikwn%?p zcH5mUR#XFp#Rq|&2)2Mh#0-4GlpYa)^slWb617ue2cB#YHX=-*!&>cfr~MLO=0k9F z7ptj(p6vAUQ>Ne*d~7wPLDtt1v&GsE=p>#&3(z8?(b>t@F6?$_zThtuNbK6bsV=VfS`zUIY zpsT2Y#49n;sQtc)Y{PH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h%3!a_(vlJUf#oPik*Z!=N9;2s@86*Im*N;w{>a}Z8| zefkt^Ar9im4#p^#Ce8Ugmj556zz{d>A-1fbFsirqTCWLM{zqpXysk1dzI|TAM%}yl zMw<;6ge@RE$jQck!+fi)Hi%O$?0^ATRygjxEhs79QCxZbA&g4SDuc&F-XNAzR`y;Z z2=>A4bUKe51?jx7r9x!UWUjyqn%LQG~pPUiRz)%H&~VQAtxts_=FH>$r~BxdrrL|wEOc^4JR0a z#h9($JOIPHQ{n2go~Gic>>yKmc)9(YV6*n>v@r}@>;RAvr2nmr=E756!a3Tk(8DgW zv9_4)pX}UNnDE{<(ENUg$x z%VrY7QjQHmORQ2=7~^HmLwD>TL#;5mhG8fI+V&WmLw+ntTswXE)r1o2ZLUULaABp4yh3R+lCs>mg{H&c~oBh&r z_*j4YkPq_s9Z1A?+V%`#KJ|^RbBF^TUuD&!$mVzcwI=R?AY``)r=<{Fxir#wFveg?^LofpdT8@QMG= zl*rlQ_<}>F6EGC=V>PZ9#>WLYu+3QT`aw$fa7_t$(UXePtbN4vmynvG13v*A;s|~m zW+6CL9yspreKQxbVSsE&ogVi6m#u(aR?lU_$MW(xpjzRHZR}*iLEYN-77|!>V}UdA z#uJgWc8{f6QtWI99A*NxU{uiV`k}FS`q@O}uMtw~xCM()@_RmKR;TgWcue~cI}afl zB1~7~lSa_ z+q9zs$O}|U2^bY>>o`W(F-1NIs)3`p;pi=rLkII *:not(.sdpi-item-label):not(meter):not(details):not(canvas) { + min-height: 26px; + padding: 0px 4px 0px 4px; +} + +.sdpi-item > *:not(.sdpi-item-label.empty):not(meter) { + min-height: 26px; + padding: 0px 4px 0px 4px; +} + + +.sdpi-item-group { + padding: 0 !important; +} + +meter.sdpi-item-value { + margin-left: 6px; +} + +.sdpi-item[type="group"] { + display: block; + margin-top: 12px; + margin-bottom: 12px; + /* border: 1px solid white; */ + flex-direction: unset; + text-align: left; +} + +.sdpi-item[type="group"] > .sdpi-item-label, +.sdpi-item[type="group"].sdpi-item-label { + width: 96%; + text-align: left; + font-weight: 700; + margin-bottom: 4px; + padding-left: 4px; +} + +dl, +ul, +ol { + -webkit-margin-before: 0px; + -webkit-margin-after: 4px; + -webkit-padding-start: 1em; + max-height: 90px; + overflow-y: scroll; + cursor: pointer; + user-select: none; +} + +table.sdpi-item-value, +dl.sdpi-item-value, +ul.sdpi-item-value, +ol.sdpi-item-value { + -webkit-margin-before: 4px; + -webkit-margin-after: 8px; + -webkit-padding-start: 1em; + width: var(--sdpi-width); + text-align: center; +} + +table > caption { + margin: 2px; +} + +.list, +.sdpi-item[type="list"] { + align-items: baseline; +} + +.sdpi-item-label { + text-align: right; + flex: none; + width: 94px; + padding-right: 4px; + font-weight: 600; + -webkit-user-select: none; +} + +.win .sdpi-item-label, +.sdpi-item-label > small{ + font-weight: normal; +} + +.sdpi-item-label:after { + content: ": "; +} + +.sdpi-item-label.empty:after { + content: ""; +} + +.sdpi-test, +.sdpi-item-value { + flex: 1 0 0; + /* flex-grow: 1; + flex-shrink: 0; */ + margin-right: 14px; + margin-left: 4px; + justify-content: space-evenly; +} + +canvas.sdpi-item-value { + max-width: 144px; + max-height: 144px; + width: 144px; + height: 144px; + margin: 0 auto; + cursor: pointer; +} + +input.sdpi-item-value { + margin-left: 5px; +} + +.sdpi-item-value button, +button.sdpi-item-value { + margin-left: 6px; + margin-right: 14px; +} + +.sdpi-item-value.range { + margin-left: 0px; +} + +table, +dl.sdpi-item-value, +ul.sdpi-item-value, +ol.sdpi-item-value, +.sdpi-item-value > dl, +.sdpi-item-value > ul, +.sdpi-item-value > ol +{ + list-style-type: none; + list-style-position: outside; + margin-left: -4px; + margin-right: -4px; + padding: 4px; + border: 1px solid var(--sdpi-bordercolor); +} + +dl.sdpi-item-value, +ul.sdpi-item-value, +ol.sdpi-item-value, +.sdpi-item-value > ol { + list-style-type: none; + list-style-position: inside; + margin-left: 5px; + margin-right: 12px; + padding: 4px !important; +} + +ol.sdpi-item-value, +.sdpi-item-value > ol[listtype="none"] { + list-style-type: none; +} +ol.sdpi-item-value[type="decimal"], +.sdpi-item-value > ol[type="decimal"] { + list-style-type: decimal; +} + +ol.sdpi-item-value[type="decimal-leading-zero"], +.sdpi-item-value > ol[type="decimal-leading-zero"] { + list-style-type: decimal-leading-zero; +} + +ol.sdpi-item-value[type="lower-alpha"], +.sdpi-item-value > ol[type="lower-alpha"] { + list-style-type: lower-alpha; +} + +ol.sdpi-item-value[type="upper-alpha"], +.sdpi-item-value > ol[type="upper-alpha"] { + list-style-type: upper-alpha; +} + +ol.sdpi-item-value[type="upper-roman"], +.sdpi-item-value > ol[type="upper-roman"] { + list-style-type: upper-roman; +} + +ol.sdpi-item-value[type="lower-roman"], +.sdpi-item-value > ol[type="lower-roman"] { + list-style-type: upper-roman; +} + +tr:nth-child(even), +.sdpi-item-value > ul > li:nth-child(even), +.sdpi-item-value > ol > li:nth-child(even), +li:nth-child(even) { + background-color: rgba(0,0,0,.2) +} + +td:hover, +.sdpi-item-value > ul > li:hover:nth-child(even), +.sdpi-item-value > ol > li:hover:nth-child(even), +li:hover:nth-child(even), +li:hover { + background-color: rgba(255,255,255,.1); +} + +td.selected, +td.selected:hover, +li.selected:hover, +li.selected { + color: white; + background-color: #77f; +} + +tr { + border: 1px solid var(--sdpi-bordercolor); +} + +td { + border-right: 1px solid var(--sdpi-bordercolor); + -webkit-user-select: none; +} + +tr:last-child, +td:last-child { + border: none; +} + +.sdpi-item-value.select, +.sdpi-item-value > select { + margin-right: 13px; + margin-left: 4px; +} + +.sdpi-item-child, +.sdpi-item-group > .sdpi-item > input[type="color"] { + margin-top: 0.4em; + margin-right: 4px; +} + +.full, +.full *, +.sdpi-item-value.full, +.sdpi-item-child > full > *, +.sdpi-item-child.full, +.sdpi-item-child.full > *, +.full > .sdpi-item-child, +.full > .sdpi-item-child > *{ + display: flex; + flex: 1 1 0; + margin-bottom: 4px; + margin-left: 0px; + width: 100%; + + justify-content: space-evenly; +} + +.sdpi-item-group > .sdpi-item > input[type="color"] { + margin-top: 0px; +} + +::-webkit-calendar-picker-indicator:focus, +input[type=file]::-webkit-file-upload-button:focus, +button:focus, +textarea:focus, +input:focus, +select:focus, +option:focus, +details:focus, +summary:focus, +.custom-select select { + outline: none; +} + +summary { + cursor: default; + -webkit-user-select: none; +} + +.pointer, +summary .pointer { + cursor: pointer; +} + +details.message { + padding: 4px 18px 4px 12px; +} + +details.message summary { + font-size: 10pt; + font-weight: 600; + min-height: 18px; +} + +details.message:first-child { + margin-top: 4px; + margin-left: 0; + padding-left: 102px; +} + +details.message h1 { + text-align: left; +} + +.message > summary::-webkit-details-marker { + display: none; +} + +.info20, +.question, +.caution, +.info { + background-repeat: no-repeat; + background-position: 72px center; +} + +.info20 { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23999' d='M10,20 C4.4771525,20 0,15.5228475 0,10 C0,4.4771525 4.4771525,0 10,0 C15.5228475,0 20,4.4771525 20,10 C20,15.5228475 15.5228475,20 10,20 Z M10,8 C8.8954305,8 8,8.84275812 8,9.88235294 L8,16.1176471 C8,17.1572419 8.8954305,18 10,18 C11.1045695,18 12,17.1572419 12,16.1176471 L12,9.88235294 C12,8.84275812 11.1045695,8 10,8 Z M10,3 C8.8954305,3 8,3.88165465 8,4.96923077 L8,5.03076923 C8,6.11834535 8.8954305,7 10,7 C11.1045695,7 12,6.11834535 12,5.03076923 L12,4.96923077 C12,3.88165465 11.1045695,3 10,3 Z'/%3E%3C/svg%3E%0A"); +} + +.info { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23999' d='M10,18 C5.581722,18 2,14.418278 2,10 C2,5.581722 5.581722,2 10,2 C14.418278,2 18,5.581722 18,10 C18,14.418278 14.418278,18 10,18 Z M10,8 C9.44771525,8 9,8.42137906 9,8.94117647 L9,14.0588235 C9,14.5786209 9.44771525,15 10,15 C10.5522847,15 11,14.5786209 11,14.0588235 L11,8.94117647 C11,8.42137906 10.5522847,8 10,8 Z M10,5 C9.44771525,5 9,5.44082732 9,5.98461538 L9,6.01538462 C9,6.55917268 9.44771525,7 10,7 C10.5522847,7 11,6.55917268 11,6.01538462 L11,5.98461538 C11,5.44082732 10.5522847,5 10,5 Z'/%3E%3C/svg%3E%0A"); +} + +.info2 { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 15 15'%3E%3Cpath fill='%23999' d='M7.5,15 C3.35786438,15 0,11.6421356 0,7.5 C0,3.35786438 3.35786438,0 7.5,0 C11.6421356,0 15,3.35786438 15,7.5 C15,11.6421356 11.6421356,15 7.5,15 Z M7.5,2 C6.67157287,2 6,2.66124098 6,3.47692307 L6,3.52307693 C6,4.33875902 6.67157287,5 7.5,5 C8.32842705,5 9,4.33875902 9,3.52307693 L9,3.47692307 C9,2.66124098 8.32842705,2 7.5,2 Z M5,6 L5,7.02155172 L6,7 L6,12 L5,12.0076778 L5,13 L10,13 L10,12 L9,12.0076778 L9,6 L5,6 Z'/%3E%3C/svg%3E%0A"); +} + +.sdpi-more-info { + background-image: linear-gradient(to right, #00000000 0%,#00000040 80%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpolygon fill='%23999' points='4 7 8 7 8 5 12 8 8 11 8 9 4 9'/%3E%3C/svg%3E%0A"); +} +.caution { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23999' fill-rule='evenodd' d='M9.03952676,0.746646542 C9.57068894,-0.245797319 10.4285735,-0.25196227 10.9630352,0.746646542 L19.7705903,17.2030214 C20.3017525,18.1954653 19.8777595,19 18.8371387,19 L1.16542323,19 C0.118729947,19 -0.302490098,18.2016302 0.231971607,17.2030214 L9.03952676,0.746646542 Z M10,2.25584053 L1.9601405,17.3478261 L18.04099,17.3478261 L10,2.25584053 Z M10,5.9375 C10.531043,5.9375 10.9615385,6.37373537 10.9615385,6.91185897 L10.9615385,11.6923077 C10.9615385,12.2304313 10.531043,12.6666667 10,12.6666667 C9.46895697,12.6666667 9.03846154,12.2304313 9.03846154,11.6923077 L9.03846154,6.91185897 C9.03846154,6.37373537 9.46895697,5.9375 10,5.9375 Z M10,13.4583333 C10.6372516,13.4583333 11.1538462,13.9818158 11.1538462,14.6275641 L11.1538462,14.6641026 C11.1538462,15.3098509 10.6372516,15.8333333 10,15.8333333 C9.36274837,15.8333333 8.84615385,15.3098509 8.84615385,14.6641026 L8.84615385,14.6275641 C8.84615385,13.9818158 9.36274837,13.4583333 10,13.4583333 Z'/%3E%3C/svg%3E%0A"); +} + +.question { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23999' d='M10,18 C5.581722,18 2,14.418278 2,10 C2,5.581722 5.581722,2 10,2 C14.418278,2 18,5.581722 18,10 C18,14.418278 14.418278,18 10,18 Z M6.77783203,7.65332031 C6.77783203,7.84798274 6.85929281,8.02888914 7.0222168,8.19604492 C7.18514079,8.36320071 7.38508996,8.44677734 7.62207031,8.44677734 C8.02409055,8.44677734 8.29703704,8.20768468 8.44091797,7.72949219 C8.59326248,7.27245865 8.77945854,6.92651485 8.99951172,6.69165039 C9.2195649,6.45678594 9.56233491,6.33935547 10.027832,6.33935547 C10.4256205,6.33935547 10.7006836,6.37695313 11.0021973,6.68847656 C11.652832,7.53271484 10.942627,8.472229 10.3750916,9.1321106 C9.80755615,9.79199219 8.29492188,11.9897461 10.027832,12.1347656 C10.4498423,12.1700818 10.7027991,11.9147157 10.7832031,11.4746094 C11.0021973,9.59857178 13.1254883,8.82415771 13.1254883,7.53271484 C13.1254883,7.07568131 12.9974785,6.65250846 12.7414551,6.26318359 C12.4854317,5.87385873 12.1225609,5.56600048 11.652832,5.33959961 C11.1831031,5.11319874 10.6414419,5 10.027832,5 C9.36767248,5 8.79004154,5.13541531 8.29492187,5.40625 C7.79980221,5.67708469 7.42317837,6.01879677 7.16503906,6.43139648 C6.90689975,6.8439962 6.77783203,7.25130007 6.77783203,7.65332031 Z M10.0099668,15 C10.2713191,15 10.5016601,14.9108147 10.7009967,14.7324415 C10.9003332,14.5540682 11,14.3088087 11,13.9966555 C11,13.7157177 10.9047629,13.4793767 10.7142857,13.2876254 C10.5238086,13.0958742 10.2890379,13 10.0099668,13 C9.72646591,13 9.48726565,13.0958742 9.2923588,13.2876254 C9.09745196,13.4793767 9,13.7157177 9,13.9966555 C9,14.313268 9.10077419,14.5596424 9.30232558,14.735786 C9.50387698,14.9119295 9.73975502,15 10.0099668,15 Z'/%3E%3C/svg%3E%0A"); +} + + +.sdpi-more-info { + position: fixed; + left: 0px; + right: 0px; + bottom: 0px; + min-height:16px; + padding-right: 16px; + text-align: right; + -webkit-touch-callout: none; + cursor: pointer; + user-select: none; + background-position: right center; + background-repeat: no-repeat; + border-radius: var(--sdpi-borderradius); + text-decoration: none; + color: var(--sdpi-color); +} + +.sdpi-more-info-button { + display: flex; + align-self: right; + margin-left: auto; + position: fixed; + right: 17px; + bottom: 0px; + user-select: none; +} + +details a { + background-position: right !important; + min-height: 24px; + display: inline-block; + line-height: 24px; + padding-right: 28px; +} + + +input:not([type="range"]), +textarea { + -webkit-appearance: none; + background: var(--sdpi-background); + color: var(--sdpi-color); + font-weight: normal; + font-size: 9pt; + border: none; + margin-top: 2px; + margin-bottom: 2px; + min-width: 219px; +} + +textarea + label { + display: flex; + justify-content: flex-end +} +input[type="radio"], +input[type="checkbox"] { + display: none; +} +input[type="radio"] + label, +input[type="checkbox"] + label { + font-size: 9pt; + color: var(--sdpi-color); + font-weight: normal; + margin-right: 8px; + -webkit-user-select: none; +} + +input[type="radio"] + label:after, +input[type="checkbox"] + label:after { + content: " " !important; +} + +.sdpi-item[type="radio"] > .sdpi-item-value, +.sdpi-item[type="checkbox"] > .sdpi-item-value { + padding-top: 2px; +} + +.sdpi-item[type="checkbox"] > .sdpi-item-value > * { + margin-top: 4px; +} + +.sdpi-item[type="checkbox"] .sdpi-item-child, +.sdpi-item[type="radio"] .sdpi-item-child { + display: inline-block; +} + +.sdpi-item[type="range"] .sdpi-item-value, +.sdpi-item[type="meter"] .sdpi-item-child, +.sdpi-item[type="progress"] .sdpi-item-child { + display: flex; +} + +.sdpi-item[type="range"] .sdpi-item-value { + min-height: 26px; +} + +.sdpi-item[type="range"] .sdpi-item-value span, +.sdpi-item[type="meter"] .sdpi-item-child span, +.sdpi-item[type="progress"] .sdpi-item-child span { + margin-top: -2px; + min-width: 8px; + text-align: right; + user-select: none; + cursor: pointer; +} + +.sdpi-item[type="range"] .sdpi-item-value span { + margin-top: 7px; + text-align: right; +} + +span + input[type="range"] { + display: flex; + max-width: 168px; + +} + +.sdpi-item[type="range"] .sdpi-item-value span:first-child, +.sdpi-item[type="meter"] .sdpi-item-child span:first-child, +.sdpi-item[type="progress"] .sdpi-item-child span:first-child { + margin-right: 4px; +} + +.sdpi-item[type="range"] .sdpi-item-value span:last-child, +.sdpi-item[type="meter"] .sdpi-item-child span:last-child, +.sdpi-item[type="progress"] .sdpi-item-child span:last-child { + margin-left: 4px; +} + +.reverse { + transform: rotate(180deg); +} + +.sdpi-item[type="meter"] .sdpi-item-child meter + span:last-child { + margin-left: -10px; +} + +.sdpi-item[type="progress"] .sdpi-item-child meter + span:last-child { + margin-left: -14px; +} + +.sdpi-item[type="radio"] > .sdpi-item-value > * { + margin-top: 2px; +} + +details { + padding: 8px 18px 8px 12px; + min-width: 86px; +} + +details > h4 { + border-bottom: 1px solid var(--sdpi-bordercolor); +} + +legend { + display: none; +} +.sdpi-item-value > textarea { + padding: 0px; + width: 219px; + margin-left: 1px; + margin-top: 3px; + padding: 4px; +} + +input[type="radio"] + label span, +input[type="checkbox"] + label span { + display: inline-block; + width: 16px; + height: 16px; + margin: 2px 4px 2px 0; + border-radius: 3px; + vertical-align: middle; + background: var(--sdpi-background); + cursor: pointer; + border: 1px solid rgb(0,0,0,.2); +} + +input[type="radio"] + label span { + border-radius: 100%; +} + +input[type="radio"]:checked + label span, +input[type="checkbox"]:checked + label span { + background-color: #77f; + background-image: url(check.svg); + background-repeat: no-repeat; + background-position: center center; + border: 1px solid rgb(0,0,0,.4); +} + +input[type="radio"]:active:checked + label span, +input[type="radio"]:active + label span, +input[type="checkbox"]:active:checked + label span, +input[type="checkbox"]:active + label span { + background-color: #303030; +} + +input[type="radio"]:checked + label span { + background-image: url(rcheck.svg); +} + +/* +input[type="radio"] + label span { + background: url(buttons.png) -38px top no-repeat; +} + +input[type="radio"]:checked + label span { + background: url(buttons.png) -57px top no-repeat; +} +*/ + +input[type="range"] { + width: var(--sdpi-width); + height: 30px; + overflow: hidden; + cursor: pointer; + background: transparent !important; +} + +.sdpi-item > input[type="range"] { + margin-left: 2px; + max-width: var(--sdpi-width); + width: var(--sdpi-width); + padding: 0px; + margin-top: 4px; +} + +/* +input[type="range"], +input[type="range"]::-webkit-slider-runnable-track, +input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; +} +*/ + +input[type="range"]::-webkit-slider-runnable-track { + height: 5px; + background: #979797; + border-radius: 3px; + padding:0px !important; + border: 1px solid var(--sdpi-background); +} + +input[type="range"]::-webkit-slider-thumb { + position: relative; + -webkit-appearance: none; + background-color: var(--sdpi-color); + width: 12px; + height: 12px; + border-radius: 20px; + margin-top: -5px; + border: none; +} +input[type="range" i]{ + margin: 0; +} + +input[type="range"]::-webkit-slider-thumb::before { + position: absolute; + content: ""; + height: 5px; /* equal to height of runnable track or 1 less */ + width: 500px; /* make this bigger than the widest range input element */ + left: -502px; /* this should be -2px - width */ + top: 8px; /* don't change this */ + background: #77f; +} + +input[type="color"] { + min-width: 32px; + min-height: 32px; + width: 32px; + height: 32px; + padding: 0; + background-color: var(--sdpi-bgcolor); + flex: none; +} + +::-webkit-color-swatch { + min-width: 24px; +} + +textarea { + height: 3em; + word-break: break-word; + line-height: 1.5em; +} + +.textarea { + padding: 0px !important; +} + +textarea { + width: 219px; /*98%;*/ + height: 96%; + min-height: 6em; + resize: none; + border-radius: var(--sdpi-borderradius); +} + +/* CAROUSEL */ + +.sdpi-item[type="carousel"]{ + +} + +.sdpi-item.card-carousel-wrapper, +.sdpi-item > .card-carousel-wrapper { + padding: 0; +} + + +.card-carousel-wrapper { + display: flex; + align-items: center; + justify-content: center; + margin: 12px auto; + color: #666a73; +} + +.card-carousel { + display: flex; + justify-content: center; + width: 278px; +} +.card-carousel--overflow-container { + overflow: hidden; +} +.card-carousel--nav__left, +.card-carousel--nav__right { + /* display: inline-block; */ + width: 12px; + height: 12px; + border-top: 2px solid #42b883; + border-right: 2px solid #42b883; + cursor: pointer; + margin: 0 4px; + transition: transform 150ms linear; +} +.card-carousel--nav__left[disabled], +.card-carousel--nav__right[disabled] { + opacity: 0.2; + border-color: black; +} +.card-carousel--nav__left { + transform: rotate(-135deg); +} +.card-carousel--nav__left:active { + transform: rotate(-135deg) scale(0.85); +} +.card-carousel--nav__right { + transform: rotate(45deg); +} +.card-carousel--nav__right:active { + transform: rotate(45deg) scale(0.85); +} +.card-carousel-cards { + display: flex; + transition: transform 150ms ease-out; + transform: translatex(0px); +} +.card-carousel-cards .card-carousel--card { + margin: 0 5px; + cursor: pointer; + /* box-shadow: 0 4px 15px 0 rgba(40, 44, 53, 0.06), 0 2px 2px 0 rgba(40, 44, 53, 0.08); */ + background-color: #fff; + border-radius: 4px; + z-index: 3; +} +.xxcard-carousel-cards .card-carousel--card:first-child { + margin-left: 0; +} +.xxcard-carousel-cards .card-carousel--card:last-child { + margin-right: 0; +} +.card-carousel-cards .card-carousel--card img { + vertical-align: bottom; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + transition: opacity 150ms linear; + width: 60px; +} +.card-carousel-cards .card-carousel--card img:hover { + opacity: 0.5; +} +.card-carousel-cards .card-carousel--card--footer { + border-top: 0; + max-width: 80px; + overflow: hidden; + display: flex; + height: 100%; + flex-direction: column; +} +.card-carousel-cards .card-carousel--card--footer p { + padding: 3px 0; + margin: 0; + margin-bottom: 2px; + font-size: 15px; + font-weight: 500; + color: #2c3e50; +} +.card-carousel-cards .card-carousel--card--footer p:nth-of-type(2) { + font-size: 12px; + font-weight: 300; + padding: 6px; + color: #666a73; +} + + +h1 { + font-size: 1.3em; + font-weight: 500; + text-align: center; + margin-bottom: 12px; +} + +::-webkit-datetime-edit { + font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + background: url(elg_calendar_inv.svg) no-repeat left center; + padding-right: 1em; + padding-left: 25px; + background-position: 4px 0px; +} +::-webkit-datetime-edit-fields-wrapper { + +} +::-webkit-datetime-edit-text { padding: 0 0.3em; } +::-webkit-datetime-edit-month-field { } +::-webkit-datetime-edit-day-field {} +::-webkit-datetime-edit-year-field {} +::-webkit-inner-spin-button { + + /* display: none; */ +} +::-webkit-calendar-picker-indicator { + background: transparent; + font-size: 17px; +} + +::-webkit-calendar-picker-indicator:focus { + background-color: rgba(0,0,0,0.2); +} + +input[type="date"] { + -webkit-align-items: center; + display: -webkit-inline-flex; + font-family: monospace; + overflow: hidden; + padding: 0; + -webkit-padding-start: 1px; +} + +input::-webkit-datetime-edit { + -webkit-flex: 1; + -webkit-user-modify: read-only !important; + display: inline-block; + min-width: 0; + overflow: hidden; +} + +/* +input::-webkit-datetime-edit-fields-wrapper { + -webkit-user-modify: read-only !important; + display: inline-block; + padding: 1px 0; + white-space: pre; + +} +*/ + +/* +input[type="date"] { + background-color: red; + outline: none; +} + +input[type="date"]::-webkit-clear-button { + font-size: 18px; + height: 30px; + position: relative; +} + +input[type="date"]::-webkit-inner-spin-button { + height: 28px; +} + +input[type="date"]::-webkit-calendar-picker-indicator { + font-size: 15px; +} */ + +input[type="file"] { + opacity: 0; + display: none; +} + +.sdpi-item > input[type="file"] { + opacity: 1; + display: flex; +} + +input[type="file"] + span { + display: flex; + flex: 0 1 auto; + background-color: #0000ff50; +} + +label.sdpi-file-label { + cursor: pointer; + user-select: none; + display: inline-block; + min-height: 21px !important; + height: 21px !important; + line-height: 20px; + padding: 0px 4px; + margin: auto; + margin-right: 0px; + float:right; +} + +.sdpi-file-label > label:active, +.sdpi-file-label.file:active, +label.sdpi-file-label:active, +label.sdpi-file-info:active, +input[type="file"]::-webkit-file-upload-button:active, +button:active { + background-color: var(--sdpi-color); + color:#303030; +} + +input:required:invalid, input:focus:invalid { + background: var(--sdpi-background) url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5IiBoZWlnaHQ9IjkiIHZpZXdCb3g9IjAgMCA5IDkiPgogICAgPHBhdGggZmlsbD0iI0Q4RDhEOCIgZD0iTTQuNSwwIEM2Ljk4NTI4MTM3LC00LjU2NTM4NzgyZS0xNiA5LDIuMDE0NzE4NjMgOSw0LjUgQzksNi45ODUyODEzNyA2Ljk4NTI4MTM3LDkgNC41LDkgQzIuMDE0NzE4NjMsOSAzLjA0MzU5MTg4ZS0xNiw2Ljk4NTI4MTM3IDAsNC41IEMtMy4wNDM1OTE4OGUtMTYsMi4wMTQ3MTg2MyAyLjAxNDcxODYzLDQuNTY1Mzg3ODJlLTE2IDQuNSwwIFogTTQsMSBMNCw2IEw1LDYgTDUsMSBMNCwxIFogTTQuNSw4IEM0Ljc3NjE0MjM3LDggNSw3Ljc3NjE0MjM3IDUsNy41IEM1LDcuMjIzODU3NjMgNC43NzYxNDIzNyw3IDQuNSw3IEM0LjIyMzg1NzYzLDcgNCw3LjIyMzg1NzYzIDQsNy41IEM0LDcuNzc2MTQyMzcgNC4yMjM4NTc2Myw4IDQuNSw4IFoiLz4KICA8L3N2Zz4) no-repeat 98% center; +} + +input:required:valid { + background: var(--sdpi-background) url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5IiBoZWlnaHQ9IjkiIHZpZXdCb3g9IjAgMCA5IDkiPjxwb2x5Z29uIGZpbGw9IiNEOEQ4RDgiIHBvaW50cz0iNS4yIDEgNi4yIDEgNi4yIDcgMy4yIDcgMy4yIDYgNS4yIDYiIHRyYW5zZm9ybT0icm90YXRlKDQwIDQuNjc3IDQpIi8+PC9zdmc+) no-repeat 98% center; +} + +.tooltip, +:tooltip, +:title { + color: yellow; +} + +[title]:hover { + display: flex; + align-items: center; + justify-content: center; +} + +[title]:hover::after { + content: ''; + position: absolute; + bottom: -1000px; + left: 8px; + display: none; + color: #fff; + border: 8px solid transparent; + border-bottom: 8px solid #000; +} +[title]:hover::before { + content: attr(title); + display: flex; + justify-content: center; + align-self: center; + padding: 6px 12px; + border-radius: 5px; + background: rgba(0,0,0,0.8); + color: var(--sdpi-color); + font-size: 9pt; + font-family: sans-serif; + opacity: 1; + position: absolute; + height: auto; + /* width: 50%; + left: 35%; */ + text-align: center; + bottom: 2px; + z-index: 100; + box-shadow: 0px 3px 6px rgba(0, 0, 0, .5); + /* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */ +} + +.sdpi-item-group.file { + width: 232px; + display: flex; + align-items: center; +} + +.sdpi-file-info { + overflow-wrap: break-word; + word-wrap: break-word; + hyphens: auto; + + min-width: 132px; + max-width: 144px; + max-height: 32px; + margin-top: 0px; + margin-left: 5px; + display: inline-block; + overflow: hidden; + padding: 6px 4px; + background-color: var(--sdpi-background); +} + + +::-webkit-scrollbar { + width: 8px; +} + +::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); +} + +::-webkit-scrollbar-thumb { + background-color: #999999; + outline: 1px solid slategrey; + border-radius: 8px; +} + +a { + color: #7397d2; +} + +.testcontainer { + display: flex; + background-color: #0000ff20; + max-width: 400px; + height: 200px; + align-content: space-evenly; +} + +input[type=range] { + -webkit-appearance: none; + /* background-color: green; */ + height:6px; + margin-top: 12px; + z-index: 0; + overflow: visible; +} + +/* +input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + background-color: var(--sdpi-color); + width: 12px; + height: 12px; + border-radius: 20px; + margin-top: -6px; + border: none; +} */ + +:-webkit-slider-thumb { + -webkit-appearance: none; + background-color: var(--sdpi-color); + width: 16px; + height: 16px; + border-radius: 20px; + margin-top: -6px; + border: 1px solid #999999; +} + +.sdpi-item[type="range"] .sdpi-item-group { + display: flex; + flex-direction: column; +} + +.xxsdpi-item[type="range"] .sdpi-item-group input { + max-width: 204px; +} + +.sdpi-item[type="range"] .sdpi-item-group span { + margin-left: 0px !important; +} + +.sdpi-item[type="range"] .sdpi-item-group > .sdpi-item-child { + display: flex; + flex-direction: row; +} + +.rangeLabel { + position:absolute; + font-weight:normal; + margin-top:22px; +} + +:disabled { + color: #993333; +} + +select, +select option { + color: var(--sdpi-color); +} + +select.disabled, +select option:disabled { + color: #fd9494; + font-style: italic; +} + +.runningAppsContainer { + display: none; +} + +/* debug +div { + background-color: rgba(64,128,255,0.2); +} +*/ + +.one-line { + min-height: 1.5em; +} + +.two-lines { + min-height: 3em; +} + +.three-lines { + min-height: 4.5em; +} + +.four-lines { + min-height: 6em; +} + +.min80 > .sdpi-item-child { + min-width: 80px; +} + +.min100 > .sdpi-item-child { + min-width: 100px; +} + +.min120 > .sdpi-item-child { + min-width: 120px; +} + +.min140 > .sdpi-item-child { + min-width: 140px; +} + +.min160 > .sdpi-item-child { + min-width: 160px; +} + +.min200 > .sdpi-item-child { + min-width: 200px; +} + +.max40 { + flex-basis: 40%; + flex-grow: 0; +} + +.max30 { + flex-basis: 30%; + flex-grow: 0; +} + +.max20 { + flex-basis: 20%; + flex-grow: 0; +} + +.up20 { + margin-top: -20px; +} + +.alignCenter { + align-items: center; +} + +.alignTop { + align-items: flex-start; +} + +.alignBaseline { + align-items: baseline; +} + +.noMargins, +.noMargins *, +.noInnerMargins * { + margin: 0; + padding: 0; +} + +.hidden { + display: none; +} + +.icon-brighter, +.icon-darker, +.icon-warmer, +.icon-cooler { + margin-top: 5px !important; + min-width: 20px; + width: 20px; + background-repeat: no-repeat; +} + +.icon-brighter { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cg fill='%23999' fill-rule='evenodd'%3E%3Ccircle cx='10' cy='10' r='4'/%3E%3Cpath d='M14.8532861,7.77530426 C14.7173255,7.4682615 14.5540843,7.17599221 14.3666368,6.90157083 L16.6782032,5.5669873 L17.1782032,6.4330127 L14.8532861,7.77530426 Z M10.5,4.5414007 C10.2777625,4.51407201 10.051423,4.5 9.82179677,4.5 C9.71377555,4.5 9.60648167,4.50311409 9.5,4.50925739 L9.5,2 L10.5,2 L10.5,4.5414007 Z M5.38028092,6.75545367 C5.18389364,7.02383457 5.01124349,7.31068015 4.86542112,7.61289977 L2.82179677,6.4330127 L3.32179677,5.5669873 L5.38028092,6.75545367 Z M4.86542112,12.3871002 C5.01124349,12.6893198 5.18389364,12.9761654 5.38028092,13.2445463 L3.32179677,14.4330127 L2.82179677,13.5669873 L4.86542112,12.3871002 Z M9.5,15.4907426 C9.60648167,15.4968859 9.71377555,15.5 9.82179677,15.5 C10.051423,15.5 10.2777625,15.485928 10.5,15.4585993 L10.5,18 L9.5,18 L9.5,15.4907426 Z M14.3666368,13.0984292 C14.5540843,12.8240078 14.7173255,12.5317385 14.8532861,12.2246957 L17.1782032,13.5669873 L16.6782032,14.4330127 L14.3666368,13.0984292 Z'/%3E%3C/g%3E%3C/svg%3E"); +} +.icon-darker { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cg fill='%23999' fill-rule='evenodd'%3E%3Cpath d='M10 14C7.790861 14 6 12.209139 6 10 6 7.790861 7.790861 6 10 6 12.209139 6 14 7.790861 14 10 14 12.209139 12.209139 14 10 14zM10 13C11.6568542 13 13 11.6568542 13 10 13 8.34314575 11.6568542 7 10 7 8.34314575 7 7 8.34314575 7 10 7 11.6568542 8.34314575 13 10 13zM14.8532861 7.77530426C14.7173255 7.4682615 14.5540843 7.17599221 14.3666368 6.90157083L16.6782032 5.5669873 17.1782032 6.4330127 14.8532861 7.77530426zM10.5 4.5414007C10.2777625 4.51407201 10.051423 4.5 9.82179677 4.5 9.71377555 4.5 9.60648167 4.50311409 9.5 4.50925739L9.5 2 10.5 2 10.5 4.5414007zM5.38028092 6.75545367C5.18389364 7.02383457 5.01124349 7.31068015 4.86542112 7.61289977L2.82179677 6.4330127 3.32179677 5.5669873 5.38028092 6.75545367zM4.86542112 12.3871002C5.01124349 12.6893198 5.18389364 12.9761654 5.38028092 13.2445463L3.32179677 14.4330127 2.82179677 13.5669873 4.86542112 12.3871002zM9.5 15.4907426C9.60648167 15.4968859 9.71377555 15.5 9.82179677 15.5 10.051423 15.5 10.2777625 15.485928 10.5 15.4585993L10.5 18 9.5 18 9.5 15.4907426zM14.3666368 13.0984292C14.5540843 12.8240078 14.7173255 12.5317385 14.8532861 12.2246957L17.1782032 13.5669873 16.6782032 14.4330127 14.3666368 13.0984292z'/%3E%3C/g%3E%3C/svg%3E"); +} +.icon-warmer { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cg fill='%23999' fill-rule='evenodd'%3E%3Cpath d='M12.3247275 11.4890349C12.0406216 11.0007637 11.6761954 10.5649925 11.2495475 10.1998198 11.0890394 9.83238991 11 9.42659309 11 9 11 7.34314575 12.3431458 6 14 6 15.6568542 6 17 7.34314575 17 9 17 10.6568542 15.6568542 12 14 12 13.3795687 12 12.8031265 11.8116603 12.3247275 11.4890349zM17.6232392 11.6692284C17.8205899 11.4017892 17.9890383 11.1117186 18.123974 10.8036272L20.3121778 12.0669873 19.8121778 12.9330127 17.6232392 11.6692284zM18.123974 7.19637279C17.9890383 6.88828142 17.8205899 6.5982108 17.6232392 6.33077158L19.8121778 5.0669873 20.3121778 5.9330127 18.123974 7.19637279zM14.5 4.52746439C14.3358331 4.50931666 14.1690045 4.5 14 4.5 13.8309955 4.5 13.6641669 4.50931666 13.5 4.52746439L13.5 2 14.5 2 14.5 4.52746439zM13.5 13.4725356C13.6641669 13.4906833 13.8309955 13.5 14 13.5 14.1690045 13.5 14.3358331 13.4906833 14.5 13.4725356L14.5 16 13.5 16 13.5 13.4725356zM14 11C15.1045695 11 16 10.1045695 16 9 16 7.8954305 15.1045695 7 14 7 12.8954305 7 12 7.8954305 12 9 12 10.1045695 12.8954305 11 14 11zM9.5 11C10.6651924 11.4118364 11.5 12.5 11.5 14 11.5 16 10 17.5 8 17.5 6 17.5 4.5 16 4.5 14 4.5 12.6937812 5 11.5 6.5 11L6.5 7 9.5 7 9.5 11z'/%3E%3Cpath d='M12,14 C12,16.209139 10.209139,18 8,18 C5.790861,18 4,16.209139 4,14 C4,12.5194353 4.80439726,11.2267476 6,10.5351288 L6,4 C6,2.8954305 6.8954305,2 8,2 C9.1045695,2 10,2.8954305 10,4 L10,10.5351288 C11.1956027,11.2267476 12,12.5194353 12,14 Z M11,14 C11,12.6937812 10.1651924,11.5825421 9,11.1707057 L9,4 C9,3.44771525 8.55228475,3 8,3 C7.44771525,3 7,3.44771525 7,4 L7,11.1707057 C5.83480763,11.5825421 5,12.6937812 5,14 C5,15.6568542 6.34314575,17 8,17 C9.65685425,17 11,15.6568542 11,14 Z'/%3E%3C/g%3E%3C/svg%3E"); +} + +.icon-cooler { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cg fill='%23999' fill-rule='evenodd'%3E%3Cpath d='M10.4004569 11.6239517C10.0554735 10.9863849 9.57597206 10.4322632 9 9.99963381L9 9.7450467 9.53471338 9.7450467 10.8155381 8.46422201C10.7766941 8.39376637 10.7419749 8.32071759 10.7117062 8.2454012L9 8.2454012 9 6.96057868 10.6417702 6.96057868C10.6677696 6.86753378 10.7003289 6.77722682 10.7389179 6.69018783L9.44918707 5.40045694 9 5.40045694 9 4.34532219 9.32816127 4.34532219 9.34532219 2.91912025 10.4004569 2.91912025 10.4004569 4.53471338 11.6098599 5.74411634C11.7208059 5.68343597 11.8381332 5.63296451 11.9605787 5.59396526L11.9605787 3.8884898 10.8181818 2.74609294 11.5642748 2 12.5727518 3.00847706 13.5812289 2 14.3273218 2.74609294 13.2454012 3.82801356 13.2454012 5.61756719C13.3449693 5.65339299 13.4408747 5.69689391 13.5324038 5.74735625L14.7450467 4.53471338 14.7450467 2.91912025 15.8001815 2.91912025 15.8001815 4.34532219 17.2263834 4.34532219 17.2263834 5.40045694 15.6963166 5.40045694 14.4002441 6.69652946C14.437611 6.78161093 14.4692249 6.86979146 14.4945934 6.96057868L16.2570138 6.96057868 17.3994107 5.81818182 18.1455036 6.56427476 17.1370266 7.57275182 18.1455036 8.58122888 17.3994107 9.32732182 16.3174901 8.2454012 14.4246574 8.2454012C14.3952328 8.31861737 14.3616024 8.38969062 14.3240655 8.45832192L15.6107903 9.7450467 17.2263834 9.7450467 17.2263834 10.8001815 15.8001815 10.8001815 15.8001815 12.2263834 14.7450467 12.2263834 14.7450467 10.6963166 13.377994 9.32926387C13.3345872 9.34850842 13.2903677 9.36625331 13.2454012 9.38243281L13.2454012 11.3174901 14.3273218 12.3994107 13.5812289 13.1455036 12.5848864 12.1491612 11.5642748 13.1455036 10.8181818 12.3994107 11.9605787 11.2570138 11.9605787 9.40603474C11.8936938 9.38473169 11.828336 9.36000556 11.7647113 9.33206224L10.4004569 10.6963166 10.4004569 11.6239517zM12.75 8.5C13.3022847 8.5 13.75 8.05228475 13.75 7.5 13.75 6.94771525 13.3022847 6.5 12.75 6.5 12.1977153 6.5 11.75 6.94771525 11.75 7.5 11.75 8.05228475 12.1977153 8.5 12.75 8.5zM9.5 14C8.5 16.3333333 7.33333333 17.5 6 17.5 4.66666667 17.5 3.5 16.3333333 2.5 14L9.5 14z'/%3E%3Cpath d='M10,14 C10,16.209139 8.209139,18 6,18 C3.790861,18 2,16.209139 2,14 C2,12.5194353 2.80439726,11.2267476 4,10.5351288 L4,4 C4,2.8954305 4.8954305,2 6,2 C7.1045695,2 8,2.8954305 8,4 L8,10.5351288 C9.19560274,11.2267476 10,12.5194353 10,14 Z M9,14 C9,12.6937812 8.16519237,11.5825421 7,11.1707057 L7,4 C7,3.44771525 6.55228475,3 6,3 C5.44771525,3 5,3.44771525 5,4 L5,11.1707057 C3.83480763,11.5825421 3,12.6937812 3,14 C3,15.6568542 4.34314575,17 6,17 C7.65685425,17 9,15.6568542 9,14 Z'/%3E%3C/g%3E%3C/svg%3E"); +} + +.kelvin::after { + content: "K"; +} + +.mired::after { + content: " Mired"; +} + +.percent::after { + content: "%"; +} + +.sdpi-item-value + .icon-cooler, +.sdpi-item-value + .icon-warmer { + margin-left: 0px !important; + margin-top: 15px !important; +} + +/** + CONTROL-CENTER STYLES +*/ +input[type="range"].colorbrightness::-webkit-slider-runnable-track, +input[type="range"].colortemperature::-webkit-slider-runnable-track { + height: 8px; + background: #979797; + border-radius: 4px; + background-image: linear-gradient(to right,#94d0ec, #ffb165); +} + +input[type="range"].colorbrightness::-webkit-slider-runnable-track { + background-color: #efefef; + background-image: linear-gradient(to right, black , rgba(0,0,0,0)); +} + + +input[type="range"].colorbrightness::-webkit-slider-thumb, +input[type="range"].colortemperature::-webkit-slider-thumb { + width: 16px; + height: 16px; + border-radius: 20px; + margin-top: -5px; + background-color: #86c6e8; + box-shadow: 0px 0px 1px #000000; + border: 1px solid #d8d8d8; +} +.sdpi-info-label { + display: inline-block; + user-select: none; + position: absolute; + height: 15px; + width: auto; + text-align: center; + border-radius: 4px; + min-width: 44px; + max-width: 80px; + background: white; + font-size: 11px; + color: black; + z-index: 1000; + box-shadow: 0px 0px 12px rgba(0,0,0,.8); + padding: 2px; + +} + +.sdpi-info-label.hidden { + opacity: 0; + transition: opacity 0.25s linear; +} + +.sdpi-info-label.shown { + position: absolute; + opacity: 1; + transition: opacity 0.25s ease-out; +} \ No newline at end of file diff --git a/propertyinspector/index_pi.html b/propertyinspector/index_pi.html new file mode 100644 index 0000000..4bc0bd4 --- /dev/null +++ b/propertyinspector/index_pi.html @@ -0,0 +1,66 @@ + + + + + + + + + Property Inspector Samples PI + + + + + + +
+ +
+
SSH IP/Host
+ +
+ +
+
Username
+ +
+ +
+
Password
+ +
+ +
+
SSH Key
+
+ + + +
+
+ + + +
+
Command
+ +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/propertyinspector/index_pi.js b/propertyinspector/index_pi.js new file mode 100644 index 0000000..fc7f32e --- /dev/null +++ b/propertyinspector/index_pi.js @@ -0,0 +1,274 @@ +// this is our global websocket, used to communicate from/to Stream Deck software +// and some info about our plugin, as sent by Stream Deck software +var websocket = null, + uuid = null, + actionInfo = {}, + settings = {}, + isQT = navigator.appVersion.includes('QtWebEngine'); // 'oninput'; // change this, if you want interactive elements act on any change, or while they're modified + +function connectSocket ( + inPort, + inUUID, + inMessageType, + inApplicationInfo, + inActionInfo +) { + connectElgatoStreamDeckSocket( + inPort, + inUUID, + inMessageType, + inApplicationInfo, + inActionInfo + ); +} + +function connectElgatoStreamDeckSocket (inPort, inUUID, inRegisterEvent, inInfo, inActionInfo) { + uuid = inUUID; + // please note: the incoming arguments are of type STRING, so + // in case of the inActionInfo, we must parse it into JSON first + actionInfo = JSON.parse(inActionInfo); // cache the info + inInfo = JSON.parse(inInfo); + websocket = new WebSocket('ws://localhost:' + inPort); + + /** Since the PI doesn't have access to your OS native settings + * Stream Deck sends some color settings to PI + * We use these to adjust some styles (e.g. highlight-colors for checkboxes) + */ + addDynamicStyles(inInfo.colors, 'connectElgatoStreamDeckSocket'); + + /** let's see, if we have some settings */ + settings = getPropFromString(actionInfo, 'payload.settings'); + console.log(settings, actionInfo); + initPropertyInspector(5); + + // if connection was established, the websocket sends + // an 'onopen' event, where we need to register our PI + websocket.onopen = function () { + var json = { + event: inRegisterEvent, + uuid: inUUID + }; + + websocket.send(JSON.stringify(json)); + }; + + websocket.onmessage = function (evt) { + // Received message from Stream Deck + var jsonObj = JSON.parse(evt.data); + var event = jsonObj['event']; + }; +} + +function initPropertyInspector(initDelay) { + if (actionInfo['action'] == 'tf.meow.remote.website') { + $('#url_container').show(); + $('#url_background_container').show(); + } + + Object.keys(settings).forEach(function (item) { + $('#' + item).val(settings[item]); + }); + + $('input').each(function() { + var $this = $(this), + id = $this.attr('id'); + + let $item = $this.closest('.sdpi-item'); + + $this.on('change', function(e) { + const type = $this.attr('type'); + + if (type) { + const info = $item.find('.sdpi-file-info'); + + if (info) { + const s = decodeURIComponent($this.val().replace(/^C:\\fakepath\\/, '')).split('/').pop(); + + info.text(s.length > 28 + ? s.substr(0, 10) + + '...' + + s.substr(s.length - 10, s.length) + : s); + } + } + + let val = $this.val(); + + switch (type) { + case 'checkbox': + if (val == 'false' || val == 'true') { + val = (/^true$/i).test(val); + } + break; + } + + updateSetting(id, val); + }); + }); + + $('#ssh_key').change(function(e) { + if (e.target.files.length < 1) { + // Hide passphrase field + $('#ssh_key_passphrase_container').hide(); + $('#ssh_password_container').show(); + } else { + $('#ssh_password_container').hide(); + } + + var f = e.target.files[0]; + + var reader = new FileReader(); + + // Closure to capture the file information. + reader.onload = function(e) { + var result = e.target.result; + + var pki = forge.pki; + + try { + pki.privateKeyFromPem(result); + $('#ssh_key_passphrase_container').hide(); + } catch (ex) { + if (ex.message.indexOf('PEM is encrypted.') !== -1) { + $('#ssh_key_passphrase_container').show(); + } else { + // Show error message? + } + } + }; + + // Read in the image file as a data URL. + reader.readAsText(f); + }); +} + +if (!isQT) { + document.addEventListener('DOMContentLoaded', function () { + initPropertyInspector(100); + }); +} + +/** Stream Deck software passes system-highlight color information + * to Property Inspector. Here we 'inject' the CSS styles into the DOM + * when we receive this information. */ +function addDynamicStyles (clrs, fromWhere) { + const node = document.getElementById('#sdpi-dynamic-styles') || document.createElement('style'); + if (!clrs.mouseDownColor) clrs.mouseDownColor = fadeColor(clrs.highlightColor, -100); + const clr = clrs.highlightColor.slice(0, 7); + const clr1 = fadeColor(clr, 100); + const clr2 = fadeColor(clr, 60); + const metersActiveColor = fadeColor(clr, -60); + + node.setAttribute('id', 'sdpi-dynamic-styles'); + node.innerHTML = ` + + input[type="radio"]:checked + label span, + input[type="checkbox"]:checked + label span { + background-color: ${clrs.highlightColor}; + } + + input[type="radio"]:active:checked + label span, + input[type="radio"]:active + label span, + input[type="checkbox"]:active:checked + label span, + input[type="checkbox"]:active + label span { + background-color: ${clrs.mouseDownColor}; + } + + input[type="radio"]:active + label span, + input[type="checkbox"]:active + label span { + background-color: ${clrs.buttonPressedBorderColor}; + } + + td.selected, + td.selected:hover, + li.selected:hover, + li.selected { + color: white; + background-color: ${clrs.highlightColor}; + } + + .sdpi-file-label > label:active, + .sdpi-file-label.file:active, + label.sdpi-file-label:active, + label.sdpi-file-info:active, + input[type="file"]::-webkit-file-upload-button:active, + button:active { + background-color: ${clrs.buttonPressedBackgroundColor}; + color: ${clrs.buttonPressedTextColor}; + border-color: ${clrs.buttonPressedBorderColor}; + } + + ::-webkit-progress-value, + meter::-webkit-meter-optimum-value { + background: linear-gradient(${clr2}, ${clr1} 20%, ${clr} 45%, ${clr} 55%, ${clr2}) + } + + ::-webkit-progress-value:active, + meter::-webkit-meter-optimum-value:active { + background: linear-gradient(${clr}, ${clr2} 20%, ${metersActiveColor} 45%, ${metersActiveColor} 55%, ${clr}) + } + `; + document.body.appendChild(node); +}; + +/** UTILITIES */ + +/** get a JSON property from a (dot-separated) string + * Works on nested JSON, e.g.: + * jsn = { + * propA: 1, + * propB: 2, + * propC: { + * subA: 3, + * subB: { + * testA: 5, + * testB: 'Hello' + * } + * } + * } + * getPropFromString(jsn,'propC.subB.testB') will return 'Hello'; + */ +const getPropFromString = (jsn, str, sep = '.') => { + const arr = str.split(sep); + return arr.reduce((obj, key) => + (obj && obj.hasOwnProperty(key)) ? obj[key] : undefined, jsn); +}; + +/* + Quick utility to lighten or darken a color (doesn't take color-drifting, etc. into account) + Usage: + fadeColor('#061261', 100); // will lighten the color + fadeColor('#200867'), -100); // will darken the color +*/ +function fadeColor (col, amt) { + const min = Math.min, max = Math.max; + const num = parseInt(col.replace(/#/g, ''), 16); + const r = min(255, max((num >> 16) + amt, 0)); + const g = min(255, max((num & 0x0000FF) + amt, 0)); + const b = min(255, max(((num >> 8) & 0x00FF) + amt, 0)); + return '#' + (g | (b << 8) | (r << 16)).toString(16).padStart(6, 0); +} + +function updateSetting(setting, value) { + if (!settings) { + settings = {}; + } + + settings[setting] = value; + + setSettings(settings); +} + +function setSettings(settings) { + var json = { + "event": "setSettings", + "context": uuid, + "payload": settings + }; + + if (websocket) { + websocket.send(JSON.stringify(json)); + } else { + console.log('Update:', json); + } +} \ No newline at end of file diff --git a/propertyinspector/index_pi_server.html b/propertyinspector/index_pi_server.html new file mode 100644 index 0000000..3041dd5 --- /dev/null +++ b/propertyinspector/index_pi_server.html @@ -0,0 +1,47 @@ + + + + + + + + + StreamDeck Remote - Server + + + + +
+ +
+
Host
+ +
+ +
+
Token
+ +
+ + + + + +
+ + + + + + + \ No newline at end of file diff --git a/remote.go b/remote.go new file mode 100644 index 0000000..60e529a --- /dev/null +++ b/remote.go @@ -0,0 +1,31 @@ +package main + +import ( + "log" + "meow.tf/streamdeck/sdk" + "os" +) + +const ( + sshAction = "tf.meow.remote.ssh" + websiteAction = "tf.meow.remote.website" +) + +func main() { + f, err := os.Create("log.txt") + + if err == nil { + log.SetOutput(f) + } + + sdk.RegisterAction(sshAction, sshActionHandler) + sdk.RegisterAction(websiteAction, serverActionHandler(websiteActionHandler)) + + err = sdk.Open() + + if err != nil { + log.Fatalln(err) + } + + sdk.Wait() +} \ No newline at end of file diff --git a/server.go b/server.go new file mode 100644 index 0000000..c6ad5e8 --- /dev/null +++ b/server.go @@ -0,0 +1,81 @@ +package main + +import ( + "github.com/valyala/fastjson" + "io" + "io/ioutil" + "log" + "meow.tf/streamdeck-remote/client" + "meow.tf/streamdeck/sdk" + "net" + "net/http" +) + +type serverActionFunc func(context, host, token string, settings *fastjson.Value) + +func serverActionHandler(f serverActionFunc) sdk.ActionHandler{ + return func(action, context string, payload *fastjson.Value, deviceId string) { + settings := payload.Get("settings") + + host := sdk.JsonStringValue(settings, "remote_host") + + if host == "" { + return + } + + h, p, err := net.SplitHostPort(host) + + // Ensure there's a host + port + if err != nil { + h = host + p = "4443" + } + + host = net.JoinHostPort(h, p) + + log.Println("Using host", host) + + token := sdk.JsonStringValue(settings, "remote_token") + + if token == "" { + return + } + + f(context, host, token, settings) + } +} + +func websiteActionHandler(context, host, token string, settings *fastjson.Value) { + c := client.New(host, token) + + url := sdk.JsonStringValue(settings, "url") + + if url == "" { + return + } + + background := settings.GetBool("background") + + var err error + + if background { + // Use Go to visit URL + res, err := http.Get(url) + + if err == nil { + defer res.Body.Close() + + _, err = io.Copy(ioutil.Discard, res.Body) + } + } else { + err = c.OpenURL(url) + } + + if err != nil { + log.Println("error opening url:", err) + + sdk.ShowAlert(context) + } else { + sdk.ShowOk(context) + } +} diff --git a/ssh.go b/ssh.go new file mode 100644 index 0000000..97a65af --- /dev/null +++ b/ssh.go @@ -0,0 +1,99 @@ +package main + +import ( + "github.com/valyala/fastjson" + "golang.org/x/crypto/ssh" + "io/ioutil" + "meow.tf/streamdeck/sdk" + "os" +) + +func sshActionHandler(action, context string, payload *fastjson.Value, deviceId string) { + settings := payload.Get("settings") + + if settings == nil { + sdk.ShowAlert(context) + return + } + + user := sdk.JsonStringValue(settings, "ssh_user") + + host := sdk.JsonStringValue(settings, "ssh_host") + + if host == "" { + sdk.ShowAlert(context) + return + } + + command := sdk.JsonStringValue(settings, "ssh_command") + + if command == "" { + sdk.ShowAlert(context) + return + } + + config := &ssh.ClientConfig{ + User: user, + } + + if keyFile := sdk.JsonStringValue(settings, "ssh_key"); keyFile != "" { + s, err := loadPrivateKey(keyFile, sdk.JsonStringValue(settings, "ssh_key_passphrase")) + + if err != nil { + sdk.ShowAlert(context) + return + } + + config.Auth = []ssh.AuthMethod{ + ssh.PublicKeys(s), + } + } else if password := sdk.JsonStringValue(settings, "ssh_password"); password != "" { + config.Auth = []ssh.AuthMethod{ + ssh.Password(password), + } + } + + client, err := ssh.Dial("tcp", host, config) + + if err != nil { + sdk.ShowAlert(context) + return + } + + session, err := client.NewSession() + + if err != nil { + sdk.ShowAlert(context) + return + } + + err = session.Run(command) + + if err == nil { + sdk.ShowOk(context) + } else { + sdk.ShowAlert(context) + } +} + +func loadPrivateKey(file, passphrase string) (ssh.Signer, error) { + f, err := os.Open(file) + + if err != nil { + return nil, err + } + + defer f.Close() + + b, err := ioutil.ReadAll(f) + + if err != nil { + return nil, err + } + + if passphrase != "" { + return ssh.ParsePrivateKeyWithPassphrase(b, []byte(passphrase)) + } + + return ssh.ParsePrivateKey(b) +}