%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.net/nextcloud.varak.net/apps/photos/js/
Upload File :
Create Path :
Current File : //www/varak.net/nextcloud.varak.net/apps/photos/js/photos-src_views_FaceContent_vue.js

"use strict";(self.webpackChunkphotos=self.webpackChunkphotos||[]).push([["src_views_FaceContent_vue"],{28393:(t,e,n)=>{n.d(e,{A:()=>c});var o=n(71354),a=n.n(o),i=n(76314),s=n.n(i)()(a());s.push([t.id,".face[data-v-203e733c]{display:flex;flex-direction:column}.face__empty[data-v-203e733c]{display:flex;flex-direction:column;align-items:center}.face__empty__button[data-v-203e733c]{margin-top:32px}.face__header[data-v-203e733c]{display:flex;min-height:60px;align-items:center;justify-content:space-between;position:sticky;z-index:3;background:var(--color-main-background);padding:0 64px}@media only screen and (max-width: 1020px){.face__header[data-v-203e733c]{padding:0;padding-left:64px}}.face__header__left[data-v-203e733c]{height:100%;display:flex;align-items:center}.face__header__title[data-v-203e733c]{margin-left:10px}.face__header__title h2[data-v-203e733c]{margin-bottom:0}.face__header__loader[data-v-203e733c]{margin-left:32px}.face__header__actions[data-v-203e733c]{display:flex;align-items:center}.face__header__actions button[data-v-203e733c]{margin-left:16px}.face__photos[data-v-203e733c]{margin-top:16px;height:100%;min-height:0;padding:0 64px}@media only screen and (max-width: 1020px){.face__photos[data-v-203e733c]{padding:0}}.empty-content-with-illustration[data-v-203e733c] .empty-content__icon{width:200px;height:200px}.empty-content-with-illustration[data-v-203e733c] .empty-content__icon svg{width:200px;height:200px}.rename-form[data-v-203e733c]{display:flex;flex-direction:row;align-items:center;height:70px;padding:16px}.rename-form input[data-v-203e733c]{width:100%}","",{version:3,sources:["webpack://./src/mixins/FaceContent.scss"],names:[],mappings:"AAIA,uBACC,YAAA,CACA,qBAAA,CAEA,8BACC,YAAA,CACA,qBAAA,CACA,kBAAA,CAEA,sCACC,eAAA,CAKF,+BACC,YAAA,CACA,eAAA,CACA,kBAAA,CACA,6BAAA,CACA,eAAA,CACA,SAAA,CACA,uCAAA,CACA,cAAA,CAEA,2CAVD,+BAWE,SAAA,CACA,iBAAA,CAAA,CAGD,qCACC,WAAA,CACA,YAAA,CACA,kBAAA,CAGD,sCACC,gBAAA,CACA,yCACC,eAAA,CAIF,uCACC,gBAAA,CAGD,wCACC,YAAA,CACA,kBAAA,CAEA,+CACC,gBAAA,CAKH,+BACC,eAAA,CACA,WAAA,CACA,YAAA,CACA,cAAA,CAEA,2CAND,+BAOE,SAAA,CAAA,CAKH,uEACC,WAAA,CACA,YAAA,CAEA,2EACC,WAAA,CACA,YAAA,CAIF,8BACC,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,WAAA,CACA,YAAA,CAEA,oCACC,UAAA",sourcesContent:["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n.face {\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t&__empty {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\n\t\t&__button {\n\t\t\tmargin-top: 32px;\n\t\t}\n\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\tmin-height: 60px;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tposition: sticky;\n\t\tz-index: 3;\n\t\tbackground: var(--color-main-background);\n\t\tpadding: 0 64px;\n\n\t\t@media only screen and (max-width: 1020px) {\n\t\t\tpadding: 0;\n\t\t\tpadding-left: 64px;\n\t\t}\n\n\t\t&__left {\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\n\t\t&__title {\n\t\t\tmargin-left: 10px;\n\t\t\th2 {\n\t\t\t\tmargin-bottom: 0;\n\t\t\t}\n\t\t}\n\n\t\t&__loader {\n\t\t\tmargin-left: 32px;\n\t\t}\n\n\t\t&__actions {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\n\t\t\tbutton {\n\t\t\t\tmargin-left: 16px;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__photos {\n\t\tmargin-top: 16px;\n\t\theight: 100%;\n\t\tmin-height: 0; // Prevent it from overflowing in a flex context.\n\t\tpadding: 0 64px;\n\n\t\t@media only screen and (max-width: 1020px) {\n\t\t\tpadding: 0;\n\t\t}\n\t}\n}\n\n.empty-content-with-illustration :deep .empty-content__icon {\n\twidth: 200px;\n\theight: 200px;\n\n\tsvg {\n\t\twidth: 200px;\n\t\theight: 200px;\n\t}\n}\n\n.rename-form {\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\theight: 70px;\n\tpadding: 16px;\n\n\tinput {\n\t\twidth: 100%;\n\t}\n}\n"],sourceRoot:""}]);const c=s},54837:(t,e,n)=>{n.r(e),n.d(e,{default:()=>Y});var o=n(95353),a=n(73043),i=n(4372),s=n(15897),c=n(75513),l=n(85217),r=n(11397),d=n(45157),A=n(55028),f=n(17091),h=n(32934),p=n(76333),u=n(96285),m=n(11132),C=n(38385),_=n(37698),g=n(63360),v=n(44671),y=n(85471),F=n(26362);const x={name:"FaceContent",components:{Pencil:a.A,Star:c.A,Download:l.A,Close:i.A,AlertCircle:s.A,Send:r.A,Merge:d.A,ArrowLeft:A.A,AccountBoxMultipleOutline:h.A,FaceMergeForm:F.A,FilesListViewer:C.A,File:_.A,NcLoadingIcon:p.ne,NcEmptyContent:p.yI,NcActions:p.B6,NcActionButton:p.Ko,NcDialog:p.i$,NcButton:p.x1,AccountSwitch:f.A},directives:{focus(t){y.Ay.nextTick((()=>t.focus()))}},mixins:[v.A,u.A,m.A],props:{faceName:{type:String,default:"/"}},data:()=>({showMoveModal:!1,showMergeModal:!1,showRenameModal:!1,loadingCount:0,appContent:document.getElementById("app-content-vue")}),computed:{...(0,o.L8)(["files","facesFiles"]),face(){return this.faces[this.faceName]},faceFileIds(){return this.facesFiles[this.faceName]||[]},shouldFavoriteSelection(){return this.selectedFileIds.some((t=>0===this.$store.state.files.files[t].favorite))}},watch:{face(){this.face&&this.fetchFaceContent(this.faceName)}},mounted(){this.fetchFaceContent(this.faceName)},methods:{...(0,o.i0)(["appendFiles","deleteFace","renameFace","downloadFiles","toggleFavoriteForFiles","removeFilesFromFace","moveFilesToFace"]),openViewer(t){const e=this.files[t];OCA.Viewer.open({path:"/"+e.filename.split("/").slice(3).join("/"),list:this.faceFileIds.map((t=>({...this.files[t],filename:"/"+this.files[t].filename.split("/").slice(3).join("/")}))),loadMore:e.loadMore?async()=>await e.loadMore(!0):()=>[],canLoop:e.canLoop})},async handleRemoveFilesFromFace(t){try{this.loadingCount++,await this.removeFilesFromFace({faceName:this.faceName,fileIdsToRemove:t}),this.resetSelection()}catch(t){g.A.error(t)}finally{this.loadingCount--}},async handleDeleteFace(){try{this.loadingCount++,await this.deleteFace({faceName:this.faceName}),this.$router.push("/faces")}catch(t){g.A.error(t)}finally{this.loadingCount--}},async handleRenameFace(t){try{this.loadingCount++,this.showRenameModal=!1;const e=this.faceName;await this.renameFace({oldName:e,faceName:t}),this.$router.push({name:"facecontent",params:{faceName:t}})}catch(t){g.A.error(t)}finally{this.loadingCount--}},async handleMerge(t){try{this.loadingCount++,await this.moveFilesToFace({oldFace:this.faceName,faceName:t,fileIdsToMove:this.facesFiles[this.faceName]}),await this.deleteFace({faceName:this.faceName}),this.showMergeModal=!1,this.$router.push({name:"facecontent",params:{faceName:t}})}catch(t){g.A.error(t)}finally{this.loadingCount--}},async handleMove(t,e){try{this.loadingCount++,await this.moveFilesToFace({oldFace:this.faceName,faceName:t,fileIdsToMove:e}),this.showMoveModal=!1}catch(t){g.A.error(t)}finally{this.loadingCount--}},async favoriteSelection(){try{this.loadingCount++,await this.toggleFavoriteForFiles({fileIds:this.selectedFileIds,favoriteState:!0})}catch(t){g.A.error(t)}finally{this.loadingCount--}},async unFavoriteSelection(){try{this.loadingCount++,await this.toggleFavoriteForFiles({fileIds:this.selectedFileIds,favoriteState:!1})}catch(t){g.A.error(t)}finally{this.loadingCount--}},async downloadSelection(){try{this.loadingCount++,await this.downloadFiles(this.selectedFileIds)}catch(t){g.A.error(t)}finally{this.loadingCount--}}}};var w=n(85072),k=n.n(w),N=n(97825),M=n.n(N),S=n(77659),B=n.n(S),I=n(55056),b=n.n(I),R=n(10540),D=n.n(R),E=n(41113),L=n.n(E),T=n(28393),$={};$.styleTagTransform=L(),$.setAttributes=b(),$.insert=B().bind(null,"head"),$.domAPI=M(),$.insertStyleElement=D();k()(T.A,$);T.A&&T.A.locals&&T.A.locals;const Y=(0,n(14486).A)(x,(function(){var t=this,e=t._self._c;return void 0!==t.face||t.loadingFiles||t.loadingFaces?t.errorFetchingFiles||t.errorFetchingFaces?e("NcEmptyContent",{scopedSlots:t._u([{key:"icon",fn:function(){return[e("AlertCircle")]},proxy:!0}])},[t._v("\n\t"+t._s(t.t("photos","An error occurred"))+"\n")]):e("div",{staticClass:"face"},[e("div",{staticClass:"face__header"},[e("div",{staticClass:"face__header__left"},[e("NcActions",[e("NcActionButton",{on:{click:function(e){return t.$router.push("/faces/")}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("ArrowLeft")]},proxy:!0}])},[t._v(t._s(t.t("photos","Back"))+"\n\t\t\t\t")])],1),t._v(" "),e("div",{staticClass:"face__header__title"},[void 0!==t.face?e("h2",{class:{"face-name":!0,"hidden-visually":t.face.basename.match(/^[0-9]+$/)}},[t._v("\n\t\t\t\t\t"+t._s(t.face.basename)+"\n\t\t\t\t")]):t._e()]),t._v(" "),t.loadingCount>0||t.loadingFaces?e("NcLoadingIcon"):t._e()],1),t._v(" "),void 0!==t.face?e("div",{staticClass:"face__header__actions"},[e("NcActions",[e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Rename person")},on:{click:function(e){t.showRenameModal=!0}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Pencil")]},proxy:!0}],null,!1,514409694)},[t._v("\n\t\t\t\t\t"+t._s(t.t("photos","Rename person"))+"\n\t\t\t\t")])],1),t._v(" "),e("NcActions",{attrs:{"force-menu":!0}},[Object.keys(t.faces).length>1?e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Merge with different person")},on:{click:function(e){t.showMergeModal=!0}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Merge")]},proxy:!0}],null,!1,3117189691)},[t._v("\n\t\t\t\t\t"+t._s(t.t("photos","Merge with different person"))+"\n\t\t\t\t")]):t._e(),t._v(" "),t.selectedFileIds.length?[e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Download selected files")},on:{click:t.downloadSelection}},[e("Download",{attrs:{slot:"icon"},slot:"icon"}),t._v("\n\t\t\t\t\t\t"+t._s(t.t("photos","Download selected photos"))+"\n\t\t\t\t\t")],1),t._v(" "),t.shouldFavoriteSelection?e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Mark selection as favorite")},on:{click:t.favoriteSelection}},[e("Star",{attrs:{slot:"icon"},slot:"icon"}),t._v("\n\t\t\t\t\t\t"+t._s(t.t("photos","Favorite"))+"\n\t\t\t\t\t")],1):e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Remove selection from favorites")},on:{click:t.unFavoriteSelection}},[e("Star",{attrs:{slot:"icon"},slot:"icon"}),t._v("\n\t\t\t\t\t\t"+t._s(t.t("photos","Remove from favorites"))+"\n\t\t\t\t\t")],1),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(e){t.showMoveModal=!0}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("AccountSwitch")]},proxy:!0}],null,!1,2937983280)},[t._v("\n\t\t\t\t\t\t"+t._s(t.n("photos","Move photo to a different person","Move photos to a different person",t.selectedFileIds.length))+"\n\t\t\t\t\t")]),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(e){return t.handleRemoveFilesFromFace(t.selectedFileIds)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Close")]},proxy:!0}],null,!1,1051939733)},[t._v("\n\t\t\t\t\t\t"+t._s(t.n("photos","Remove photo from person","Remove photos from person",t.selectedFileIds.length))+"\n\t\t\t\t\t")])]:t._e(),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":!0},on:{click:t.handleDeleteFace},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Close")]},proxy:!0}],null,!1,1051939733)},[t._v("\n\t\t\t\t\t"+t._s(t.t("photos","Remove person"))+"\n\t\t\t\t")])],2)],1):t._e()]),t._v(" "),void 0!==t.face?e("FilesListViewer",{staticClass:"face__photos",attrs:{"container-element":t.appContent,"file-ids":t.faceFileIds,loading:t.loadingFiles||t.loadingFaces},scopedSlots:t._u([{key:"default",fn:function(n){let{file:o,distance:a}=n;return e("File",{attrs:{file:t.files[o.id],"allow-selection":!0,selected:!0===t.selection[o.id],distance:a},on:{click:t.openViewer,"select-toggled":t.onFileSelectToggle}})}}],null,!1,2716306842)}):t._e(),t._v(" "),t.showRenameModal?e("NcDialog",{attrs:{name:t.t("photos","Rename person"),"close-on-click-outside":"",size:"small"},on:{closing:function(e){t.showRenameModal=!1}},scopedSlots:t._u([{key:"actions",fn:function(){return[e("NcButton",{attrs:{"aria-label":t.t("photos","Save."),type:"primary",disabled:t.$refs.nameInput&&""===t.$refs.nameInput.value.trim()},on:{click:function(e){return t.handleRenameFace(t.$refs.nameInput.value)}},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loadingCount?e("NcLoadingIcon"):e("Send")]},proxy:!0}],null,!1,564208483)},[t._v("\n\t\t\t\t"+t._s(t.t("photos","Save"))+"\n\t\t\t")])]},proxy:!0}],null,!1,4139225602)},[e("div",{staticClass:"rename-form"},[e("input",{directives:[{name:"focus",rawName:"v-focus"}],ref:"nameInput",attrs:{type:"text",name:"name",required:"",placeholder:t.t("photos","Name of this person")},domProps:{value:t.faceName},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleRenameFace(t.$refs.nameInput.value)}}})])]):t._e(),t._v(" "),t.showMergeModal?e("NcDialog",{attrs:{name:t.t("photos","Merge person"),"close-on-click-outside":"",size:"normal"},on:{closing:function(e){t.showMergeModal=!1}}},[e("FaceMergeForm",{attrs:{"first-face":t.faceName},on:{select:function(e){return t.handleMerge(e)}}})],1):t._e(),t._v(" "),t.showMoveModal?e("NcDialog",{attrs:{name:t.t("photos","Move to different person"),"close-on-click-outside":"",size:"normal"},on:{closing:function(e){t.showMoveModal=!1}}},[e("FaceMergeForm",{attrs:{"first-face":t.faceName},on:{select:function(e){return t.handleMove(e,t.selectedFileIds)}}})],1):t._e()],1):e("NcEmptyContent",{staticClass:"empty-content-with-illustration",scopedSlots:t._u([{key:"icon",fn:function(){return[e("AccountBoxMultipleOutline")]},proxy:!0}],null,!1,2861705255)},[t._v("\n\t"+t._s(t.t("photos","This person could not be found"))+"\n")])}),[],!1,null,"203e733c",null).exports}}]);
//# sourceMappingURL=photos-src_views_FaceContent_vue.js.map?v=9a6d801f8caa0acfe5e1

Zerion Mini Shell 1.0