瀏覽代碼

Merge pull request #26 from IceWhaleTech/v0.2.1

add sync function
link 3 年之前
父節點
當前提交
796c25b7a5
共有 45 個文件被更改,包括 377 次插入15 次删除
  1. 1 1
      UI
  2. 6 3
      pkg/utils/httper/httper.go
  3. 4 2
      route/route.go
  4. 15 0
      route/v1/app.go
  5. 14 1
      route/v1/sync.go
  6. 10 0
      service/casa.go
  7. 2 2
      types/system.go
  8. 二進制
      web/img/Account.1bc4a418.png
  9. 72 0
      web/img/Account.bde47fba.svg
  10. 二進制
      web/img/Android-DeviceID.b57fefc8.png
  11. 二進制
      web/img/Android-Menu.ed4df0da.png
  12. 二進制
      web/img/Android-NewDevice.f00af2cb.png
  13. 二進制
      web/img/Android-NewDeviceAdd.784d2f18.png
  14. 二進制
      web/img/Android-NewFolder.d71dc444.png
  15. 二進制
      web/img/Android-NewFolderCreate.b3521b45.png
  16. 二進制
      web/img/Android-ShowDeviceID.f7e46fb8.png
  17. 二進制
      web/img/Windows-DeviceID.2e929f75.png
  18. 二進制
      web/img/Windows-NewDevice.c9f2471d.png
  19. 二進制
      web/img/Windows-NewDeviceSave.fe1078b1.png
  20. 二進制
      web/img/Windows-NewFolder.5305cc41.png
  21. 二進制
      web/img/Windows-NewFolderSave.9ce2312f.png
  22. 二進制
      web/img/Windows-ShowID.1000f319.png
  23. 25 0
      web/img/android.48a6cf16.svg
  24. 二進制
      web/img/bg.afedbc0b.jpeg
  25. 二進制
      web/img/bg3.1e0d0d23.jpg
  26. 二進制
      web/img/macOS-Config.f419628a.png
  27. 二進制
      web/img/macOS-DeviceID.968cc84d.png
  28. 二進制
      web/img/macOS-NewFolder.fa9e37d0.png
  29. 二進制
      web/img/macOS-NewFolderSave.6f3f247d.png
  30. 二進制
      web/img/macOS-ShowID.c822acc3.png
  31. 二進制
      web/img/macOS-icon.ae9e0906.png
  32. 159 0
      web/img/macos.da8469ce.svg
  33. 二進制
      web/img/smart_icon.7cc8510a.png
  34. 二進制
      web/img/sync_icon.ae659b01.png
  35. 54 0
      web/img/syncthing-logo.e6163faa.svg
  36. 1 0
      web/img/syncthing.257e4f51.svg
  37. 1 0
      web/img/windows.d98029c3.svg
  38. 1 0
      web/img/wuji.b6d17cf2.svg
  39. 5 5
      web/js/0.js
  40. 0 0
      web/js/1.js
  41. 0 0
      web/js/2.js
  42. 0 0
      web/js/3.js
  43. 0 0
      web/js/4.js
  44. 0 1
      web/js/app.js
  45. 7 0
      web/js/chunk-vendors.js

+ 1 - 1
UI

@@ -1 +1 @@
-Subproject commit 741aadb0110cf4def85c83d8123da9bbd66c34d1
+Subproject commit a74be104eb5173eb1933d5e7e7a2364f6f1890de

+ 6 - 3
pkg/utils/httper/httper.go

@@ -53,10 +53,13 @@ func Get(url string, head map[string]string) (response string) {
 //发送POST请求
 //发送POST请求
 //url:请求地址,data:POST请求提交的数据,contentType:请求体格式,如:application/json
 //url:请求地址,data:POST请求提交的数据,contentType:请求体格式,如:application/json
 //content:请求放回的内容
 //content:请求放回的内容
-func Post(url string, data interface{}, contentType string) (content string) {
-	jsonStr, _ := json.Marshal(data)
-	req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonStr))
+func Post(url string, data []byte, contentType string, head map[string]string) (content string) {
+
+	req, err := http.NewRequest("POST", url, bytes.NewBuffer(data))
 	req.Header.Add("content-type", contentType)
 	req.Header.Add("content-type", contentType)
+	for k, v := range head {
+		req.Header.Add(k, v)
+	}
 	if err != nil {
 	if err != nil {
 		panic(err)
 		panic(err)
 	}
 	}

+ 4 - 2
route/route.go

@@ -175,7 +175,7 @@ func InitRouter() *gin.Engine {
 			v1AppGroup.GET("/rely/:id/info", v1.ContainerRelyInfo)
 			v1AppGroup.GET("/rely/:id/info", v1.ContainerRelyInfo)
 			v1AppGroup.GET("/install/config", v1.GetDockerInstallConfig)
 			v1AppGroup.GET("/install/config", v1.GetDockerInstallConfig)
 			//v1AppGroup.POST("/custom/install", v1.CustomInstallApp)
 			//v1AppGroup.POST("/custom/install", v1.CustomInstallApp)
-
+			v1AppGroup.POST("/share", v1.ShareAppFile)
 		}
 		}
 
 
 		v1SysGroup := v1Group.Group("/sys")
 		v1SysGroup := v1Group.Group("/sys")
