Browse Source

Updated icons

TC 2 days ago
parent
commit
fee54fcbfa

File diff suppressed because it is too large
+ 6 - 6
designs/font_logo.ai


+ 30 - 29
designs/font_logo.svg

@@ -2,35 +2,36 @@
 <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" id="圖層_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
-	 width="1024px" height="256px" viewBox="0 0 1024 256" enable-background="new 0 0 1024 256" xml:space="preserve">
-<path fill="#2EBE7E" d="M231.785,196.207c0,23.753-19.256,43.01-43.01,43.01H54.676c-23.754,0-43.01-19.257-43.01-43.01V59.792
-	c0-23.754,19.256-43.01,43.01-43.01h134.098c23.754,0,43.01,19.255,43.01,43.01V196.207z"/>
-<path fill="#FFFFFF" d="M203.562,54.28v17.088c0,82.257-45.903,119.618-102.529,119.618l-32.102-0.002
-	c-1.386,7.795-2.074,16.296-2.074,25.634H49.769c0-11.644,0.988-22.218,2.954-31.886c-1.969-11.058-2.954-26.063-2.954-45.011
-	c0-47.188,38.253-85.441,85.441-85.441C152.297,54.28,169.385,62.825,203.562,54.28z M135.209,71.368
-	c-37.75,0-68.353,30.604-68.353,68.354c0,3.097,0.027,6.075,0.082,8.937c10.718-16.897,26.414-30.257,46.943-41.987l8.478,14.836
-	c-24.392,13.938-40.573,29.779-48.879,52.391h27.552c51.395,0,84.34-33.945,85.414-99.217c-11.722,1.14-22.615,0.414-36.051-1.602
-	C140.56,71.602,138.634,71.368,135.209,71.368z"/>
+	 width="2048px" height="512px" viewBox="0 0 2048 512" enable-background="new 0 0 2048 512" xml:space="preserve">
 <g>
