Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/pull/vue3/status/dist/ |
Upload File : |
(function(t,s,e,i,n){"use strict";var u=4e3;var l=500;var a=5e3;var c=1e3;var o={name:"PullStatus",props:{canReconnect:{type:Boolean,default:false}},emits:["reconnect"],data:function t(){return{status:i.PullClient.PullStatus.Online,showed:null}},computed:{containerClass:function t(){var s=[];var e="";if(this.showed===true){e="--show"}else if(this.showed===false){e="--hide"}var i="--".concat(this.status);s.push(e,i);return s},connectionText:function t(){var s="";if(this.status===i.PullClient.PullStatus.Online){s=this.$Bitrix.Loc.getMessage("BX_PULL_STATUS_ONLINE")}else if(this.status===i.PullClient.PullStatus.Offline){s=this.$Bitrix.Loc.getMessage("BX_PULL_STATUS_OFFLINE")}else if(this.status===i.PullClient.PullStatus.Connecting){s=this.$Bitrix.Loc.getMessage("BX_PULL_STATUS_CONNECTING")}return s},button:function t(){if(this.status===i.PullClient.PullStatus.Online){return null}var s="";var e="";if(this.canReconnect){e=this.$Bitrix.Loc.getMessage("BX_PULL_STATUS_BUTTON_RECONNECT")}else{s=n.Browser.isMac()?"⌘+R":"Ctrl+R";e=this.$Bitrix.Loc.getMessage("BX_PULL_STATUS_BUTTON_RELOAD")}return{title:e,key:s}}},watch:{status:function t(){var s=this;clearTimeout(this.hideTimeout);if(this.status!==i.PullClient.PullStatus.Online){return}this.hideTimeout=setTimeout((function(){s.showed=false}),u)}},created:function t(){this.unsubscribeFunction=function(){};this.initEvents()},beforeUnmount:function t(){this.destroyEvents()},methods:{initEvents:function t(){if(this.$Bitrix.PullClient.get()){this.subscribeToPullStatus()}this.$Bitrix.eventEmitter.subscribe(e.BitrixVue.events.pullClientChange,this.subscribeToPullStatus)},destroyEvents:function t(){this.unsubscribeFunction();this.$Bitrix.eventEmitter.unsubscribe(e.BitrixVue.events.pullClientChange,this.subscribeToPullStatus)},subscribeToPullStatus:function t(){var s=this;this.unsubscribeFunction();this.unsubscribeFunction=this.$Bitrix.PullClient.get().subscribe({type:i.PullClient.SubscriptionType.Status,callback:function t(e){return s.onStatusChange(e.status)}})},reconnect:function t(){if(this.canReconnect){this.$emit("reconnect")}else{location.reload()}},onStatusChange:function t(s){var e=this;clearTimeout(this.setStatusTimeout);if(this.status===s){return}var n=[i.PullClient.PullStatus.Online,i.PullClient.PullStatus.Offline,i.PullClient.PullStatus.Connecting];if(!n.includes(s)){return}var u=l;if(s===i.PullClient.PullStatus.Connecting){u=a}else if(s===i.PullClient.PullStatus.Offline){u=c}this.setStatusTimeout=setTimeout((function(){e.status=s;e.showed=true}),u)}},template:'\n\t\t<div class="bx-pull-vue3-status" :class="containerClass">\n\t\t\t<div class="bx-pull-vue3-status-wrap">\n\t\t\t\t<span class="bx-pull-vue3-status-text">{{ connectionText }}</span>\n\t\t\t\t<span v-if="button" class="bx-pull-vue3-status-button" @click="reconnect">\n\t\t\t\t\t<span class="bx-pull-vue3-status-button-title">{{ button.title }}</span>\n\t\t\t\t\t<span class="bx-pull-vue3-status-button-key" v-html="button.key"></span>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t</div>\n\t'};t.PullStatus=o})(this.window=this.window||{},BX,BX.Vue3,BX,BX); //# sourceMappingURL=status.bundle.map.js