@@ -266,7 +266,9 @@ func InitRouter() *gin.Engine {
 		{
 		{
 			v1SearchGroup.GET("/search", v1.GetSearchList)
 			v1SearchGroup.GET("/search", v1.GetSearchList)
 		}
 		}
-		v1Group.Any("/sync/*url", v1.SyncToSyncthing)
+		v1Group.GET("/sync/config", v1.GetSyncConfig)
+		v1Group.Any("/syncthing/*url", v1.SyncToSyncthing)
+
 	}
 	}
 	return r
 	return r
 }
 }

+ 15 - 0
route/v1/app.go

@@ -1,6 +1,8 @@
 package v1
 package v1
 
 
 import (
 import (
+	"encoding/json"
+	"io/ioutil"
 	"net/http"
 	"net/http"
 	"strconv"
 	"strconv"
 
 
@@ -197,3 +199,16 @@ func CategoryList(c *gin.Context) {
 	list = append(list, rear...)
 	list = append(list, rear...)
 	c.JSON(http.StatusOK, &model.Result{Success: oasis_err2.SUCCESS, Message: oasis_err2.GetMsg(oasis_err2.SUCCESS), Data: list})
 	c.JSON(http.StatusOK, &model.Result{Success: oasis_err2.SUCCESS, Message: oasis_err2.GetMsg(oasis_err2.SUCCESS), Data: list})
 }
 }
+
+// @Summary 分享该应用配置
+// @Produce  application/json
+// @Accept application/json
+// @Tags app
+// @Security ApiKeyAuth
+// @Success 200 {string} string "ok"
+// @Router /app/share [post]
+func ShareAppFile(c *gin.Context) {
+	str, _ := ioutil.ReadAll(c.Request.Body)
+	content := service.MyService.OAPI().ShareAppFile(str)
+	c.JSON(http.StatusOK, json.RawMessage(content))
+}

+ 14 - 1
route/v1/sync.go

@@ -1,22 +1,35 @@
 package v1
 package v1
 
 
 import (
 import (
+	"net/http"
 	"net/http/httputil"
 	"net/http/httputil"
 	"net/url"
 	"net/url"
+	"strings"
 
 
+	"github.com/IceWhaleTech/CasaOS/model"
 	"github.com/IceWhaleTech/CasaOS/pkg/config"
 	"github.com/IceWhaleTech/CasaOS/pkg/config"
+	"github.com/IceWhaleTech/CasaOS/pkg/utils/oasis_err"
 	"github.com/gin-gonic/gin"
 	"github.com/gin-gonic/gin"
 )
 )
 
 
 func SyncToSyncthing(c *gin.Context) {
 func SyncToSyncthing(c *gin.Context) {
 	u := c.Param("url")
 	u := c.Param("url")
-	target := "http://127.0.0.1:" + config.SystemConfigInfo.SyncPort
+	target := "http://" + strings.Split(c.Request.Host, ":")[0] + ":" + config.SystemConfigInfo.SyncPort
 	remote, err := url.Parse(target)
 	remote, err := url.Parse(target)
 	if err != nil {
 	if err != nil {
 		return
 		return
 	}
 	}
 	proxy := httputil.NewSingleHostReverseProxy(remote)
 	proxy := httputil.NewSingleHostReverseProxy(remote)
 	c.Request.Header.Add("X-API-Key", config.SystemConfigInfo.SyncKey)
 	c.Request.Header.Add("X-API-Key", config.SystemConfigInfo.SyncKey)
+	//c.Request.Header.Add("X-API-Key", config.SystemConfigInfo.SyncKey)
 	c.Request.URL.Path = u
 	c.Request.URL.Path = u
+
 	proxy.ServeHTTP(c.Writer, c.Request)
 	proxy.ServeHTTP(c.Writer, c.Request)
 }
 }
+
+func GetSyncConfig(c *gin.Context) {
+	data := make(map[string]string)
+	data["key"] = config.SystemConfigInfo.SyncKey
+	data["port"] = config.SystemConfigInfo.SyncPort
+	c.JSON(http.StatusOK, model.Result{Success: oasis_err.SUCCESS, Message: oasis_err.GetMsg(oasis_err.SUCCESS), Data: data})
+}

+ 10 - 0
service/casa.go

@@ -16,11 +16,21 @@ type CasaService interface {
 	GetServerCategoryList() []model.ServerCategoryList
 	GetServerCategoryList() []model.ServerCategoryList
 	GetTaskList(size int) []model2.TaskDBModel
 	GetTaskList(size int) []model2.TaskDBModel
 	GetServerAppInfo(id string) model.ServerAppList
 	GetServerAppInfo(id string) model.ServerAppList
+	ShareAppFile(body []byte) string
 }
 }
 
 
 type casaService struct {
 type casaService struct {
 }
 }
 
 