-	<path fill="#2EBE7E" d="M275.729,71.932h34.453c36.546,0,60.695,17.709,60.695,59.408c0,41.697-24.149,60.533-59.085,60.533
-		h-36.063V71.932z M308.411,168.689c19.319,0,33.004-8.854,33.004-37.35c0-28.497-13.685-36.386-33.004-36.386h-3.864v73.735
-		H308.411z"/>
-	<path fill="#2EBE7E" d="M385.69,145.99c0-29.624,21.412-47.977,43.469-47.977c26.403,0,39.283,19.158,39.283,44.113
-		c0,5.151-0.645,10.143-1.289,12.396h-53.772c2.576,12.558,11.27,17.71,22.861,17.71c6.601,0,12.719-1.932,19.32-5.797l9.499,17.227
-		c-9.499,6.762-22.056,10.465-32.682,10.465C405.975,194.127,385.69,176.418,385.69,145.99z M444.131,135.686
-		c0-9.015-4.025-15.777-14.49-15.777c-7.889,0-14.812,4.991-16.744,15.777H444.131z"/>
-	<path fill="#2EBE7E" d="M480.68,176.579l37.189-53.934h-33.003v-22.378h68.746v15.294l-37.189,53.934h38.477v22.378H480.68V176.579
-		z"/>
-	<path fill="#2EBE7E" d="M567.943,156.938v-56.67H596.6v53.128c0,12.558,3.381,16.261,10.625,16.261
-		c6.441,0,10.465-2.576,15.295-9.338v-60.051h28.658v91.606h-23.346l-2.092-12.557h-0.645c-7.566,9.016-16.1,14.811-28.496,14.811
-		C576.475,194.127,567.943,179.799,567.943,156.938z"/>
-	<path fill="#2EBE7E" d="M676.455,71.932h28.818v47.494h0.482l33.971-47.494h31.555l-36.225,48.137l42.986,71.804h-31.395
-		l-28.336-49.104l-13.039,17.71v31.394h-28.818V71.932z"/>
-	<path fill="#2EBE7E" d="M771.766,71.932h30.43l13.684,54.738c3.543,12.879,5.957,25.115,9.338,38.317h0.805
-		c3.543-13.202,5.957-25.438,9.338-38.317l13.523-54.738h29.301l-35.9,119.941h-34.615L771.766,71.932z"/>
-	<path fill="#2EBE7E" d="M890.582,71.932h31.072l18.998,51.84c2.414,6.923,4.346,14.489,6.6,21.734h0.807
-		c2.414-7.245,4.346-14.812,6.6-21.734l18.354-51.84h31.234v119.941h-26.242V150.82c0-11.914,2.254-29.785,3.863-41.538h-0.805
-		l-9.982,28.657l-16.1,43.791h-15.777l-16.26-43.791l-9.66-28.657h-0.645c1.449,11.753,3.703,29.624,3.703,41.538v41.053h-25.76
-		V71.932z"/>
+	<path fill="#0A6EF5" d="M576.913,154.73h68.14c72.278,0,120.04,35.025,120.04,117.495c0,82.467-47.762,119.719-116.857,119.719
+		h-71.323V154.73z M641.549,346.092c38.211,0,65.273-17.51,65.273-73.867c0-56.359-27.063-71.962-65.273-71.962h-7.641v145.83
+		H641.549z"/>
+	<path fill="#0A6EF5" d="M794.389,301.199c0-58.587,42.348-94.885,85.97-94.885c52.222,0,77.692,37.89,77.692,87.243
+		c0,10.188-1.274,20.061-2.547,24.518H849.156c5.095,24.836,22.288,35.025,45.214,35.025c13.056,0,25.154-3.82,38.211-11.465
+		l18.784,34.07c-18.784,13.373-43.622,20.697-64.636,20.697C834.508,396.402,794.389,361.377,794.389,301.199z M909.971,280.818
+		c0-17.83-7.959-31.203-28.656-31.203c-15.602,0-29.293,9.871-33.113,31.203H909.971z"/>
+	<path fill="#0A6EF5" d="M982.256,361.697l73.551-106.668h-65.273v-44.258h135.962v30.248l-73.551,106.667h76.098v44.258H982.256
+		V361.697z"/>
+	<path fill="#0A6EF5" d="M1154.842,322.85V210.771h56.676v105.075c0,24.836,6.686,32.158,21.014,32.158
+		c12.738,0,20.695-5.094,30.248-18.467V210.771h56.68v181.172h-46.172l-4.137-24.834h-1.275
+		c-14.965,17.832-31.842,29.293-56.357,29.293C1171.715,396.402,1154.842,368.064,1154.842,322.85z"/>
+	<path fill="#0A6EF5" d="M1369.451,154.73h56.996v93.932h0.953l67.186-93.932h62.408l-71.645,95.204l85.018,142.009h-62.092
+		l-56.041-97.113l-25.787,35.025v62.088h-56.996V154.73z"/>
+	<path fill="#0A6EF5" d="M1557.951,154.73h60.184l27.063,108.258c7.006,25.473,11.781,49.672,18.467,75.783h1.592
+		c7.008-26.111,11.781-50.311,18.469-75.783l26.746-108.258h57.949l-71.002,237.213h-68.461L1557.951,154.73z"/>
+	<path fill="#0A6EF5" d="M1792.941,154.73h61.453l37.574,102.528c4.773,13.691,8.594,28.656,13.051,42.986h1.596
+		c4.775-14.33,8.596-29.295,13.053-42.986l36.299-102.528h61.773v237.213h-51.9v-81.191c0-23.563,4.457-58.908,7.641-82.15h-1.592
+		l-19.742,56.675l-31.842,86.607h-31.203l-32.158-86.607l-19.105-56.675h-1.273c2.865,23.242,7.322,58.587,7.322,82.15v81.191
+		h-50.945V154.73z"/>
 </g>
+<path fill="#0A6EF5" d="M512,417c0,54.676-44.791,99-100.042,99H100.042C44.79,516,0,471.676,0,417V103C0,48.324,44.79,4,100.042,4
+	h311.916C467.209,4,512,48.324,512,103V417z"/>
+<circle fill="none" stroke="#FFFFFF" stroke-width="70" stroke-miterlimit="10" cx="256" cy="260" r="173"/>
+<polygon fill="#0A6EF5" points="195.561,174.517 120.721,68.667 233.953,45.676 245.063,153.666 "/>
+<polygon fill="#0A6EF5" points="242.833,389.995 233.137,482.274 131.266,436.419 176.432,372.54 "/>
+<circle fill="#FFFFFF" cx="177.615" cy="195.633" r="21.115"/>
+<circle fill="#FFFFFF" cx="257.385" cy="229.261" r="21.115"/>
+<polygon fill="#FFFFFF" points="438.65,212.109 371.779,118.573 486.219,107.43 "/>
+<polygon fill="#FFFFFF" points="363.44,119.377 256,97.143 328.977,15.213 "/>
 </svg>

File diff suppressed because it is too large
+ 5 - 5
designs/logo.ai


+ 21 - 10
designs/logo.svg

