diff --git a/httpstaticserver.go b/httpstaticserver.go index 22616c1..59c63b0 100644 --- a/httpstaticserver.go +++ b/httpstaticserver.go @@ -17,9 +17,9 @@ import ( "regexp" + "github.com/go-yaml/yaml" "github.com/gorilla/mux" "github.com/shogo82148/androidbinary/apk" - "gopkg.in/yaml.v2" ) type ApkInfo struct { diff --git a/res/ipa-install.tmpl.html b/res/ipa-install.tmpl.html index f9413a1..6d45cfb 100644 --- a/res/ipa-install.tmpl.html +++ b/res/ipa-install.tmpl.html @@ -1,71 +1,71 @@ - [[.Name]] install - - - - - + + - - - - - - + - + \ No newline at end of file diff --git a/res/js/index.js b/res/js/index.js index aeb07ba..ec2fed2 100644 --- a/res/js/index.js +++ b/res/js/index.js @@ -139,11 +139,13 @@ var vm = new Vue({ this.myDropzone.removeAllFiles(); }, genInstallURL: function(name) { + var urlPath; if (getExtention(name) == "ipa") { urlPath = location.protocol + "//" + pathJoin([location.host, "/-/ipa/link", location.pathname, name]); - return urlPath; + } else { + urlPath = location.protocol + "//" + pathJoin([location.host, location.pathname, name]); } - return location.protocol + "//" + pathJoin([location.host, location.pathname, name]); + return encodeURI(urlPath); }, genQrcode: function(text, title) { var urlPath = this.genInstallURL(text);