+func (o *casaService) ShareAppFile(body []byte) string {
+	head := make(map[string]string)
+
+	head["Authorization"] = GetToken()
+
+	content := httper2.Post(config.ServerInfo.ServerApi+"/v1/community/add", body, "application/json", head)
+	return content
+}
+
 func (o *casaService) GetTaskList(size int) []model2.TaskDBModel {
 func (o *casaService) GetTaskList(size int) []model2.TaskDBModel {
 	head := make(map[string]string)
 	head := make(map[string]string)
 
 

+ 2 - 2
types/system.go

@@ -1,4 +1,4 @@
 package types
 package types
 
 
-const CURRENTVERSION = "0.1.11"
-const BODY = "<li>Resolve application installation path errors</li><li>Mobile Adaptation</li><li>Optimize user experience</li>"
+const CURRENTVERSION = "0.2.0"
+const BODY = "<li>add sync function</li><li>fixed some error</li>"

二進制
web/img/Account.1bc4a418.png


+ 72 - 0
web/img/Account.bde47fba.svg

@@ -0,0 +1,72 @@
+<svg width="120" height="120" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M0 60C0 26.8629 26.8629 0 60 0V0C93.1371 0 120 26.8629 120 60V60C120 93.1371 93.1371 120 60 120V120C26.8629 120 0 93.1371 0 60V60Z" fill="url(#paint0_linear_582:2091)"/>
+<g filter="url(#filter0_d_582:2091)">
+<g filter="url(#filter1_iiiii_582:2091)">
+<path d="M75.1248 42.125C75.1248 50.4783 68.3532 57.25 59.9999 57.25C51.6465 57.25 44.8749 50.4783 44.8749 42.125C44.8749 33.7717 51.6465 27 59.9999 27C68.3532 27 75.1248 33.7717 75.1248 42.125Z" fill="url(#paint1_linear_582:2091)"/>
+<path d="M34.422 71.7327C41.316 66.1301 50.2453 62.75 59.9998 62.75C69.7544 62.75 78.6837 66.1301 85.5777 71.7327C89.5123 74.9302 89.5123 80.8198 85.5777 84.0174C78.6837 89.6199 69.7544 93 59.9998 93C50.2453 93 41.316 89.6199 34.422 84.0174C30.4874 80.8198 30.4874 74.9302 34.422 71.7327Z" fill="url(#paint2_linear_582:2091)"/>
+</g>
+</g>
+<defs>
+<filter id="filter0_d_582:2091" x="4" y="8" width="112" height="112" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="4"/>
+<feGaussianBlur stdDeviation="6"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_582:2091"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_582:2091" result="shape"/>
+</filter>
+<filter id="filter1_iiiii_582:2091" x="27.4711" y="23" width="63.0576" height="72" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="2" dy="2"/>
+<feGaussianBlur stdDeviation="3"/>
+<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0.495833 0 0 0 0 0.879 0 0 0 0 1 0 0 0 0.4 0"/>
+<feBlend mode="normal" in2="shape" result="effect1_innerShadow_582:2091"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="-4" dy="-4"/>
+<feGaussianBlur stdDeviation="3"/>
+<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0.0205888 0 0 0 0 0.00944442 0 0 0 0 0.566667 0 0 0 0.2 0"/>
+<feBlend mode="normal" in2="effect1_innerShadow_582:2091" result="effect2_innerShadow_582:2091"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="1" dy="1"/>
+<feGaussianBlur stdDeviation="1"/>
+<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0.816667 0 0 0 0 0.945 0 0 0 0 1 0 0 0 0.2 0"/>
+<feBlend mode="normal" in2="effect2_innerShadow_582:2091" result="effect3_innerShadow_582:2091"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="-2" dy="-2"/>
+<feGaussianBlur stdDeviation="2"/>
+<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0.00608333 0 0 0 0 0 0 0 0 0 0.304167 0 0 0 0.2 0"/>
+<feBlend mode="normal" in2="effect3_innerShadow_582:2091" result="effect4_innerShadow_582:2091"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="-1" dy="-1"/>
+<feGaussianBlur stdDeviation="0.5"/>
+<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0.075 0 0 0 0 0.778 0 0 0 0 1 0 0 0 0.2 0"/>
+<feBlend mode="normal" in2="effect4_innerShadow_582:2091" result="effect5_innerShadow_582:2091"/>
+</filter>
+<linearGradient id="paint0_linear_582:2091" x1="60" y1="0" x2="60" y2="120" gradientUnits="userSpaceOnUse">
+<stop stop-color="#5A9CFF"/>
+<stop offset="0.87897" stop-color="#2A23D5"/>
+<stop offset="1" stop-color="#4A3CEC"/>
+</linearGradient>
+<linearGradient id="paint1_linear_582:2091" x1="60" y1="40" x2="59.9998" y2="93" gradientUnits="userSpaceOnUse">
+<stop offset="0.0350902" stop-color="white"/>
+<stop offset="0.525594" stop-color="#B0D4FF"/>
+<stop offset="0.837131" stop-color="#DEEDFF"/>
+<stop offset="1" stop-color="#FEFEFF"/>
+</linearGradient>
+<linearGradient id="paint2_linear_582:2091" x1="60" y1="40" x2="59.9998" y2="93" gradientUnits="userSpaceOnUse">
+<stop offset="0.0350902" stop-color="white"/>
+<stop offset="0.525594" stop-color="#B0D4FF"/>
+<stop offset="0.837131" stop-color="#DEEDFF"/>
+<stop offset="1" stop-color="#FEFEFF"/>
+</linearGradient>
+</defs>
+</svg>

二進制
web/img/Android-DeviceID.b57fefc8.png


二進制
web/img/Android-Menu.ed4df0da.png


二進制
web/img/Android-NewDevice.f00af2cb.png


二進制
web/img/Android-NewDeviceAdd.784d2f18.png


二進制
web/img/Android-NewFolder.d71dc444.png


二進制
web/img/Android-NewFolderCreate.b3521b45.png


二進制
web/img/Android-ShowDeviceID.f7e46fb8.png


二進制
web/img/Windows-DeviceID.2e929f75.png


二進制
web/img/Windows-NewDevice.c9f2471d.png


二進制
web/img/Windows-NewDeviceSave.fe1078b1.png


二進制
web/img/Windows-NewFolder.5305cc41.png


二進制
web/img/Windows-NewFolderSave.9ce2312f.png


二進制
web/img/Windows-ShowID.1000f319.png


+ 25 - 0
web/img/android.48a6cf16.svg

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 18.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="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve">
+<g>
+	<g>
+		<g>
+			<path fill="#A4C639" d="M32,0c17.7,0,32,14.3,32,32S49.7,64,32,64S0,49.7,0,32S14.3,0,32,0z"/>
+		</g>
+	</g>
+	<g>
+		<g>
+			<path fill="#FFFFFF" d="M16.6,24.6c-1.4,0-2.6,1.2-2.6,2.6L14,38c0,1.4,1.2,2.6,2.6,2.6c1.5,0,2.6-1.2,2.6-2.6l0-10.9
+				C19.3,25.7,18.1,24.6,16.6,24.6 M37.8,14.8l1.8-3.3c0.1-0.2,0-0.4-0.1-0.5c-0.2-0.1-0.4,0-0.5,0.1l-1.9,3.3
+				c-1.6-0.7-3.3-1.1-5.1-1.1c-1.8,0-3.6,0.4-5.1,1.1L25,11.2C24.9,11,24.7,11,24.5,11c-0.2,0.1-0.2,0.3-0.1,0.5l1.8,3.3
+				c-3.6,1.8-6,5.3-6,9.3l23.6,0C43.8,20.2,41.4,16.7,37.8,14.8 M26.6,19.9c-0.5,0-1-0.4-1-1c0-0.5,0.4-1,1-1c0.5,0,1,0.4,1,1
+				C27.6,19.5,27.2,19.9,26.6,19.9 M37.4,19.9c-0.5,0-1-0.4-1-1c0-0.5,0.4-1,1-1c0.5,0,1,0.4,1,1C38.4,19.5,37.9,19.9,37.4,19.9
+				 M20.3,25.1l0,16.8c0,1.5,1.3,2.8,2.8,2.8l1.9,0l0,5.7c0,1.4,1.2,2.6,2.6,2.6c1.5,0,2.6-1.2,2.6-2.6l0-5.7l3.5,0l0,5.7
+				c0,1.4,1.2,2.6,2.6,2.6c1.5,0,2.6-1.2,2.6-2.6l0-5.7l1.9,0c1.5,0,2.8-1.2,2.8-2.8l0-16.8L20.3,25.1z M50,27.2
+				c0-1.4-1.2-2.6-2.6-2.6c-1.4,0-2.6,1.2-2.6,2.6l0,10.9c0,1.4,1.2,2.6,2.6,2.6c1.4,0,2.6-1.2,2.6-2.6L50,27.2z"/>
+		</g>
+	</g>
+</g>
+</svg>

二進制
web/img/bg.afedbc0b.jpeg


二進制
web/img/bg3.1e0d0d23.jpg


二進制
web/img/macOS-Config.f419628a.png


二進制
web/img/macOS-DeviceID.968cc84d.png


二進制
web/img/macOS-NewFolder.fa9e37d0.png


二進制
web/img/macOS-NewFolderSave.6f3f247d.png


二進制
web/img/macOS-ShowID.c822acc3.png


二進制
web/img/macOS-icon.ae9e0906.png


+ 159 - 0
web/img/macos.da8469ce.svg

@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   version="1.1"
+   id="Capa_1"
+   x="0px"
+   y="0px"
+   viewBox="0 0 407 407"
+   style="enable-background:new 0 0 407 407;"
+   xml:space="preserve"><metadata
+   id="metadata36"><rdf:RDF><cc:Work
+       rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+         rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+   id="defs34"><linearGradient
+   xlink:href="#SVGID_1_"
+   id="linearGradient46"
+   gradientUnits="userSpaceOnUse"
+   gradientTransform="matrix(1,0,0,-1,0,407.2074)"
+   x1="203.7169"
+   y1="7.7039"
+   x2="203.7169"
+   y2="402.0255" /><linearGradient
+   xlink:href="#SVGID_1_"
+   id="linearGradient48"
+   gradientUnits="userSpaceOnUse"
+   gradientTransform="matrix(1,0,0,-1,0,407.2074)"
+   x1="203.7169"
+   y1="7.7039"
+   x2="203.7169"
+   y2="402.0255" />
+	
+	
+<linearGradient
+   gradientTransform="matrix(1,0,0,-1,0,407.2074)"
+   y2="402.02551"
+   x2="203.7169"
+   y1="7.7038999"
+   x1="203.7169"
+   gradientUnits="userSpaceOnUse"
+   id="linearGradient120"><stop
+     id="stop6-9"
+     style="stop-color:#F2F2F2"
+     offset="0" /><stop
+     id="stop8-1"
+     style="stop-color:#F7F7F7"
+     offset="0.5963" /><stop
+     id="stop10-7"
+     style="stop-color:#FEFEFE"
+     offset="1" /></linearGradient><filter
+   style="color-interpolation-filters:sRGB"
+   id="filter1002"
+   x="-0.013201674"
+   width="1.0264033"
+   y="-0.013198327"
+   height="1.0263967"><feGaussianBlur
+     stdDeviation="2.168925"
+     id="feGaussianBlur1004" /></filter></defs>
+<style
+   type="text/css"
+   id="style2">
+	.st0{fill:url(#SVGID_1_);}
+	.st1{fill:#515151;}
+</style>
+<g
+   transform="matrix(1,0,0,0.98477354,0,6.0829719)"
+   id="g15-0"
+   style="fill:#4d4d4d;filter:url(#filter1002)"><linearGradient
+     gradientTransform="matrix(1,0,0,-1,0,407.2074)"
+     y2="402.02551"
+     x2="203.7169"
+     y1="7.7038999"
+     x1="203.7169"
+     gradientUnits="userSpaceOnUse"
+     id="linearGradient91"><stop
+       id="stop85"
+       style="stop-color:#F2F2F2"
+       offset="0" /><stop
+       id="stop87"
+       style="stop-color:#F7F7F7"
+       offset="0.5963" /><stop
+       id="stop89"
+       style="stop-color:#FEFEFE"
+       offset="1" /></linearGradient><path
+     style="fill:#4d4d4d"
+     id="path13-7"
+     d="M 400.9,202.3 C 400.9,92.3 313.8,5.1 203.7,5.1 93.7,5.2 6.6,92.3 6.6,202.3 c 0,110 87.1,197.2 197.2,197.2 110.1,0 197.1,-87.1 197.1,-197.2 z"
+     class="st0" /><path
+     style="fill:#4d4d4d"
+     class="st0"
+     d="M 400.9,202.3 C 400.9,92.3 313.8,5.1 203.7,5.1 93.7,5.2 6.6,92.3 6.6,202.3 c 0,110 87.1,197.2 197.2,197.2 110.1,0 197.1,-87.1 197.1,-197.2 z"
+     id="path40-7" /></g><g
+   id="g15">
+		
+			
+		
+			<linearGradient
+   gradientTransform="matrix(1,0,0,-1,0,407.2074)"
+   y2="402.02551"
+   x2="203.7169"
+   y1="7.7038999"
+   x1="203.7169"
+   gradientUnits="userSpaceOnUse"
+   id="SVGID_1_">
+			<stop
+   id="stop6"
+   style="stop-color:#F2F2F2"
+   offset="0" />
+			<stop
+   id="stop8"
+   style="stop-color:#F7F7F7"
+   offset="0.5963" />
+			<stop
+   id="stop10"
+   style="stop-color:#FEFEFE"
+   offset="1" />
+		</linearGradient>
+		<path
+   style="fill:url(#linearGradient46)"
+   id="path13"
+   d="M 400.9,202.3 C 400.9,92.3 313.8,5.1 203.7,5.1 93.7,5.2 6.6,92.3 6.6,202.3 c 0,110 87.1,197.2 197.2,197.2 110.1,0 197.1,-87.1 197.1,-197.2 z"
+   class="st0" />
+	<path
+   style="fill:url(#linearGradient48)"
+   class="st0"
+   d="M 400.9,202.3 C 400.9,92.3 313.8,5.1 203.7,5.1 93.7,5.2 6.6,92.3 6.6,202.3 c 0,110 87.1,197.2 197.2,197.2 110.1,0 197.1,-87.1 197.1,-197.2 z"
+   id="path40" /></g><g
+   id="g27">
+		<path
+   style="fill:#515151"
+   id="path17"
+   d="m 223.7,137.8 h 0.2 v 6.9 h 7.9 v -28.5 c 0,-2.1 -0.4,-3.9 -1.2,-5.6 -0.8,-1.7 -1.9,-3.1 -3.4,-4.3 -1.5,-1.2 -3.2,-2.1 -5.3,-2.7 -2.1,-0.6 -4.3,-1 -6.9,-1 -2.3,0 -4.5,0.3 -6.5,1 -2,0.6 -3.7,1.5 -5.2,2.7 -1.5,1.2 -2.6,2.5 -3.5,4.1 -0.9,1.6 -1.3,3.3 -1.4,5.1 h 7.8 c 0.2,-0.9 0.5,-1.7 1,-2.4 0.5,-0.7 1.1,-1.4 1.8,-1.9 0.7,-0.5 1.6,-0.9 2.6,-1.2 1,-0.3 2,-0.4 3.1,-0.4 2.8,0 4.9,0.6 6.5,1.9 1.5,1.2 2.3,3.1 2.3,5.5 v 3.2 l -11.2,0.6 c -5.2,0.3 -9.1,1.5 -11.8,3.6 -2.7,2.1 -4.1,4.9 -4.1,8.6 0,1.9 0.3,3.6 1,5.1 0.7,1.5 1.7,2.8 2.9,3.9 1.2,1.1 2.7,1.9 4.4,2.5 1.7,0.6 3.6,0.9 5.7,0.9 1.4,0 2.8,-0.2 4.1,-0.5 1.3,-0.3 2.6,-0.8 3.7,-1.5 1.1,-0.6 2.1,-1.4 3.1,-2.3 1,-1.2 1.8,-2.2 2.4,-3.3 z m -3.2,-2 c -1,0.8 -2.1,1.5 -3.4,2 -1.3,0.5 -2.8,0.7 -4.3,0.7 -2.4,0 -4.3,-0.5 -5.7,-1.6 -1.4,-1.1 -2.1,-2.5 -2.1,-4.3 0,-1.8 0.7,-3.3 2.2,-4.3 1.4,-1 3.6,-1.6 6.5,-1.8 l 10.1,-0.7 v 3.2 c 0,1.4 -0.3,2.6 -0.8,3.8 -0.8,1.2 -1.5,2.2 -2.5,3 z"
+   class="st1" />
+		<path
+   style="fill:#515151"
+   id="path19"
+   d="m 278.5,228.7 -13.7,-3.4 c -16.7,-4.2 -23.6,-9.7 -23.6,-18.9 0,-11.7 10.9,-19.8 26.7,-19.8 15.8,0 26.5,8 27.7,21 h 17.9 c -0.7,-21.6 -19,-36.7 -45.2,-36.7 -26.8,0 -45.7,15 -45.7,36.5 0,17.5 10.6,28.2 34.1,34 l 16.3,4 c 16.7,4.2 23.9,10.4 23.9,20.6 0,11.8 -11.9,20.4 -28.4,20.4 -17.2,0 -29.8,-8.6 -31.2,-21.7 h -18 c 1.3,22.8 20.2,37.3 47.9,37.3 29.7,0 48.4,-14.7 48.4,-38.3 -0.3,-18.4 -11,-28.7 -37.1,-35 z"
+   class="st1" />
+		<path
+   style="fill:#515151"
+   id="path21"
+   d="m 187.7,144.7 v -28.3 c 0,-2.1 -0.3,-4 -1,-5.6 -0.7,-1.6 -1.5,-3.1 -2.7,-4.3 -1.2,-1.2 -2.6,-2.1 -4.3,-2.8 -1.7,-0.7 -3.5,-1 -5.6,-1 -1.5,0 -2.9,0.2 -4.2,0.6 -1.3,0.4 -2.6,0.9 -3.7,1.6 -1.1,0.7 -2.1,1.6 -3,2.5 -0.9,0.9 -1.6,2.1 -2.1,3.4 h -0.2 c -0.8,-2.6 -2.3,-4.6 -4.3,-6 -2,-1.4 -4.5,-2.1 -7.4,-2.1 -1.3,0 -2.6,0.2 -3.9,0.5 -1.2,0.3 -2.3,0.8 -3.4,1.5 -1,0.7 -1.9,1.4 -2.7,2.4 -0.8,0.9 -1.4,2 -1.9,3.1 h -0.2 v -7 h -7.9 v 41.6 h 7.8 v -25.5 c 0,-1.3 0.7,-2.6 1.1,-3.7 0.4,-1.1 1,-2.1 1.8,-3 0.8,-0.8 1.7,-1.5 2.8,-2 1.1,-0.5 2.3,-0.7 3.5,-0.7 1.2,0 2.3,0.2 3.3,0.6 1,0.4 1.8,0.9 2.5,1.6 0.7,0.7 1.2,1.5 1.6,2.5 0.4,1 0.6,2.1 0.6,3.2 v 27 h 8.2 V 119 c 0,-1.3 0.2,-2.6 0.7,-3.7 0.4,-1.1 1,-2.1 1.8,-2.9 0.8,-0.8 1.7,-1.4 2.7,-1.9 1.1,-0.4 2.2,-0.7 3.5,-0.7 2.6,0 4.6,0.8 6,2.2 1.4,1.5 2.1,3.6 2.1,6.3 v 26.3 z"
+   class="st1" />
+		<path
+   style="fill:#515151"
+   id="path23"
+   d="m 147.4,170.9 c -36.3,0 -59.1,25.3 -59.1,65.6 0,40.3 22.8,65.6 59.1,65.6 36.3,0 59.1,-25.3 59.1,-65.6 -0.1,-40.3 -22.8,-65.6 -59.1,-65.6 z m 0,115 c -24.9,0 -40.5,-19.1 -40.5,-49.4 0,-30.4 15.6,-49.5 40.5,-49.5 24.8,0 40.5,19.1 40.5,49.5 -0.1,30.3 -15.7,49.4 -40.5,49.4 z"
+   class="st1" />
+		<path
+   style="fill:#515151"
+   id="path25"
+   d="m 252.1,113.5 c 1,-1.2 2.1,-2.2 3.5,-2.9 1.4,-0.7 2.9,-1 4.6,-1 1.4,0 2.7,0.2 3.8,0.6 1.1,0.4 2.1,0.9 3,1.6 0.8,0.7 1.5,1.5 2,2.5 0.5,1 0.9,2 1.1,3.1 h 7.9 c -0.2,-2 -0.7,-3.9 -1.6,-5.7 -0.9,-1.8 -2.1,-3.3 -3.6,-4.7 -1.5,-1.3 -3.4,-2.4 -5.5,-3.2 -2.1,-0.8 -4.5,-1.2 -7.2,-1.2 -2.9,0 -5.6,0.5 -8,1.5 -2.4,1 -4.4,2.4 -6.1,4.3 -1.7,1.9 -3,4.1 -3.9,6.7 -0.9,2.6 -1.4,5.5 -1.4,8.8 0,3.3 0.5,6.3 1.4,8.9 0.9,2.6 2.3,4.9 4,6.7 1.7,1.8 3.8,3.2 6.2,4.2 2.4,1 5.1,1.5 8,1.5 2.5,0 4.8,-0.4 6.9,-1 2.1,-0.6 3.9,-1.7 5.5,-2.9 1.5,-1.3 2.8,-2.8 3.8,-4.6 1,-1.8 1.6,-3.8 1.8,-5.9 h -7.9 c -0.5,2.5 -1.6,4.3 -3.3,5.6 -1.7,1.3 -3.9,1.9 -6.6,1.9 -1.7,0 -3.2,-0.3 -4.6,-1 -1.4,-0.6 -2.6,-1.6 -3.5,-2.8 -1,-1.2 -1.7,-2.7 -2.3,-4.5 -0.5,-1.8 -0.8,-3.8 -0.8,-6 0,-2.2 0.3,-4.1 0.8,-5.9 0.3,-1.9 1,-3.4 2,-4.6 z"
+   class="st1" />
+	</g>
+</svg>

二進制
web/img/smart_icon.7cc8510a.png


二進制
web/img/sync_icon.ae659b01.png


+ 54 - 0
web/img/syncthing-logo.e6163faa.svg

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 429 117.3" enable-background="new 0 0 429 117.3" xml:space="preserve">
+<g>
+	<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="58.666" y1="117.332" x2="58.666" y2="-9.094947e-13">
+		<stop  offset="0" style="stop-color:#0882C8"/>
+		<stop  offset="1" style="stop-color:#26B6DB"/>
+	</linearGradient>
+	<circle fill="url(#SVGID_1_)" cx="58.7" cy="58.7" r="58.7"/>
+	<g>
+		<circle fill="none" stroke="#FFFFFF" stroke-width="6" stroke-miterlimit="10" cx="58.7" cy="58.5" r="43.7"/>
+		<g>
+			<path fill="#FFFFFF" d="M94.7,47.8c4.7,1.6,9.8-0.9,11.4-5.6c1.6-4.7-0.9-9.8-5.6-11.4c-4.7-1.6-9.8,0.9-11.4,5.6
+				C87.5,41.1,90,46.2,94.7,47.8z"/>
+			<line fill="none" stroke="#FFFFFF" stroke-width="6" stroke-miterlimit="10" x1="97.6" y1="39.4" x2="67.5" y2="64.4"/>
+		</g>
+		<g>
+			<path fill="#FFFFFF" d="M77.6,91c-0.4,4.9,3.2,9.3,8.2,9.8c5,0.4,9.3-3.2,9.8-8.2c0.4-4.9-3.2-9.3-8.2-9.8
+				C82.4,82.4,78,86,77.6,91z"/>
+			<line fill="none" stroke="#FFFFFF" stroke-width="6" stroke-miterlimit="10" x1="86.5" y1="91.8" x2="67.5" y2="64.4"/>
+		</g>
+		<path fill="#FFFFFF" d="M60,69.3c2.7,4.2,8.3,5.4,12.4,2.7c4.2-2.7,5.4-8.3,2.7-12.4c-2.7-4.2-8.3-5.4-12.4-2.7
+			C58.5,59.5,57.3,65.1,60,69.3z"/>
+		<g>
+			<path fill="#FFFFFF" d="M21.2,61.4c-4.3-2.5-9.8-1.1-12.3,3.1c-2.5,4.3-1.1,9.8,3.1,12.3c4.3,2.5,9.8,1.1,12.3-3.1
+				C26.8,69.5,25.4,64,21.2,61.4z"/>
+			<line fill="none" stroke="#FFFFFF" stroke-width="6" stroke-miterlimit="10" x1="16.6" y1="69.1" x2="67.5" y2="64.4"/>
+		</g>
+	</g>
+</g>
+<g>
+	<path fill="#0891D1" d="M163.8,50.2c-0.6-0.7-6.3-4.1-11.4-4.1c-3.4,0-5.2,1.2-5.2,3.5c0,2.9,3.2,3.7,8.9,5.2
+		c8.2,2.2,13.3,5,13.3,12.9c0,9.7-7.8,13-16,13c-6.2,0-13.1-2-18.2-5.3l4.3-8.6c0.8,0.8,7.5,5,14,5c3.5,0,5.2-1.1,5.2-3.2
+		c0-3.2-4.4-4-10.3-5.8c-7.9-2.4-11.5-5.3-11.5-11.8c0-9,7.2-13.9,15.7-13.9c6.1,0,11.6,2.5,15.4,4.7L163.8,50.2z"/>
+	<path fill="#0891D1" d="M175,85.1c1.7,0.5,3.3,0.8,4.4,0.8c2,0,3.3-1.5,4.2-5.5l-11.9-31.5h9.8l7.4,23.3l6.3-23.3h8.9l-12.1,36.6
+		c-1.7,5.3-6.2,8.7-11.8,8.8c-1.7,0-3.5-0.2-5.3-0.9V85.1z"/>
+	<path fill="#0891D1" d="M239.3,80.3h-9.6V62.6c0-4.1-1.7-5.9-4.3-5.9c-2.6,0-5.8,2.3-7,5.6v18.1h-9.6V48.8h8.6v5.3
+		c2.3-3.7,6.8-5.9,12.2-5.9c8.2,0,9.5,6.7,9.5,11.9V80.3z"/>
+	<path fill="#0891D1" d="M261.6,48.2c7.2,0,12.3,3.4,14.8,8.3l-9.4,2.8c-1.2-1.9-3.1-3-5.5-3c-4,0-7,3.2-7,8.2c0,5,3.1,8.3,7,8.3
+		c2.4,0,4.6-1.3,5.5-3.1l9.4,2.9c-2.3,4.9-7.6,8.3-14.8,8.3c-10.6,0-16.9-7.7-16.9-16.4S250.9,48.2,261.6,48.2z"/>
+	<path fill="#0891D1" d="M302.1,78.7c-2.6,1.1-6.2,2.3-9.7,2.3c-4.7,0-8.8-2.3-8.8-8.4V56.1h-4v-7.3h4v-10h9.6v10h6.4v7.3h-6.4v13.1
+		c0,2.1,1.2,2.9,2.8,2.9c1.4,0,3-0.6,4.2-1.1L302.1,78.7z"/>
+	<path fill="#0891D1" d="M337.2,80.3h-9.6V62.6c0-4.1-1.8-5.9-4.6-5.9c-2.3,0-5.5,2.2-6.7,5.6v18.1h-9.6V36.5h9.6v17.6
+		c2.3-3.7,6.3-5.9,10.9-5.9c8.5,0,9.9,6.5,9.9,11.9V80.3z"/>
+	<path fill="#0891D1" d="M343.4,45.2v-8.7h9.6v8.7H343.4z M343.4,80.3V48.8h9.6v31.5H343.4z"/>
+	<path fill="#0891D1" d="M389.9,80.3h-9.6V62.6c0-4.1-1.7-5.9-4.3-5.9c-2.6,0-5.8,2.3-7,5.6v18.1h-9.6V48.8h8.6v5.3
+		c2.3-3.7,6.8-5.9,12.2-5.9c8.2,0,9.5,6.7,9.5,11.9V80.3z"/>
+	<path fill="#0891D1" d="M395.5,64.6c0-9.2,6-16.3,14.6-16.3c4.7,0,8.4,2.2,10.6,5.8v-5.2h8.3v29.3c0,9.6-7.5,15.5-18.2,15.5
+		c-6.8,0-11.5-2.3-15-6.3l5.1-5.2c2.3,2.6,6,4.3,9.9,4.3c4.6,0,8.6-2.4,8.6-8.3v-3.1c-1.9,3.5-5.9,5.3-10,5.3
+		C401.1,80.5,395.5,73.3,395.5,64.6z M419.4,68.5v-6.6c-1.3-3.3-4.2-5.5-7.1-5.5c-4.1,0-7,4-7,8.4c0,4.6,3.2,8,7.5,8
+		C415.7,72.8,418.1,71,419.4,68.5z"/>
+</g>
+</svg>

+ 1 - 0
web/img/syncthing.257e4f51.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 66 65" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-linecap="round" stroke-linejoin="round"><style><![CDATA[.B{stroke:none}.C{fill-rule:nonzero}.D{stroke:#fff}.E{stroke-width:3.271}]]></style><use xlink:href="#B" x=".5" y=".5"/><defs><linearGradient id="A" x1="49.97%" y1="99.94%" x2="49.97%" y2="0.00%"><stop offset="0%" stop-color="#0882c8"/><stop offset="100%" stop-color="#26b6db"/></linearGradient></defs><symbol id="B" overflow="visible"><path d="M0 32C0 14.272 14.272 0 32 0s32 14.272 32 32-14.272 32-32 32S0 49.728 0 32z" fill="url(#A)" class="B C"/><path d="M8.177 31.891C8.177 18.693 18.802 8.068 32 8.068s23.823 10.625 23.823 23.823S45.198 55.714 32 55.714 8.177 45.089 8.177 31.891z" fill="none" class="D E"/><path d="M51.625 26.058c2.562.872 5.342-.491 6.215-3.053s-.491-5.342-3.053-6.215-5.342.491-6.215 3.053.491 5.342 3.053 6.215z" class="B C"/><path d="M53.206 21.479L36.797 35.108" fill="none" class="D E"/><path d="M42.304 49.608c-.218 2.671 1.745 5.07 4.47 5.342 2.726.218 5.07-1.744 5.343-4.47.218-2.671-1.745-5.07-4.47-5.343-2.726-.218-5.124 1.745-5.342 4.47z" class="B C"/><path d="M47.155 50.044L36.797 35.107" fill="none" class="D E"/><path d="M32.708 37.779c1.472 2.29 4.525 2.944 6.76 1.472 2.29-1.472 2.944-4.525 1.472-6.76-1.472-2.29-4.525-2.944-6.76-1.472-2.29 1.417-2.944 4.47-1.472 6.76zm-21.152-4.307c-2.344-1.363-5.342-.6-6.705 1.69-1.363 2.344-.6 5.342 1.69 6.705 2.344 1.363 5.342.6 6.705-1.69s.6-5.288-1.69-6.705z" class="B C"/><path d="M9.049 37.669l27.748-2.562" fill="none" class="D E"/></symbol></svg>

+ 1 - 0
web/img/windows.d98029c3.svg

@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="88" width="88">
<path style="fill:#00adef;" d="m0,12.402,35.687-4.8602,0.0156,34.423-35.67,0.20313zm35.67,33.529,0.0277,34.453-35.67-4.9041-0.002-29.78zm4.3261-39.025,47.318-6.906,0,41.527-47.318,0.37565zm47.329,39.349-0.0111,41.34-47.318-6.6784-0.0663-34.739z"/>
</svg>

+ 1 - 0
web/img/wuji.b6d17cf2.svg

@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" fill="white" fill-opacity="0.01"/><path d="M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z" stroke="#333" stroke-width="4" stroke-linejoin="round"/><path d="M24 44C31.732 44 38 37.732 38 30C38 22.268 31.732 16 24 16C16.268 16 10 22.268 10 30C10 37.732 16.268 44 24 44Z" stroke="#333" stroke-width="4" stroke-linejoin="round"/><path d="M24 44C28.4183 44 32 40.4183 32 36C32 31.5817 28.4183 28 24 28C19.5817 28 16 31.5817 16 36C16 40.4183 19.5817 44 24 44Z" fill="none" stroke="#333" stroke-width="4" stroke-linejoin="round"/></svg>

File diff suppressed because it is too large
+ 5 - 5
web/js/0.js


File diff suppressed because it is too large
+ 0 - 0
web/js/1.js


File diff suppressed because it is too large
+ 0 - 0
web/js/2.js


File diff suppressed because it is too large
+ 0 - 0
web/js/3.js


File diff suppressed because it is too large
+ 0 - 0
web/js/4.js


File diff suppressed because it is too large
+ 0 - 1
web/js/app.js


File diff suppressed because it is too large
+ 7 - 0
web/js/chunk-vendors.js


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