PageSourceSearch

https://www.bergesinstitutespanish.com/build/assets/Comments-BoLFKw-u.js

js bergesinstitutespanish.com collected 2026-09-24 17:38:44 UTC 3,995 bytes, 1 lines download raw bytes

1import{L as g}from"./Loader-l3cSYZQu.js";import{C as b,a as f}from"./Comment-pDAaaJ0X.js";import{r as d,o as n,c as a,a as m,t as o,b as l,h as c,f as h,F as C,e as y,i as k}from"./vue-router-Cc0Ijf1R.js";import{_ as w}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Modal-CdTST-ss.js";const P={components:{Loader:g,Comment:f,CommentBox:b},data(){return{classs:null,comments:[],loading:!0,loadingMore:!1,currentPage:1,lastPage:1,newCommentBody:"",posting:!1,snackbarMessage:""}},computed:{hasMorePages(){return this.currentPage<this.lastPage}},mounted(){axios.get("/classes/"+this.$route.params.class_id).then(s=>{this.classs=s.data.data,this.addFrontEndClassProperties(this.classs),this.loadComments(),this.focusNewComment()})},methods:{loadComments(s=!1){return s&&(this.loadingMore=!0,this.currentPage++),axios.get("/class-comments/"+this.$route.params.class_id,{params:{page:this.currentPage}}).then(t=>{this.comments=s?[...this.comments,...t.data.data]:t.data.data,this.currentPage=t.data.meta.current_page,this.lastPage=t.data.meta.last_page,this.loadingMore=!1}).finally(()=>{this.loading=!1})},submitComment(){!this.newCommentBody.trim()||this.posting||(this.posting=!0,Snackbar.show(this.$t("posting")),axios.post("/class-comments/"+this.$route.params.class_id,{body:this.newCommentBody}).then(()=>{this.newCommentBody="",this.currentPage=1,this.loadComments().then(()=>{this.posting=!1,Snackbar.show(this.$t("success"))})}))},handleReply(s){this.posting=!0,Snackbar.show(this.$t("posting")),axios.post("/class-comments/"+this.$route.params.class_id,{parent_comment_id:s.parent_comment_id,reply_to_user_id:s.reply_to_user_id,body:s.body}).then(()=>{this.currentPage=1,this.loadComments().then(()=>{this.posting=!1,Snackbar.show(this.$t("success"))})})},focusNewComment(){setTimeout(()=>{var s;return(s=this.$refs.newCommentBox)==null?void 0:s.focus()},100)},refreshComments(){this.loading=!0,this.currentPage=1,this.loadComments()}}},B={key:0,class:"p-4 border-bottom d-flex justify-content-between align-items-start"},v={class:"h3"},M={class:"text-muted"},N=["disabled"],S={key:1,class:"px-4 py-3 border-bottom bg-light"},V={class:"small mb-0"},x=["href"],L={key:2,class:"p-4 border-bottom"},R={key:3},F={class:"p-4 mb-5"},E={key:0,class:"small"},T={key:1},U=["disabled"],j={key:0},H={key:1};function q(s,t,z,A,e,r){const u=d("comment-box"),p=d("loader"),_=d("comment");return n(),a("div",null,[e.classs?(n(),a("div",B,[m("div",null,[m("h1",v,o(s.$tc("comment",2))+": "+o(e.classs.level.name)+", "+o(s.$tc("class",1))+" #"+o(e.classs.class_number),1),m("div",M,o(e.classs.datetimeLocal)+" • "+o(e.classs.external_sub_name||e.classs.instructor_for_this_class.name),1)]),m("button",{class:"btn btn-outline-primary btn-sm",onClick:t[0]||(t[0]=(...i)=>r.refreshComments&&r.refreshComments(...i)),disabled:e.loading},o(s.$t("refresh")),9,N)])):l("",!0),e.classs?(n(),a("div",S,[m("p",V,[c(o(s.$t("commentsDiscussionNote"))+" ",1),m("a",{href:s.HelpCenterUrl,target:"_blank"},o(s.$t("helpCenter")),9,x),t[3]||(t[3]=c(". ",-1))])])):l("",!0),e.classs?(n(),a("div",L,[h(u,{ref:"newCommentBox",modelValue:e.newCommentBody,"onUpdate:modelValue":t[1]||(t[1]=i=>e.newCommentBody=i),placeholder:s.$t("writeComment"),"submit-label":s.$t("sendComment"),disabled:e.posting,onSubmit:r.submitComment},null,8,["modelValue","placeholder","submit-label","disabled","onSubmit"])])):l("",!0),h(p,{show:e.loading},null,8,["show"]),e.loading?l("",!0):(n(),a("div",R,[m("div",F,[e.comments.length===0?(n(),a("p",E,o(s.$t("noComments")),1)):l("",!0),(n(!0),a(C,null,y(e.comments,i=>(n(),k(_,{key:i.id,comment:i,"is-reply":!1,onReply:r.handleReply},null,8,["comment","onReply"]))),128)),r.hasMorePages?(n(),a("div",T,[m("button",{class:"btn btn-outline-primary",onClick:t[2]||(t[2]=i=>r.loadComments(!0)),disabled:e.loadingMore},[e.loadingMore?(n(),a("span",j,o(s.$t("loading"))+"...",1)):(n(),a("span",H,o(s.$t("loadMore")),1))],8,U)])):l("",!0)])]))])}const O=w(P,[["render",q]]);export{O 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.