text: (window.webpackJsonp=window.webpackJsonp||[]).push([[28],{1157:function(e,t,n){var content=n(1297);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(58).default)("33f48d9d",content,!0,{sourceMap:!1})},1296:function(e,t,n){"use strict";n(1157)},1297:function(e,t,n){var o=n(57)((function(i){return i[1]}));o.push([e.i,".update-container{height:100vh;padding:2rem .5rem .5rem;position:relative;color:#f4f7fc}.update-container h2{font-weight:500}.update-container .top-space{margin-top:1rem}.update-container .info-content,.update-container .info-header{color:#34495e;margin-bottom:.5rem;line-height:1.2}.update-container .info-header{color:#7f8c8d}.update-container .info-header h3{font-weight:400}.update-container .large-button{font-size:1.5rem}.update-container .dashboard-link{position:absolute;right:.5rem;bottom:.5rem}.update-container .menu-link{font-size:2rem;text-decoration:none;width:100%;display:block;margin-top:.5rem;padding-left:.5rem}.update-container .menu-link:hover{background:#1abc9c;color:#fff}",""]),e.exports=o},1334:function(e,t,n){"use strict";n.r(t);n(289),n(8);var o=n(17),r=n(1064),c={components:{VueMarkdown:n.n(r).a},data:function(){n(103);return{appPath:o.remote.app.getAppPath(),updating:!1,appVersion:o.remote.app.getVersion(),restart_prompt:!1,updateFailed:!1,dlProgress:{progress:0},showBranch:null,sysInfo:o.remote.process,latestVersion:{stable:"",beta:"-"}}},computed:{},created:function(){var e=this,t=this;this.$nextTick((function(){e.$nuxt.$loading.start(),e.$axios.get("funstuff/client_version").then((function(e){t.latestVersion=e.data})).catch((function(e){t.$alert("请返回稍后重试","获取版本信息失败",{center:!0}).catch((function(e){}))})).finally((function(){t.$nuxt.$loading.finish()}))}))},beforeDestroy:function(){o.ipcRenderer.removeAllListeners("download-progress"),o.ipcRenderer.removeAllListeners("update-info")},methods:{update:function(e){var t=this;this.updating=!0,o.ipcRenderer.removeAllListeners("download-progress"),o.ipcRenderer.on("download-progress",(function(e,n){console.log("progress:",n),n.progress=Number(n.progress.toFixed(1)),t.dlProgress=n})),o.ipcRenderer.on("update-completed",(function(e,n){t.updating=!1,console.log(n),n?(t.$message({message:"更新失败，请尝试手动更新: "+n.message,type:"warning"}),t.updateFailed=!0):t.restart_prompt=!0})),o.ipcRenderer.send("do-update",{version_info:e})},restart:function(){o.ipcRenderer.send("restart")},dlLink:function(e){var t;return"win32"===this.sysInfo.platform&&(t="win/PandaFan-".concat(this.sysInfo.platform,"-").concat(this.sysInfo.arch,"-").concat(e,".zip")),"darwin"===this.sysInfo.platform&&(t="mac/PandaFan-".concat(e,".dmg")),"https://xconf.oss-accelerate.aliyuncs.com/panda/dl/client/".concat(t)},openDir:function(e){o.shell.showItemInFolder(e)},byteHelper:function(e){var t=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,Math.floor(t))).toFixed(1)+" "+["b","kB","MB","GB","TB"][t]}}},l=(n(1296),n(44)),component=Object(l.a)(c,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"update-container"},[n("center",[n("h1",[e._v(e._s(e.$t("check_for_update.page_title")))])]),n("br"),n("el-row",[n("el-col",{attrs:{span:12}},[n("h2",[e._v(e._s(e.$t("check_for_update.current_sys_info")))])]),n("el-col",{attrs:{span:12}},[n("h2",[e._v(e._s(e.sysInfo.platform)+" "+e._s(e.sysInfo.arch))])])],1),n("el-row",[n("el-col",{attrs:{span:12}},[n("h2",[e._v(e._s(e.$t("check_for_update.current_core")))])]),n("el-col",{attrs:{span:12}},[n("h2",[e._v(e._s(e.appVersion))])])],1),n("el-row",[n("el-col",{attrs:{span:12}},[n("h2",{staticClass:"thin"},[e._v(e._s(e.$t("check_for_update.latest_core")))])]),n("el-col",{attrs:{span:12}},[n("h2",{staticClass:"succes",on:{click:function(t){e.openSite(e.dlLink(e.latestVersion.stable))}}},[n("a",{staticClass:"success"},[e._v(e._s(e.latestVersion.stable)+" "+e._s(e.$t("check_for_update.download.stable")))])]),"-"!==e.latestVersion.beta?n("h2",{staticClass:"warning",on:{click:function(t){e.openSite(e.dlLink(e.latestVersion.beta))}}},[n("a",{staticClass:"warning"},[e._v(e._s(e.latestVersion.beta)+" "+e._s(e.$t("check_for_update.download.beta")))])]):e._e()])],1),n("div",[n("br"),n("hr"),n("br"),n("center",[n("h2",[e._v(e._s(e.$t("check_for_update.manual_only"))),n("br"),n("small",[e._v(e._s(e.$t("check_for_update.auto_after_update")))])]),n("br")]),"darwin"==e.sysInfo.platform?n("el-row",[n("p",[n("a",{on:{click:function(t){e.openSite(e.dlLink(e.latestVersion[e.showBranch||"stable"]))}}},[e._v(e._s(e.$t("check_for_update.click_to_download")))])]),n("p",[e._v(e._s(e.$t("check_for_update.mac.a"))),n("a",{on:{click:function(t){return e.openDir("/Applications/")}}},[e._v(e._s(e.$t("check_for_update.mac.b")))]),e._v(e._s(e.$t("check_for_update.mac.c")))])]):e._e(),"win32"==e.sysInfo.platform?n("el-row",[n("p",[n("a",{on:{click:function(t){e.openSite(e.dlLink(e.latestVersion[e.showBranch||"stable"]))}}},[e._v(e._s(e.$t("check_for_update.click_to_download")))])]),n("p",[e._v(e._s(e.$t("check_for_update.win.a")))]),n("p",[e._v(e._s(e.$t("check_for_update.win.b")))]),n("br"),n("h4",[e._v(e._s(e.$t("check_for_update.win.c")))]),n("p",[e._v(e._s(e.$t("check_for_update.win.d")))]),n("br"),n("p",[e._v(e._s(e.$t("check_for_update.win.e")))]),n("br"),n("p",[e._v(e._s(e.$t("check_for_update.win.f")))]),n("a",{on:{click:function(t){return e.openDir(e.appPath)}}},[e._v(e._s(e.appPath))])]):e._e()],1),n("a",{staticClass:"dashboard-link",on:{click:function(t){return e.$router.go(-1)}}},[e._v(" "+e._s(e.$t("back")))])],1)}),[],!1,null,null,null);t.default=component.exports}}]);