mirror of https://github.com/go-sonic/sonic.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
21 KiB
JavaScript
1 line
21 KiB
JavaScript
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[379],{24379:function(e,t,a){a.r(t),a.d(t,{default:function(){return S}});var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("page-view",[a("a-row",{attrs:{gutter:12,align:"middle",type:"flex"}},[a("a-col",{staticClass:"pb-3",attrs:{span:24}},[a("a-card",{attrs:{bodyStyle:{padding:"16px"},bordered:!1}},[a("div",{staticClass:"table-page-search-wrapper"},[a("a-form",{attrs:{layout:"inline"}},[a("a-row",{attrs:{gutter:48}},[a("a-col",{attrs:{md:6,sm:24}},[a("a-form-item",{attrs:{label:"关键词:"}},[a("a-input",{attrs:{allowClear:""},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery.apply(null,arguments)}},model:{value:e.list.params.keyword,callback:function(t){e.$set(e.list.params,"keyword",t)},expression:"list.params.keyword"}})],1)],1),a("a-col",{attrs:{md:6,sm:24}},[a("a-form-item",{attrs:{label:"分组:"}},[a("a-select",{attrs:{allowClear:""},on:{change:function(t){return e.handleQuery()}},model:{value:e.list.params.team,callback:function(t){e.$set(e.list.params,"team",t)},expression:"list.params.team"}},e._l(e.computedTeams,(function(t,n){return a("a-select-option",{key:n,attrs:{value:t}},[e._v(" "+e._s(t)+" ")])})),1)],1)],1),a("a-col",{attrs:{md:6,sm:24}},[a("span",{staticClass:"table-page-search-submitButtons"},[a("a-space",[a("a-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleQuery()}}},[e._v("查询")]),a("a-button",{on:{click:function(t){return e.handleResetParam()}}},[e._v("重置")])],1)],1)])],1)],1)],1),a("div",{staticClass:"table-operator mb-0"},[a("a-dropdown",{scopedSlots:e._u([{key:"overlay",fn:function(){return[a("a-menu",[a("a-menu-item",{key:"single",on:{click:function(t){return e.handleOpenForm({})}}},[e._v(" 添加")]),a("a-menu-item",{key:"batch",on:{click:function(t){e.attachmentSelectModal.visible=!0}}},[e._v(" 批量添加")])],1)]},proxy:!0}])},[a("a-button",{attrs:{icon:"plus",type:"primary"}},[e._v(" 添加 "),a("a-icon",{attrs:{type:"down"}})],1)],1),a("a-button",{directives:[{name:"show",rawName:"v-show",value:e.list.selected.length,expression:"list.selected.length"}],attrs:{icon:"check-circle",type:"primary"},on:{click:e.handleSelectAll}},[e._v(" 全选 ")]),a("a-button",{directives:[{name:"show",rawName:"v-show",value:e.list.selected.length,expression:"list.selected.length"}],attrs:{icon:"delete",type:"danger"},on:{click:e.handleDeletePhotoInBatch}},[e._v(" 删除 ")]),a("a-button",{directives:[{name:"show",rawName:"v-show",value:e.list.selected.length,expression:"list.selected.length"}],attrs:{icon:"delete"},on:{click:e.handleOpenUpdateTeamForm}},[e._v(" 更改分组 ")]),a("a-button",{directives:[{name:"show",rawName:"v-show",value:e.list.selected.length,expression:"list.selected.length"}],attrs:{icon:"close"},on:{click:function(t){e.list.selected=[]}}},[e._v(" 取消")])],1)])],1),a("a-col",{attrs:{span:24}},[a("a-spin",{attrs:{spinning:e.list.loading}},[a("div",{staticClass:"grid grid-cols-2 gap-x-2 gap-y-3 sm:grid-cols-3 md:grid-cols-6 xl:grid-cols-8 2xl:grid-cols-10",attrs:{role:"list"}},e._l(e.list.data,(function(t,n){return a("div",{key:n,staticClass:"relative cursor-pointer overflow-hidden rounded-sm border-solid bg-white transition-all hover:shadow-sm",class:e.isItemSelect(t)?"border-blue-600":"border-white",on:{click:function(a){return e.handleItemClick(t)},mouseenter:function(a){return e.$set(t,"hover",!0)},mouseleave:function(a){return e.$set(t,"hover",!1)}}},[a("div",{staticClass:"group aspect-w-10 aspect-h-7 block w-full overflow-hidden bg-white"},[a("img",{staticClass:"pointer-events-none overflow-hidden object-cover transition-opacity group-hover:opacity-70",attrs:{alt:t.name,src:t.thumbnail,loading:"lazy"}})]),a("a-tooltip",{attrs:{title:t.name}},[a("div",{staticClass:"block truncate p-1.5 text-xs font-medium text-gray-500"},[a("span",{staticClass:"mr-1"},[e._v(" "+e._s(t.name)+" ")]),t.team?a("span",[e._v("#"+e._s(t.team))]):e._e()])]),a("a-icon",{directives:[{name:"show",rawName:"v-show",value:!e.isItemSelect(t)&&t.hover,expression:"!isItemSelect(photo) && photo.hover"}],staticClass:"absolute top-1 right-1 cursor-pointer font-bold transition-all",style:{fontSize:"20px",color:"rgb(37 99 235)"},attrs:{theme:"twoTone",type:"plus-circle"},on:{click:function(a){return a.stopPropagation(),e.handleSelect(t)}}}),a("a-icon",{directives:[{name:"show",rawName:"v-show",value:e.isItemSelect(t),expression:"isItemSelect(photo)"}],staticClass:"absolute top-1 right-1 cursor-pointer font-bold transition-all",style:{fontSize:"20px",color:"rgb(37 99 235)"},attrs:{theme:"twoTone",type:"check-circle"}})],1)})),0)])],1)],1),a("div",{staticClass:"page-wrapper"},[a("a-pagination",{staticClass:"pagination",attrs:{current:e.pagination.page,defaultPageSize:e.pagination.size,pageSizeOptions:["50","100","150","200"],total:e.pagination.total,showLessItems:"",showSizeChanger:""},on:{change:e.handlePageChange,showSizeChange:e.handlePageSizeChange}})],1),a("div",{staticStyle:{position:"fixed",bottom:"30px",right:"30px"}},[a("a-button",{attrs:{icon:"setting",shape:"circle",size:"large",type:"primary"},on:{click:function(t){e.optionFormVisible=!0}}})],1),a("a-modal",{attrs:{afterClose:function(){return e.optionFormVisible=!1},title:"页面设置"},scopedSlots:e._u([{key:"footer",fn:function(){return[a("a-button",{key:"submit",attrs:{type:"primary"},on:{click:function(t){return e.handleSaveOptions()}}},[e._v("保存")])]},proxy:!0}]),model:{value:e.optionFormVisible,callback:function(t){e.optionFormVisible=t},expression:"optionFormVisible"}},[a("a-form",{attrs:{layout:"vertical"}},[a("a-form-item",{attrs:{help:"* 需要主题进行适配",label:"页面标题:"}},[a("a-input",{model:{value:e.options.photos_title,callback:function(t){e.$set(e.options,"photos_title",t)},expression:"options.photos_title"}})],1),a("a-form-item",{attrs:{label:"每页显示条数:"}},[a("a-input-number",{staticStyle:{width:"100%"},model:{value:e.options.photos_page_size,callback:function(t){e.$set(e.options,"photos_page_size",t)},expression:"options.photos_page_size"}})],1)],1)],1),a("a-modal",{attrs:{title:"更改分组"},scopedSlots:e._u([{key:"footer",fn:function(){return[a("ReactiveButton",{attrs:{errored:e.updateTeamForm.saveErrored,loading:e.updateTeamForm.saving,erroredText:"更改失败",loadedText:"更改成功",text:"确定"},on:{callback:e.handleUpdateTeamInBatchCallback,click:e.handleUpdateTeamInBatch}}),a("a-button",{on:{click:function(t){e.updateTeamForm.visible=!1}}},[e._v("关闭")])]},proxy:!0}]),model:{value:e.updateTeamForm.visible,callback:function(t){e.$set(e.updateTeamForm,"visible",t)},expression:"updateTeamForm.visible"}},[a("a-form",{attrs:{layout:"vertical"}},[a("a-form-item",{attrs:{label:"分组名称:"}},[a("a-auto-complete",{ref:"teamInput",staticStyle:{width:"100%"},attrs:{dataSource:e.computedTeams,allowClear:""},model:{value:e.updateTeamForm.team,callback:function(t){e.$set(e.updateTeamForm,"team",t)},expression:"updateTeamForm.team"}})],1)],1)],1),a("PhotoFormModal",{attrs:{photo:e.list.current,teams:e.computedTeams,visible:e.formVisible},on:{"update:visible":function(t){e.formVisible=t},succeed:e.onSaveSucceed},scopedSlots:e._u([{key:"extraFooter",fn:function(){return[a("a-button",{attrs:{disabled:e.selectPreviousButtonDisabled},on:{click:e.handleSelectPrevious}},[e._v("上一项")]),a("a-button",{attrs:{disabled:e.selectNextButtonDisabled},on:{click:e.handleSelectNext}},[e._v("下一项")])]},proxy:!0}])}),a("AttachmentSelectModal",{attrs:{visible:e.attachmentSelectModal.visible},on:{"update:visible":function(t){return e.$set(e.attachmentSelectModal,"visible",t)},confirm:e.handleAttachmentSelected}})],1)},r=[],o=a(23222),i=a(54288),s=a(22373),l=(a(70315),a(90195),a(31875),a(15928),a(41479),a(82395),a(21082),a(96667)),c=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-modal",{attrs:{afterClose:e.onClosed,maskClosable:!1,width:680,destroyOnClose:""},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(" "+e._s(e.form.model.id?"修改":"添加")+"图片 "),e.loading?a("a-icon",{attrs:{type:"loading"}}):e._e()]},proxy:!0},{key:"footer",fn:function(){return[e._t("extraFooter"),a("ReactiveButton",{attrs:{errored:e.form.saveErrored,loading:e.form.saving,erroredText:"保存失败",loadedText:"保存成功",text:"保存"},on:{callback:e.handleSaveCallback,click:e.handleSave}}),a("a-button",{attrs:{disabled:e.loading},on:{click:function(t){e.modalVisible=!1}}},[e._v(" 关闭")])]},proxy:!0}],null,!0),model:{value:e.modalVisible,callback:function(t){e.modalVisible=t},expression:"modalVisible"}},[a("a-form-model",{ref:"photoForm",attrs:{"label-col":e.form.labelCol,model:e.form.model,rules:e.form.rules,"wrapper-col":e.form.wrapperCol,labelAlign:"left"}},[a("a-form-model-item",{attrs:{label:"图片地址:",prop:"url"}},[a("a-space",{attrs:{direction:"vertical"}},[a("img",{staticClass:"w-1/2 cursor-pointer",staticStyle:{"border-radius":"4px"},attrs:{src:e.form.model.url||"/images/placeholder.jpg"},on:{click:function(t){e.attachmentSelectModal.visible=!0}}}),a("a-input",{attrs:{"allow-clear":"",placeholder:"点击封面图选择图片,或者输入外部链接"},model:{value:e.form.model.url,callback:function(t){e.$set(e.form.model,"url",t)},expression:"form.model.url"}})],1)],1),a("a-form-model-item",{attrs:{label:"缩略图地址:",prop:"thumbnail"}},[a("a-input",{model:{value:e.form.model.thumbnail,callback:function(t){e.$set(e.form.model,"thumbnail",t)},expression:"form.model.thumbnail"}})],1),a("a-form-model-item",{attrs:{label:"图片名称:",prop:"name"}},[a("a-input",{model:{value:e.form.model.name,callback:function(t){e.$set(e.form.model,"name",t)},expression:"form.model.name"}})],1),a("a-form-model-item",{attrs:{label:"拍摄日期:",prop:"takeTime"}},[a("a-date-picker",{staticStyle:{width:"100%"},attrs:{defaultValue:e.takeTimeDefaultValue,format:"YYYY-MM-DD HH:mm:ss",showTime:""},on:{change:e.onTakeTimeChange,ok:e.onTakeTimeChange}})],1),a("a-form-model-item",{attrs:{label:"拍摄地点:",prop:"location"}},[a("a-input",{model:{value:e.form.model.location,callback:function(t){e.$set(e.form.model,"location",t)},expression:"form.model.location"}})],1),a("a-form-model-item",{attrs:{label:"分组:",prop:"team"}},[a("a-auto-complete",{staticStyle:{width:"100%"},attrs:{dataSource:e.teams,allowClear:""},model:{value:e.form.model.team,callback:function(t){e.$set(e.form.model,"team",t)},expression:"form.model.team"}})],1),a("a-form-model-item",{attrs:{label:"描述:",prop:"description"}},[a("a-input",{model:{value:e.form.model.description,callback:function(t){e.$set(e.form.model,"description",t)},expression:"form.model.description"}})],1)],1),a("AttachmentSelectModal",{attrs:{multiSelect:!1,visible:e.attachmentSelectModal.visible},on:{"update:visible":function(t){return e.$set(e.attachmentSelectModal,"visible",t)},confirm:e.handleAttachmentSelected}})],1)},u=[],m=a(25572),d=a(36591),h={name:"PhotoFormModal",props:{visible:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},photo:{type:Object,default:function(){}},teams:{type:Array,default:function(){return[]}}},data:function(){return{form:{model:{},rules:{url:[{required:!0,message:"* 图片地址不能为空",trigger:["change"]}],thumbnail:[{required:!0,message:"* 缩略图地址不能为空",trigger:["change"]}],name:[{required:!0,message:"* 图片名称不能为空",trigger:["change"]}]},saving:!1,saveErrored:!1,labelCol:{sm:{span:4},xs:{span:24}},wrapperCol:{sm:{span:20},xs:{span:24}}},attachmentSelectModal:{visible:!1}}},computed:{modalVisible:{get:function(){return this.visible},set:function(e){this.$emit("update:visible",e)}},takeTimeDefaultValue:function(){if(this.form.model.takeTime){var e=new Date(this.form.model.takeTime);return(0,m._)(e,"YYYY-MM-DD HH:mm:ss")}return(0,m._)(new Date,"YYYY-MM-DD HH:mm:ss")}},watch:{modalVisible:function(e){e&&(this.form.model=Object.assign({},this.photo))},photo:{deep:!0,handler:function(e){this.form.model=Object.assign({},e)}}},methods:{onClosed:function(){},handleAttachmentSelected:function(e){var t=e.raw;if(t.length){var a=t[0],n=a.path,r=a.thumbPath,o=a.name;this.$set(this.form.model,"url",n),this.$set(this.form.model,"thumbnail",r),this.$set(this.form.model,"name",o)}this.attachmentSelectModal.visible=!1},onTakeTimeChange:function(e){this.form.model.takeTime=e.valueOf()},handleSave:function(){var e=this,t=this;t.$refs.photoForm.validate(function(){var a=(0,i.Z)(regeneratorRuntime.mark((function a(n){var r,o;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(!n){a.next=22;break}if(t.form.saving=!0,a.prev=2,!t.form.model.id){a.next=8;break}return a.next=6,d.Z.photo.update(t.form.model.id,t.form.model);case 6:a.next=13;break;case 8:return a.next=10,d.Z.photo.create(t.form.model);case 10:r=a.sent,o=r.data,e.form.model=o;case 13:a.next=19;break;case 15:a.prev=15,a.t0=a["catch"](2),t.form.saveErrored=!0,e.$log.error("Failed to save this photo",a.t0);case 19:return a.prev=19,setTimeout((function(){t.form.saving=!1}),400),a.finish(19);case 22:case"end":return a.stop()}}),a,null,[[2,15,19,22]])})));return function(e){return a.apply(this,arguments)}}())},handleSaveCallback:function(){this.form.saveErrored?this.form.saveErrored=!1:this.$emit("succeed",this.form.model)}}},p=h,f=a(70739),v=(0,f.Z)(p,c,u,!1,null,null,null),b=v.exports,g=a(98906),k=a(94370),x={mixins:[k.jB,k.KT],components:{PageView:l.B4,PhotoFormModal:b},data:function(){return{list:{data:[],loading:!1,params:{page:0,size:50,sort:["createTime,desc","id,asc"],keyword:null,team:void 0},total:0,hasPrevious:!1,hasNext:!1,selected:[],current:{}},attachmentSelectModal:{visible:!1},updateTeamForm:{team:void 0,visible:!1,saving:!1,saveErrored:!1},formVisible:!1,teams:[],options:{},optionFormVisible:!1}},created:function(){this.handleListPhotos(),this.handleListPhotoTeams(),this.handleListOptions()},computed:{pagination:function(){return{page:this.list.params.page+1,size:this.list.params.size,total:this.list.total}},computedTeams:function(){return this.teams.filter((function(e){return""!==e}))},isItemSelect:function(){return function(e){return this.list.selected.findIndex((function(t){return t.id===e.id}))>-1}},selectPreviousButtonDisabled:function(){var e=this,t=this.list.data.findIndex((function(t){return t.id===e.list.current.id}));return 0===t&&!this.list.hasPrevious},selectNextButtonDisabled:function(){var e=this,t=this.list.data.findIndex((function(t){return t.id===e.list.current.id}));return t===this.list.data.length-1&&!this.list.hasNext}},methods:(0,s.Z)((0,s.Z)({},(0,g.nv)(["refreshOptionsCache"])),{},{handleListPhotos:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.list.loading=!0,t.next=4,d.Z.photo.list(e.list.params);case 4:a=t.sent,e.list.data=a.data.content,e.list.total=a.data.total,e.list.hasPrevious=a.data.hasPrevious,e.list.hasNext=a.data.hasNext,t.next=14;break;case 11:t.prev=11,t.t0=t["catch"](0),e.$log.error("Failed to get photos",t.t0);case 14:return t.prev=14,e.list.loading=!1,t.finish(14);case 17:case"end":return t.stop()}}),t,null,[[0,11,14,17]])})))()},handleListPhotoTeams:function(){var e=this;d.Z.photo.listTeams().then((function(t){e.teams=t.data}))},handlePageChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.list.params.page=e-1,this.handleListPhotos()},handlePageSizeChange:function(e,t){this.$log.debug("Current: ".concat(e,", PageSize: ").concat(t)),this.list.params.page=0,this.list.params.size=t,this.handleListPhotos()},handleQuery:function(){this.handlePageChange(1)},handleResetParam:function(){this.list.params.keyword=void 0,this.list.params.team=void 0,this.handlePageChange(1),this.handleListPhotoTeams()},handleItemClick:function(e){this.list.selected.length<=0?this.handleOpenForm(e):this.isItemSelect(e)?this.handleUnselect(e):this.handleSelect(e)},handleOpenForm:function(e){this.list.current=e,this.formVisible=!0},handleSelect:function(e){this.list.selected=[].concat((0,o.Z)(this.list.selected),[e])},handleUnselect:function(e){this.list.selected=this.list.selected.filter((function(t){return t.id!==e.id}))},handleSelectAll:function(){this.list.selected=this.list.data},handleAttachmentSelected:function(e){var t=this;return(0,i.Z)(regeneratorRuntime.mark((function a(){var n,r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(n=e.raw,n.length){a.next=3;break}return a.abrupt("return");case 3:return r=n.reverse().map((function(e){return{name:e.name,url:e.path,thumbnail:e.thumbPath}})),a.prev=4,a.next=7,d.Z.photo.createInBatch(r);case 7:t.$message.success("添加成功"),a.next=13;break;case 10:a.prev=10,a.t0=a["catch"](4),t.$log.error("Failed to create photos in batch",a.t0);case 13:return a.prev=13,a.next=16,t.handleListPhotos();case 16:return t.handleListPhotoTeams(),a.finish(13);case 18:case"end":return a.stop()}}),a,null,[[4,10,13,18]])})))()},handleDeletePhotoInBatch:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!(e.list.selected.length<=0)){t.next=3;break}return e.$message.warn("你还未选择任何图片,请至少选择一个!"),t.abrupt("return");case 3:a=e,e.$confirm({title:"确定要批量删除选中的图片吗?",content:"一旦删除不可恢复,请谨慎操作",onOk:function(){return(0,i.Z)(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t=a.list.selected.map((function(e){return e.id})),e.next=4,d.Z.photo.deleteInBatch(t);case 4:a.list.selected=[],a.$message.success("删除成功"),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),a.$log.error("Failed to delete selected photos",e.t0);case 11:return e.prev=11,e.next=14,a.handleListPhotos();case 14:return a.handleListPhotoTeams(),e.finish(11);case 16:case"end":return e.stop()}}),e,null,[[0,8,11,16]])})))()}});case 5:case"end":return t.stop()}}),t)})))()},handleUpdateTeamInBatch:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=e.list.selected.map((function(t){return(0,s.Z)((0,s.Z)({},t),{},{team:e.updateTeamForm.team})})),t.prev=1,e.updateTeamForm.saving=!0,t.next=5,d.Z.photo.updateInBatch(a);case 5:e.$message.success("更改成功"),t.next=12;break;case 8:t.prev=8,t.t0=t["catch"](1),e.updateTeamForm.saveErrored=!0,e.$log.error("Failed to change team in batch",t.t0);case 12:return t.prev=12,setTimeout((function(){e.updateTeamForm.saving=!1}),400),t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[1,8,12,15]])})))()},handleUpdateTeamInBatchCallback:function(){this.updateTeamForm.saveErrored?this.updateTeamForm.saveErrored=!1:(this.updateTeamForm.visible=!1,this.updateTeamForm.team=void 0,this.list.selected=[],this.handleListPhotos())},handleOpenUpdateTeamForm:function(){var e=this;this.updateTeamForm.visible=!0,this.$nextTick((function(){e.$refs.teamInput.focus()}))},onSaveSucceed:function(e){var t=this;return(0,i.Z)(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,t.handleListPhotos();case 2:t.list.current=e,t.handleListPhotoTeams();case 4:case"end":return a.stop()}}),a)})))()},handleListOptions:function(){var e=this;d.Z.option.listAsMapViewByKeys(["photos_page_size","photos_title"]).then((function(t){e.options=t.data}))},handleSaveOptions:function(){var e=this;d.Z.option.saveMapView(this.options).then((function(){e.$message.success("保存成功!"),e.optionFormVisible=!1})).finally((function(){e.handleListOptions(),e.refreshOptionsCache()}))},handleSelectPrevious:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a=e.list.data.findIndex((function(t){return t.id===e.list.current.id})),!(a>0)){t.next=4;break}return e.list.current=e.list.data[a-1],t.abrupt("return");case 4:if(0!==a||!e.list.hasPrevious){t.next=9;break}return e.list.params.page--,t.next=8,e.handleListPhotos();case 8:e.list.current=e.list.data[e.list.data.length-1];case 9:case"end":return t.stop()}}),t)})))()},handleSelectNext:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a=e.list.data.findIndex((function(t){return t.id===e.list.current.id})),!(a<e.list.data.length-1)){t.next=4;break}return e.list.current=e.list.data[a+1],t.abrupt("return");case 4:if(a!==e.list.data.length-1||!e.list.hasNext){t.next=9;break}return e.list.params.page++,t.next=8,e.handleListPhotos();case 8:e.list.current=e.list.data[0];case 9:case"end":return t.stop()}}),t)})))()}})},w=x,y=(0,f.Z)(w,n,r,!1,null,null,null),S=y.exports}}]); |