|
|
@@ -3,6 +3,7 @@ package web
|
|
3
|
3
|
import (
|
|
4
|
4
|
"Gwen/global"
|
|
5
|
5
|
"github.com/gin-gonic/gin"
|
|
|
6
|
+ "strconv"
|
|
6
|
7
|
)
|
|
7
|
8
|
|
|
8
|
9
|
type Index struct {
|
|
|
@@ -14,11 +15,13 @@ func (i *Index) Index(c *gin.Context) {
|
|
14
|
15
|
|
|
15
|
16
|
func (i *Index) ConfigJs(c *gin.Context) {
|
|
16
|
17
|
apiServer := global.Config.Rustdesk.ApiServer
|
|
17
|
|
-
|
|
|
18
|
+ magicQueryonline := strconv.Itoa(global.Config.Rustdesk.WebclientMagicQueryonline)
|
|
18
|
19
|
tmp := `
|
|
19
|
20
|
localStorage.setItem('api-server', "` + apiServer + `")
|
|
20
|
21
|
const ws2_prefix = 'wc-'
|
|
21
|
22
|
localStorage.setItem(ws2_prefix+'api-server', "` + apiServer + `")
|
|
22
|
|
-`
|
|
|
23
|
+
|
|
|
24
|
+window.webclient_magic_queryonline = ` + magicQueryonline + ``
|
|
|
25
|
+
|
|
23
|
26
|
c.String(200, tmp)
|
|
24
|
27
|
}
|