PageSourceSearch

https://teletype.in/static/Confirm.39145407.js

js teletype.in collected 2026-10-09 21:42:22 UTC 2,293 bytes, 1 lines download raw bytes

1import{b5 as a,B as c,G as o,o as l,l as u,w as f,h as r,k as i,j as m,n as h}from"./index.e8cebb4b.js";const d={components:{Popup:a,Button:c},data:function(){return{show:!1,eventsHandled:!1}},computed:{confirmation:function(){return this.$store.getters["confirms/current"]},buttonColor:function(){var t;switch((t=this.confirmation)!=null?t.type:void 0){case"delete":return"alarm";case"danger":return"alarm";case"remove":return"alarm";case"leave":return"alarm";case"unfollow":return"alarm";case"accept":return"success";default:return null}},buttonText:function(){var t,e;return(t=this.confirmation)!=null&&t.button_text?this.confirmation.button_text:(e=function(){var n;switch((n=this.confirmation)!=null?n.type:void 0){case"delete":return"delete";case"unfollow":return"unfollow";case"leave":return"leave";default:return"accept"}}.call(this),this.$t(`confirms.buttons.${e}`))}},watch:{confirmation:{immediate:!0,handler:function(){var t;return this.show=!!((t=this.confirmation)!=null&&t.id)}}},methods:{confirm:function(){if(!!this.confirmation)return this.$store.dispatch("confirms/confirm",this.confirmation.id).then(()=>this.show=!1)},dismiss:function(){if(!!this.confirmation)return this.$store.dispatch("confirms/dismiss",this.confirmation.id).then(()=>this.show=!1)},handleEnter:function(t){if(this.show&&t.keyCode===13)return t.preventDefault(),t.stopPropagation(),this.confirm()},onShowChange:function(t){return t?this.eventsHandled?void 0:(document.addEventListener("keydown",this.handleEnter),this.eventsHandled=!0):(document.removeEventListener("keydown",this.handleEnter),this.eventsHandled=!1,this.$store.commit("confirms/remove",this.confirmation.id))}}};function p(t,e){const n=o("Button"),s=o("Popup");return t.confirmation?(l(),u(s,{key:0,show:t.show,icon:t.confirmation.icon,blog:t.confirmation.blog,title:t.confirmation.message,text:t.confirmation.text,onClose:t.dismiss,onShow:t.onShowChange},{actions:f(()=>[r(n,{label:t.$t("confirms.buttons.dismiss"),rounded:"",onClick:i(t.dismiss,["stop"])},null,8,["label","onClick"]),r(n,{label:t.buttonText,color:t.buttonColor,rounded:"",onClick:i(t.confirm,["stop"])},null,8,["label","color","onClick"])]),_:1},8,["show","icon","blog","title","text","onClose","onShow"])):m("",!0)}const v=h(d,[["render",p]]);export{v as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.