diff --git a/src/main/java/org/yzr/controller/PackageController.java b/src/main/java/org/yzr/controller/PackageController.java index a9ef3fa..87eb562 100644 --- a/src/main/java/org/yzr/controller/PackageController.java +++ b/src/main/java/org/yzr/controller/PackageController.java @@ -45,6 +45,7 @@ public class PackageController { AppViewModel viewModel = this.appService.findByCode(code, id); request.setAttribute("app", viewModel); request.setAttribute("ca_path", this.pathManager.getCAPath()); + request.setAttribute("basePath", this.pathManager.getBaseURL(false)); return "install"; } @@ -61,6 +62,18 @@ public class PackageController { return "devices"; } + /** + * 安装教程 + * @param platform + * @param request + * @return + */ + @GetMapping("/guide/{platform}") + public String guide(@PathVariable("platform") String platform, HttpServletRequest request) { + request.setAttribute("platform", platform); + return "guide"; + } + /** * 上传包 * @param file diff --git a/src/main/resources/static/images/install_crt.gif b/src/main/resources/static/images/install_crt.gif new file mode 100644 index 0000000..0d6bbd0 Binary files /dev/null and b/src/main/resources/static/images/install_crt.gif differ diff --git a/src/main/resources/static/js/clipboard.min.js b/src/main/resources/static/js/clipboard.min.js new file mode 100644 index 0000000..02c549e --- /dev/null +++ b/src/main/resources/static/js/clipboard.min.js @@ -0,0 +1,7 @@ +/*! + * clipboard.js v2.0.4 + * https://zenorocha.github.io/clipboard.js + * + * Licensed MIT © Zeno Rocha + */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(n){var o={};function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n - -设备列表 + [[${app.name}]]-设备列表 diff --git a/src/main/resources/templates/guide.html b/src/main/resources/templates/guide.html new file mode 100644 index 0000000..8189e52 --- /dev/null +++ b/src/main/resources/templates/guide.html @@ -0,0 +1,25 @@ + + + + + + + + + [[${platform}]] - 安装教程 + + + + + + + + + +
+ +
+ + + + \ No newline at end of file diff --git a/src/main/resources/templates/install.html b/src/main/resources/templates/install.html index de0f6f7..c1a3bde 100644 --- a/src/main/resources/templates/install.html +++ b/src/main/resources/templates/install.html @@ -64,13 +64,19 @@
下载安装
-
+
安装证书
- 查看设备列表 + +
查看设备列表
+
+
+
+ +
证书信任教程
@@ -90,6 +96,14 @@ window.open($("#crtURL").val()) }) + $("#showDevices").click(function () { + window.open($("#devices").val()) + }) + + $("#trustCTR").click(function () { + window.open($("#trust_crt").val()) + }) + var codeData = $("#qrcode").attr("data"); new QRCode("qrcode", { text: codeData, diff --git a/src/main/resources/templates/list.html b/src/main/resources/templates/list.html index c5e4671..88f7735 100644 --- a/src/main/resources/templates/list.html +++ b/src/main/resources/templates/list.html @@ -13,6 +13,7 @@ + @@ -155,6 +156,14 @@ } }); }) + + $("#js-app-short-copy-trigger").click(function(){ + new ClipboardJS('#js-app-short-copy-trigger', { + text: function(trigger) { + return trigger.getAttribute('value'); + } + }); + });