@@ -1,14 +1,25 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" id="圖層_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
-	 width="512px" height="512px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve">
-<path fill="#2EBE7E" d="M509.667,413c0,54.676-44.324,99-99,99H102c-54.676,0-99-44.324-99-99V99C3,44.324,47.324,0,102,0h308.667
-	c54.676,0,99,44.324,99,99V413z"/>
-<path fill="#FFFFFF" d="M444.704,86.312v39.334c0,189.34-105.66,275.334-236.001,275.334l-73.893-0.002
-	c-3.189,17.939-4.773,37.508-4.773,59.002H90.703c0-26.799,2.275-51.139,6.8-73.393c-4.532-25.451-6.8-59.994-6.8-103.607
-	c0-108.617,88.051-196.668,196.667-196.668C326.704,86.312,366.036,105.98,444.704,86.312z M287.37,125.646
-	c-86.892,0-157.333,70.441-157.333,157.334c0,7.127,0.063,13.984,0.188,20.57c24.67-38.893,60.799-69.643,108.055-96.646
-	l19.515,34.15c-56.146,32.083-93.39,68.544-112.511,120.589l63.42,0.002c118.3,0,194.134-78.137,196.607-228.375
-	c-26.982,2.624-52.055,0.95-82.984-3.689C299.687,126.185,295.253,125.646,287.37,125.646z"/>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="512px"
+	 height="512px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve">
+<g id="圖層_1">
+	<path fill="#0A6EF5" d="M512,413c0,54.676-44.791,99-100.042,99H100.042C44.79,512,0,467.676,0,413V99C0,44.324,44.79,0,100.042,0
+		h311.916C467.209,0,512,44.324,512,99V413z"/>
+	<circle fill="none" stroke="#FFFFFF" stroke-width="70" stroke-miterlimit="10" cx="256" cy="256" r="173"/>
+	<polygon fill="#0A6EF5" points="195.561,170.517 120.721,64.667 233.954,41.676 245.062,149.666 	"/>
+	<polygon fill="#0A6EF5" points="242.833,385.995 233.136,478.274 131.266,432.419 176.431,368.54 	"/>
+	<circle fill="#FFFFFF" cx="177.615" cy="191.632" r="21.115"/>
+	<circle fill="#FFFFFF" cx="257.385" cy="225.261" r="21.115"/>
+	<polygon fill="#FFFFFF" points="438.65,208.109 371.779,114.573 486.219,103.43 	"/>
+	<polygon fill="#FFFFFF" points="363.44,115.377 256,93.143 328.977,11.213 	"/>
+</g>
+<g id="圖層_2" display="none">
+	<line display="inline" fill="none" stroke="#E4007F" stroke-miterlimit="10" x1="75" y1="0" x2="75" y2="512"/>
+	<line display="inline" fill="none" stroke="#E4007F" stroke-miterlimit="10" x1="75" y1="0" x2="256" y2="256"/>
+	<line display="inline" fill="none" stroke="#E4007F" stroke-miterlimit="10" x1="256" y1="256" x2="75" y2="512"/>
+	<line display="inline" fill="none" stroke="#E60012" stroke-miterlimit="10" x1="256" y1="256" x2="229.667" y2="0"/>
+	<line display="inline" fill="none" stroke="#E60012" stroke-miterlimit="10" x1="229.667" y1="0" x2="229.667" y2="512"/>
+	<line display="inline" fill="none" stroke="#E60012" stroke-miterlimit="10" x1="256" y1="256" x2="229.667" y2="512"/>
+</g>
 </svg>

BIN
dezukvmd/dezukvmd


+ 1 - 1
dezukvmd/go.mod

