fes.js/assets/js/10.2329d47f.js

1 line
1.9 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{349:function(t,e,n){},411:function(t,e,n){"use strict";var o=n(349);n.n(o).a},417:function(t,e,n){"use strict";n.r(e);var o=n(31),a=n(0),u={"/":{message:"New content is available.",buttonText:"Refresh"},"/zh/":{message:"发现新内容可用",buttonText:"刷新"},"/ru/":{message:"Доступен новый контент.",buttonText:"Обновить"},"/uk/":{message:"Доступний новий контент.",buttonText:"Оновити"},"/ja/":{message:"新しいコンテンツがあります。",buttonText:"更新する"},"/es/":{message:"Hay nuevo contenido disponible.",buttonText:"Actualizar"}},s={name:"SWUpdatePopup",data:function(){return{rawPopupConfig:{"/":{message:"发现新内容可用",buttonText:"刷新"}},updateEvent:null}},computed:{popupConfig:function(){return Object(a.g)(this,this.rawPopupConfig)},enabled:function(){return Boolean(this.popupConfig&&this.updateEvent)},message:function(){var t=this.popupConfig;return t&&t.message||u["/"].message},buttonText:function(){var t=this.popupConfig;return t&&t.buttonText||u["/"].buttonText}},created:function(){o.a.$on("sw-updated",this.onSWUpdated),!0==={"/":{message:"发现新内容可用",buttonText:"刷新"}}&&(this.rawPopupConfig=u)},methods:{onSWUpdated:function(t){this.updateEvent=t},reload:function(){this.updateEvent&&(this.updateEvent.skipWaiting().then((function(){location.reload(!0)})),this.updateEvent=null)}}},i=(n(411),n(46)),p=Object(i.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"sw-update-popup"}},[t._t("default",[t.enabled?n("div",{staticClass:"sw-update-popup"},[t._v("\n "+t._s(t.message)+"\n\n "),n("br"),t._v(" "),n("button",{on:{click:t.reload}},[t._v("\n "+t._s(t.buttonText)+"\n ")])]):t._e()],{reload:t.reload,enabled:t.enabled,message:t.message,buttonText:t.buttonText})],2)}),[],!1,null,"03f17113",null);e.default=p.exports}}]);