@@ -4,7 +4,7 @@ go 1.23.4
 
 require (
 	github.com/google/uuid v1.6.0
-	github.com/gorilla/csrf v1.7.3
+	github.com/gorilla/csrf v1.7.2
 	github.com/gorilla/websocket v1.5.3
 	github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07
 	github.com/vladimirvivien/go4vl v0.0.5

+ 2 - 2
dezukvmd/go.sum

@@ -2,8 +2,8 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
 github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
 github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/gorilla/csrf v1.7.3 h1:BHWt6FTLZAb2HtWT5KDBf6qgpZzvtbp9QWDRKZMXJC0=
-github.com/gorilla/csrf v1.7.3/go.mod h1:F1Fj3KG23WYHE6gozCmBAezKookxbIvUJT+121wTuLk=
+github.com/gorilla/csrf v1.7.2 h1:oTUjx0vyf2T+wkrx09Trsev1TE+/EbDAeHtSTbtC2eI=
+github.com/gorilla/csrf v1.7.2/go.mod h1:F1Fj3KG23WYHE6gozCmBAezKookxbIvUJT+121wTuLk=
 github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kXD8ePA=
 github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo=
 github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=

+ 12 - 9
dezukvmd/ipkvm.go

@@ -17,9 +17,20 @@ import (
 
 var (
 	dezukvmManager     *dezukvm.DezukVM
+	csrfMiddleware     func(http.Handler) http.Handler
 	listeningServerMux *http.ServeMux
 )
 
+func init() {
+	csrfMiddleware = csrf.Protect(
+		[]byte(nodeUUID),
+		csrf.CookieName("dezukvm_csrf_token"),
+		csrf.Secure(false),
+		csrf.Path("/"),
+		csrf.SameSite(csrf.SameSiteLaxMode),
+	)
+}
+
 func init_ipkvm_mode() error {
 	listeningServerMux = http.NewServeMux()
 	//Create a new DezukVM manager
@@ -89,15 +100,7 @@ func init_ipkvm_mode() error {
 	// Register DezukVM related APIs
 	register_ipkvm_apis(listeningServerMux)
 
-	csrfMiddleware := csrf.Protect(
-		[]byte(nodeUUID),
-		csrf.CookieName("dezukvm_csrf_token"),
-		csrf.Secure(false),
-		csrf.Path("/"),
-		csrf.SameSite(csrf.SameSiteLaxMode),
-	)
-
-	err = http.ListenAndServe(":9000", csrfMiddleware(listeningServerMux))
+	err = http.ListenAndServe(":9000", listeningServerMux)
 	return err
 }
 

BIN
dezukvmd/resources/logo.png


BIN
dezukvmd/www/favicon.png


+ 30 - 29
dezukvmd/www/img/font_logo.svg

@@ -2,35 +2,36 @@
 <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" id="圖層_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
-	 width="1024px" height="256px" viewBox="0 0 1024 256" enable-background="new 0 0 1024 256" xml:space="preserve">
-<path fill="#2EBE7E" d="M231.785,196.207c0,23.753-19.256,43.01-43.01,43.01H54.676c-23.754,0-43.01-19.257-43.01-43.01V59.792
-	c0-23.754,19.256-43.01,43.01-43.01h134.098c23.754,0,43.01,19.255,43.01,43.01V196.207z"/>
-<path fill="#FFFFFF" d="M203.562,54.28v17.088c0,82.257-45.903,119.618-102.529,119.618l-32.102-0.002
-	c-1.386,7.795-2.074,16.296-2.074,25.634H49.769c0-11.644,0.988-22.218,2.954-31.886c-1.969-11.058-2.954-26.063-2.954-45.011
-	c0-47.188,38.253-85.441,85.441-85.441C152.297,54.28,169.385,62.825,203.562,54.28z M135.209,71.368
-	c-37.75,0-68.353,30.604-68.353,68.354c0,3.097,0.027,6.075,0.082,8.937c10.718-16.897,26.414-30.257,46.943-41.987l8.478,14.836
-	c-24.392,13.938-40.573,29.779-48.879,52.391h27.552c51.395,0,84.34-33.945,85.414-99.217c-11.722,1.14-22.615,0.414-36.051-1.602
-	C140.56,71.602,138.634,71.368,135.209,71.368z"/>
+	 width="2048px" height="512px" viewBox="0 0 2048 512" enable-background="new 0 0 2048 512" xml:space="preserve">
 <g>
-	<path fill="#2EBE7E" d="M275.729,71.932h34.453c36.546,0,60.695,17.709,60.695,59.408c0,41.697-24.149,60.533-59.085,60.533
-		h-36.063V71.932z M308.411,168.689c19.319,0,33.004-8.854,33.004-37.35c0-28.497-13.685-36.386-33.004-36.386h-3.864v73.735
-		H308.411z"/>
-	<path fill="#2EBE7E" d="M385.69,145.99c0-29.624,21.412-47.977,43.469-47.977c26.403,0,39.283,19.158,39.283,44.113
-		c0,5.151-0.645,10.143-1.289,12.396h-53.772c2.576,12.558,11.27,17.71,22.861,17.71c6.601,0,12.719-1.932,19.32-5.797l9.499,17.227
-		c-9.499,6.762-22.056,10.465-32.682,10.465C405.975,194.127,385.69,176.418,385.69,145.99z M444.131,135.686
-		c0-9.015-4.025-15.777-14.49-15.777c-7.889,0-14.812,4.991-16.744,15.777H444.131z"/>
-	<path fill="#2EBE7E" d="M480.68,176.579l37.189-53.934h-33.003v-22.378h68.746v15.294l-37.189,53.934h38.477v22.378H480.68V176.579
-		z"/>
-	<path fill="#2EBE7E" d="M567.943,156.938v-56.67H596.6v53.128c0,12.558,3.381,16.261,10.625,16.261
-		c6.441,0,10.465-2.576,15.295-9.338v-60.051h28.658v91.606h-23.346l-2.092-12.557h-0.645c-7.566,9.016-16.1,14.811-28.496,14.811
-		C576.475,194.127,567.943,179.799,567.943,156.938z"/>
-	<path fill="#2EBE7E" d="M676.455,71.932h28.818v47.494h0.482l33.971-47.494h31.555l-36.225,48.137l42.986,71.804h-31.395
-		l-28.336-49.104l-13.039,17.71v31.394h-28.818V71.932z"/>
-	<path fill="#2EBE7E" d="M771.766,71.932h30.43l13.684,54.738c3.543,12.879,5.957,25.115,9.338,38.317h0.805
-		c3.543-13.202,5.957-25.438,9.338-38.317l13.523-54.738h29.301l-35.9,119.941h-34.615L771.766,71.932z"/>
-	<path fill="#2EBE7E" d="M890.582,71.932h31.072l18.998,51.84c2.414,6.923,4.346,14.489,6.6,21.734h0.807
-		c2.414-7.245,4.346-14.812,6.6-21.734l18.354-51.84h31.234v119.941h-26.242V150.82c0-11.914,2.254-29.785,3.863-41.538h-0.805
-		l-9.982,28.657l-16.1,43.791h-15.777l-16.26-43.791l-9.66-28.657h-0.645c1.449,11.753,3.703,29.624,3.703,41.538v41.053h-25.76
-		V71.932z"/>
+	<path fill="#0A6EF5" d="M576.913,154.73h68.14c72.278,0,120.04,35.025,120.04,117.495c0,82.467-47.762,119.719-116.857,119.719
+		h-71.323V154.73z M641.549,346.092c38.211,0,65.273-17.51,65.273-73.867c0-56.359-27.063-71.962-65.273-71.962h-7.641v145.83
+		H641.549z"/>
+	<path fill="#0A6EF5" d="M794.389,301.199c0-58.587,42.348-94.885,85.97-94.885c52.222,0,77.692,37.89,77.692,87.243
+		c0,10.188-1.274,20.061-2.547,24.518H849.156c5.095,24.836,22.288,35.025,45.214,35.025c13.056,0,25.154-3.82,38.211-11.465
+		l18.784,34.07c-18.784,13.373-43.622,20.697-64.636,20.697C834.508,396.402,794.389,361.377,794.389,301.199z M909.971,280.818
+		c0-17.83-7.959-31.203-28.656-31.203c-15.602,0-29.293,9.871-33.113,31.203H909.971z"/>
+	<path fill="#0A6EF5" d="M982.256,361.697l73.551-106.668h-65.273v-44.258h135.962v30.248l-73.551,106.667h76.098v44.258H982.256
+		V361.697z"/>
+	<path fill="#0A6EF5" d="M1154.842,322.85V210.771h56.676v105.075c0,24.836,6.686,32.158,21.014,32.158
+		c12.738,0,20.695-5.094,30.248-18.467V210.771h56.68v181.172h-46.172l-4.137-24.834h-1.275
+		c-14.965,17.832-31.842,29.293-56.357,29.293C1171.715,396.402,1154.842,368.064,1154.842,322.85z"/>
+	<path fill="#0A6EF5" d="M1369.451,154.73h56.996v93.932h0.953l67.186-93.932h62.408l-71.645,95.204l85.018,142.009h-62.092
+		l-56.041-97.113l-25.787,35.025v62.088h-56.996V154.73z"/>
+	<path fill="#0A6EF5" d="M1557.951,154.73h60.184l27.063,108.258c7.006,25.473,11.781,49.672,18.467,75.783h1.592
+		c7.008-26.111,11.781-50.311,18.469-75.783l26.746-108.258h57.949l-71.002,237.213h-68.461L1557.951,154.73z"/>
+	<path fill="#0A6EF5" d="M1792.941,154.73h61.453l37.574,102.528c4.773,13.691,8.594,28.656,13.051,42.986h1.596
+		c4.775-14.33,8.596-29.295,13.053-42.986l36.299-102.528h61.773v237.213h-51.9v-81.191c0-23.563,4.457-58.908,7.641-82.15h-1.592
+		l-19.742,56.675l-31.842,86.607h-31.203l-32.158-86.607l-19.105-56.675h-1.273c2.865,23.242,7.322,58.587,7.322,82.15v81.191
+		h-50.945V154.73z"/>
 </g>
+<path fill="#0A6EF5" d="M512,417c0,54.676-44.791,99-100.042,99H100.042C44.79,516,0,471.676,0,417V103C0,48.324,44.79,4,100.042,4
+	h311.916C467.209,4,512,48.324,512,103V417z"/>
+<circle fill="none" stroke="#FFFFFF" stroke-width="70" stroke-miterlimit="10" cx="256" cy="260" r="173"/>
+<polygon fill="#0A6EF5" points="195.561,174.517 120.721,68.667 233.953,45.676 245.063,153.666 "/>
+<polygon fill="#0A6EF5" points="242.833,389.995 233.137,482.274 131.266,436.419 176.432,372.54 "/>
+<circle fill="#FFFFFF" cx="177.615" cy="195.633" r="21.115"/>
+<circle fill="#FFFFFF" cx="257.385" cy="229.261" r="21.115"/>
+<polygon fill="#FFFFFF" points="438.65,212.109 371.779,118.573 486.219,107.43 "/>
+<polygon fill="#FFFFFF" points="363.44,119.377 256,97.143 328.977,15.213 "/>
 </svg>

BIN
dezukvmd/www/img/logo.png


+ 25 - 0
dezukvmd/www/img/logo.svg

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="512px"
+	 height="512px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve">
+<g id="圖層_1">
+	<path fill="#0A6EF5" d="M512,413c0,54.676-44.791,99-100.042,99H100.042C44.79,512,0,467.676,0,413V99C0,44.324,44.79,0,100.042,0
+		h311.916C467.209,0,512,44.324,512,99V413z"/>
+	<circle fill="none" stroke="#FFFFFF" stroke-width="70" stroke-miterlimit="10" cx="256" cy="256" r="173"/>
+	<polygon fill="#0A6EF5" points="195.561,170.517 120.721,64.667 233.954,41.676 245.062,149.666 	"/>
+	<polygon fill="#0A6EF5" points="242.833,385.995 233.136,478.274 131.266,432.419 176.431,368.54 	"/>
+	<circle fill="#FFFFFF" cx="177.615" cy="191.632" r="21.115"/>
+	<circle fill="#FFFFFF" cx="257.385" cy="225.261" r="21.115"/>
+	<polygon fill="#FFFFFF" points="438.65,208.109 371.779,114.573 486.219,103.43 	"/>
+	<polygon fill="#FFFFFF" points="363.44,115.377 256,93.143 328.977,11.213 	"/>
+</g>
+<g id="圖層_2" display="none">
+	<line display="inline" fill="none" stroke="#E4007F" stroke-miterlimit="10" x1="75" y1="0" x2="75" y2="512"/>
+	<line display="inline" fill="none" stroke="#E4007F" stroke-miterlimit="10" x1="75" y1="0" x2="256" y2="256"/>
+	<line display="inline" fill="none" stroke="#E4007F" stroke-miterlimit="10" x1="256" y1="256" x2="75" y2="512"/>
+	<line display="inline" fill="none" stroke="#E60012" stroke-miterlimit="10" x1="256" y1="256" x2="229.667" y2="0"/>
+	<line display="inline" fill="none" stroke="#E60012" stroke-miterlimit="10" x1="229.667" y1="0" x2="229.667" y2="512"/>
+	<line display="inline" fill="none" stroke="#E60012" stroke-miterlimit="10" x1="256" y1="256" x2="229.667" y2="512"/>
+</g>
+</svg>

+ 1 - 1
dezukvmd/www/index.html

@@ -135,7 +135,7 @@
                 </div>
             </nav>
             <main class="content">
-                <iframe src="viewport.html#3f858f1f-93a0-4aa7-a231-5934022e5911" style="width: 100%; height: 100vh; border: none;"></iframe>
+              
             </main>
         </div>
     </body>

+ 25 - 26
dezukvmd/www/js/kvmevt.js

@@ -7,7 +7,8 @@
 */
 const enableKvmEventDebugPrintout = false; //Set to true to enable debug printout
 const cursorCaptureElementId = "remoteCapture";
-let socket;
+let hidsocket;
+let hidWebSocketReady = false;
 let protocol = window.location.protocol === 'https:' ? 'wss' : 'ws';
 let port = window.location.port ? window.location.port : (protocol === 'wss' ? 443 : 80);
 let hidSocketURL = `${protocol}://${window.location.hostname}:${port}/api/v1/hid/{uuid}/events`;
@@ -24,13 +25,12 @@ if (window.location.hash.length > 1){
     hidSocketURL = hidSocketURL.replace("{uuid}", kvmDeviceUUID);
     audioSocketURL = audioSocketURL.replace("{uuid}", kvmDeviceUUID);
     massStorageSwitchURL = massStorageSwitchURL.replace("{uuid}", kvmDeviceUUID);
-}
 
-$(document).ready(function() {
-    setStreamingSource(kvmDeviceUUID);
     //Start HID WebSocket
     startHidWebSocket();
-});
+    setStreamingSource(kvmDeviceUUID);
+}
+
 
 /* Initiate API endpoint */
 function setStreamingSource(deviceUUID) {
@@ -68,8 +68,8 @@ function handleMouseMove(event) {
         console.log(`Mouse move percentage: (${hidCommand.mouse_x}, ${hidCommand.mouse_y})`);
     }
 
-    if (socket && socket.readyState === WebSocket.OPEN) {
-        socket.send(JSON.stringify(hidCommand));
+    if (hidsocket && hidsocket.readyState === WebSocket.OPEN) {
+        hidsocket.send(JSON.stringify(hidCommand));
     } else {
         console.error("WebSocket is not open.");
     }
@@ -100,8 +100,8 @@ function handleMousePress(event) {
         console.log(`Mouse down: ${hidCommand.mouse_button}`);
     }
 
-    if (socket && socket.readyState === WebSocket.OPEN) {
-        socket.send(JSON.stringify(hidCommand));
+    if (hidsocket && hidsocket.readyState === WebSocket.OPEN) {
+        hidsocket.send(JSON.stringify(hidCommand));
     } else {
         console.error("WebSocket is not open.");
     }
@@ -135,8 +135,8 @@ function handleMouseRelease(event) {
         console.log(`Mouse release: ${hidCommand.mouse_button}`);
     }
 
-    if (socket && socket.readyState === WebSocket.OPEN) {
-        socket.send(JSON.stringify(hidCommand));
+    if (hidsocket && hidsocket.readyState === WebSocket.OPEN) {
+        hidsocket.send(JSON.stringify(hidCommand));
     } else {
         console.error("WebSocket is not open.");
     }
@@ -156,8 +156,8 @@ function handleMouseScroll(event) {
         console.log(`Mouse scroll: mouse_scroll=${event.deltaY}`);
     }
 
-    if (socket && socket.readyState === WebSocket.OPEN) {
-        socket.send(JSON.stringify(hidCommand));
+    if (hidsocket && hidsocket.readyState === WebSocket.OPEN) {
+        hidsocket.send(JSON.stringify(hidCommand));
     } else {
         console.error("WebSocket is not open.");
     }
@@ -199,8 +199,8 @@ function handleKeyDown(event) {
         hidCommand.is_right_modifier_key = false;
     }
 
-    if (socket && socket.readyState === WebSocket.OPEN) {
-        socket.send(JSON.stringify(hidCommand));
+    if (hidsocket && hidsocket.readyState === WebSocket.OPEN) {
+        hidsocket.send(JSON.stringify(hidCommand));
     } else {
         console.error("WebSocket is not open.");
     }
@@ -232,8 +232,8 @@ function handleKeyUp(event) {
     }
 
 
-    if (socket && socket.readyState === WebSocket.OPEN) {
-        socket.send(JSON.stringify(hidCommand));
+    if (hidsocket && hidsocket.readyState === WebSocket.OPEN) {
+        hidsocket.send(JSON.stringify(hidCommand));
     } else {
         console.error("WebSocket is not open.");
     }
@@ -241,15 +241,15 @@ function handleKeyUp(event) {
 
 /* Start and Stop HID events */
 function startHidWebSocket(){
-    if (socket){
+    if (hidsocket){
         //Already started
         console.warn("Invalid usage: HID Transport Websocket already started!");
         return;
     }
     const socketUrl = hidSocketURL;
-    socket = new WebSocket(socketUrl);
+    hidsocket = new WebSocket(socketUrl);
 
-    socket.addEventListener('open', function(event) {
+    hidsocket.addEventListener('open', function(event) {
         console.log('HID Transport WebSocket is connected.');
 
         // Send a soft reset command to the server to reset the HID state
@@ -257,10 +257,10 @@ function startHidWebSocket(){
         const hidResetCommand = {
             event: 0xFF
         };
-        socket.send(JSON.stringify(hidResetCommand));
+        hidsocket.send(JSON.stringify(hidResetCommand));
     });
 
-    socket.addEventListener('message', function(event) {
+    hidsocket.addEventListener('message', function(event) {
         //Todo: handle control signals from server if needed
         //console.log('Message from server ', event.data);
     });
@@ -270,12 +270,12 @@ function startHidWebSocket(){
 }
 
 function stopWebSocket(){
-    if (!socket){
+    if (!hidsocket){
         alert("No ws connection to stop");
         return;
     }
 
-    socket.close();
+    hidsocket.close();
     console.log('HID Transport WebSocket disconnected.');
     document.removeEventListener('keydown', handleKeyDown);
     document.removeEventListener('keyup', handleKeyUp);
@@ -293,8 +293,7 @@ function startAudioWebSocket(quality="standard") {
         console.warn("Audio WebSocket already started");
         return;
     }
-    const socketURL = `${audioSocketURL}?quality=${quality}`;
-    audioSocket = new WebSocket(socketURL);
+    audioSocket = new WebSocket(`${audioSocketURL}?quality=${quality}`);
     audioSocket.binaryType = 'arraybuffer';
 
     audioSocket.onopen = function() {

+ 5 - 1
dezukvmd/www/login.html

@@ -84,6 +84,10 @@
             text-align: center;
             display: none;
         }
+
+        i.blue.icon.icon.icon.icon.icon.icon{
+            color: #0a6ef5 !important;
+        }
     </style>
    
 </head>
@@ -98,7 +102,7 @@
                     <i class="ui eye icon" id="eyeIcon"></i>
                 </button>
             </div>
-            <button class="ui basic button" type="submit"><i class="ui green sign in alternate icon"></i> Login</button>
+            <button class="ui basic button" type="submit"><i class="ui blue sign in alternate icon"></i> Login</button>
         </form>
         <div style="width:100%; margin-top: 1rem; display: flex; justify-content: space-between; font-size: 0.95em;">
             <div>

+ 16 - 11
dezukvmd/www/viewport.css

@@ -1,7 +1,22 @@
 body {
+    
+}
+
+
+#menu {
+    height: 42px;
+    width: 120px;
+    overflow: hidden;
+    position: fixed;
+    top: 0.4em;
+    left: 50%;
+    transform: translateX(-50%);
+}
+
+#streamWrapper{
     margin: 0;
     padding: 0;
-    height: 100vh;
+    height: calc(100vh);
     width: 100vw;
     display: flex;
     justify-content: center;
@@ -22,16 +37,6 @@ body {
     cursor: url('img/cursor_overlay.png') 0 0, pointer;
 }
 
-#menu {
-    position: fixed;
-    top: 0px;
-    left: 50%;
-    transform: translateX(-50%);
-    padding: 10px;
-    display: flex;
-    gap: 10px;
-    z-index: 1000;
-}
 
 #audioTips{
     position: fixed;

+ 14 - 6
dezukvmd/www/viewport.html

@@ -14,13 +14,21 @@
     <link rel="icon" type="image/png" href="/favicon.png">
 </head>
 <body>
-    <img id="remoteCapture" src="" oncontextmenu="return false;"></img>
-    <div id="menu">
-        <button id="btnFullScreen" onclick="toggleFullScreen()">Fullscreen</button>
-        <button id="btnCtrlAltDel" onclick="sendCtrlAltDel()">Ctrl+Alt+Del</button>
-        <button id="btnFullScreen" onclick="switchMassStorageToKvm()">Switch Storage to KVM</button>
-        <button id="btnFullScreen" onclick="switchMassStorageToRemote()">Switch Storage to Remote</button>
+    <div id="streamWrapper">
+         <img id="remoteCapture" src="" oncontextmenu="return false;"></img>
     </div>
+   <div id="menu">
+        <button class="ui mini icon button" id="btnStorageKvm" onclick="switchMassStorageToKvm()" title="Switch Storage to KVM">
+            <i class="hdd icon"></i>
+        </button>
+        <button class="ui mini icon button" id="btnStorageRemote" onclick="switchMassStorageToRemote()" title="Switch Storage to Remote">
+            <i class="cloud upload icon"></i>
+        </button>
+        <button class="ui mini icon button" id="btnFullScreen" onclick="toggleFullScreen()" title="Fullscreen">
+            <i class="expand icon"></i>
+        </button>
+    </div>
+    
     <div id="audioTips" class="ui left aligned message">
         <div class="content">
             <div class="header">

Some files were not shown because too many files changed in this diff