photos/js/photos-src_views_Unassigned...

1 line
26 KiB
Plaintext

{"version":3,"file":"photos-src_views_UnassignedFaces_vue.js?v=e631d180596611a397fb","mappings":"gLAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,64CAA84C,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,2CAA2C,MAAQ,GAAG,SAAW,wiBAAwiB,eAAiB,CAAC,6wEAA6wE,WAAa,MAEv2I,S,gDCPA,I,oKC6HA,MC7HgL,ED6HhL,CACAC,KAAA,kBACAC,WAAA,CACAC,KAAA,UACAC,SAAA,IACAC,YAAA,IACAC,UAAA,UACAC,cAAA,IACAC,gBAAA,IACAC,KAAA,IACAC,cAAA,KACAC,eAAA,KACAC,UAAA,KACAC,eAAA,KACAC,QAAA,KACAC,cAAAA,EAAAA,GAGAC,WAAA,CACAC,MAAAC,GACAC,EAAAA,QAAAA,UAAA,IAAAD,EAAAD,SACA,GAGAG,OAAA,CACAC,EAAAA,EACAC,EAAAA,EACAC,EAAAA,GAGAC,KAAAA,KACA,CACAC,eAAA,EACAC,aAAA,EACAC,WAAAC,SAAAC,eAAA,qBAIAC,SAAA,KACAC,EAAAA,EAAAA,IAAA,CACA,QACA,oBAMAC,cACA,YAAAC,iBAAA,EACA,EAGAC,0BAEA,YAAAC,gBAAAC,MAAAC,GAAA,SAAAC,OAAAC,MAAAC,MAAAA,MAAAH,GAAAI,UACA,GAGAC,UACA,KAAAC,sBACA,EAEAC,QAAA,KACAC,EAAAA,EAAAA,IAAA,CACA,cACA,aACA,aACA,gBACA,yBACA,sBACA,oBAGAC,WAAAT,GACA,MAAAU,EAAA,KAAAP,MAAAH,GACAW,IAAAC,OAAAC,KAAA,CAEAC,KAAA,IAAAJ,EAAAK,SAAAC,MAAA,KAAAC,MAAA,GAAAC,KAAA,KACAC,KAAA,KAAAxB,YAAAyB,KAAApB,IAAA,IACA,KAAAG,MAAAH,GACAqB,SAAA,KAAAlB,MAAAH,GAAAqB,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sC,IAA3B+E,EAAI8B,UAAU9D,EAAK/C,IAAa,SAAW4G,GAAUf,GAAG,CAAC,MAAQd,EAAIjC,WAAW,iBAAiBiC,EAAI+B,qBAAqB,OAAO/B,EAAIU,GAAG,KAAMV,EAAItD,cAAewD,EAAG,UAAU,CAACkB,MAAM,CAAC,MAAQpB,EAAIY,EAAE,SAAU,6BAA6BE,GAAG,CAAC,MAAQ,SAASC,GAAQf,EAAItD,eAAgB,CAAK,IAAI,CAACwD,EAAG,gBAAgB,CAACkB,MAAM,CAAC,aAAa,MAAMN,GAAG,CAAC,OAAS,SAASC,GAAQ,OAAOf,EAAIgC,WAAWjB,EAAQf,EAAI5C,gBAAgB,MAAM,GAAG4C,EAAImB,MAAM,EACrlG,GACsB,IIUpB,EACA,KACA,WACA,MAI8B,O","sources":["webpack:///photos/src/views/UnassignedFaces.vue?vue&type=style&index=0&id=1c4b7fbf&prod&lang=scss&scoped=true&","webpack://photos/./src/views/UnassignedFaces.vue?51bd","webpack:///photos/src/views/UnassignedFaces.vue","webpack:///photos/src/views/UnassignedFaces.vue?vue&type=script&lang=js&","webpack://photos/./src/views/UnassignedFaces.vue?83b0","webpack://photos/./src/views/UnassignedFaces.vue?2685"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".face[data-v-1c4b7fbf]{display:flex;flex-direction:column}.face__empty[data-v-1c4b7fbf]{display:flex;flex-direction:column;align-items:center}.face__empty__button[data-v-1c4b7fbf]{margin-top:32px}.face__header[data-v-1c4b7fbf]{display:flex;min-height:60px;align-items:center;justify-content:space-between;position:-webkit-sticky;position:sticky;z-index:3;background:var(--color-main-background);padding:0 64px}@media only screen and (max-width: 1020px){.face__header[data-v-1c4b7fbf]{padding:0;padding-left:64px}}.face__header__left[data-v-1c4b7fbf]{height:100%;display:flex;align-items:center}.face__header__title[data-v-1c4b7fbf]{margin-left:10px}.face__header__title h2[data-v-1c4b7fbf]{margin-bottom:0}.face__header__loader[data-v-1c4b7fbf]{margin-left:32px}.face__header__actions[data-v-1c4b7fbf]{display:flex;align-items:center}.face__header__actions button[data-v-1c4b7fbf]{margin-left:16px}.face__photos[data-v-1c4b7fbf]{margin-top:16px;height:100%;min-height:0;padding:0 64px}@media only screen and (max-width: 1020px){.face__photos[data-v-1c4b7fbf]{padding:0}}.empty-content-with-illustration[data-v-1c4b7fbf] .empty-content__icon{width:200px;height:200px}.empty-content-with-illustration[data-v-1c4b7fbf] .empty-content__icon svg{width:200px;height:200px}.rename-form[data-v-1c4b7fbf]{display:flex;flex-direction:row;align-items:center;height:70px;padding:16px}.rename-form input[data-v-1c4b7fbf]{width:80%}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/mixins/FaceContent.scss\"],\"names\":[],\"mappings\":\"AAqBA,uBACC,YAAA,CACA,qBAAA,CAEA,8BACC,YAAA,CACA,qBAAA,CACA,kBAAA,CAEA,sCACC,eAAA,CAKF,+BACC,YAAA,CACA,eAAA,CACA,kBAAA,CACA,6BAAA,CACA,uBAAA,CAAA,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,SAAA\",\"sourcesContent\":[\"/**\\n * @copyright Copyright (c) 2023 Marcel Klehr <mklehr@gmx.net>\\n *\\n * @author Marcel Klehr <mklehr@gmx.net>\\n *\\n * @license AGPL-3.0-or-later\\n *\\n * This program is free software: you can redistribute it and/or modify\\n * it under the terms of the GNU Affero General Public License as\\n * published by the Free Software Foundation, either version 3 of the\\n * License, or (at your option) any later version.\\n *\\n * This program is distributed in the hope that it will be useful,\\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n * GNU Affero General Public License for more details.\\n *\\n * You should have received a copy of the GNU Affero General Public License\\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\\n *\\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: 80%;\\n\\t}\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.errorFetchingFiles)?_c('NcEmptyContent',{scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('AlertCircle')]},proxy:true}],null,false,794036927)},[_vm._v(\"\\n\\t\"+_vm._s(_vm.t('photos', 'An error occurred'))+\"\\n\")]):_c('div',{staticClass:\"face\"},[_c('div',{staticClass:\"face__header\"},[_c('div',{staticClass:\"face__header__left\"},[_c('NcActions',[_c('NcActionButton',{on:{\"click\":function($event){return _vm.$router.push('/faces/')}},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('ArrowLeft')]},proxy:true}])},[_vm._v(_vm._s(_vm.t('photos', 'Back'))+\"\\n\\t\\t\\t\\t\")])],1),_vm._v(\" \"),_c('div',{staticClass:\"face__header__title\"},[_c('h2',{class:{'face-name': true}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Unassigned faces'))+\"\\n\\t\\t\\t\\t\")])]),_vm._v(\" \"),(_vm.loadingCount > 0 || _vm.loadingFaces)?_c('NcLoadingIcon'):_vm._e()],1),_vm._v(\" \"),_c('div',{staticClass:\"face__header__actions\"},[_c('NcActions',{attrs:{\"force-menu\":true}},[(_vm.selectedFileIds.length)?[_c('NcActionButton',{attrs:{\"close-after-click\":true,\"aria-label\":_vm.t('photos', 'Download selected files')},on:{\"click\":_vm.downloadSelection}},[_c('Download',{attrs:{\"slot\":\"icon\"},slot:\"icon\"}),_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Download selected photos'))+\"\\n\\t\\t\\t\\t\\t\")],1),_vm._v(\" \"),(_vm.shouldFavoriteSelection)?_c('NcActionButton',{attrs:{\"close-after-click\":true,\"aria-label\":_vm.t('photos', 'Mark selection as favorite')},on:{\"click\":_vm.favoriteSelection}},[_c('Star',{attrs:{\"slot\":\"icon\"},slot:\"icon\"}),_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Favorite'))+\"\\n\\t\\t\\t\\t\\t\")],1):_c('NcActionButton',{attrs:{\"close-after-click\":true,\"aria-label\":_vm.t('photos', 'Remove selection from favorites')},on:{\"click\":_vm.unFavoriteSelection}},[_c('Star',{attrs:{\"slot\":\"icon\"},slot:\"icon\"}),_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Remove from favorites'))+\"\\n\\t\\t\\t\\t\\t\")],1),_vm._v(\" \"),_c('NcActionButton',{attrs:{\"close-after-click\":true},on:{\"click\":function($event){_vm.showMoveModal = true}},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('AccountSwitch')]},proxy:true}],null,false,2937983280)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.n('photos', 'Move photo to a different person', 'Move photos to a different person', _vm.selectedFileIds.length))+\"\\n\\t\\t\\t\\t\\t\")])]:_vm._e()],2)],1)]),_vm._v(\" \"),_c('FilesListViewer',{staticClass:\"face__photos\",attrs:{\"container-element\":_vm.appContent,\"file-ids\":_vm.faceFileIds,\"loading\":_vm.loadingFiles || _vm.loadingFaces},scopedSlots:_vm._u([{key:\"default\",fn:function({file, distance}){return _c('File',{attrs:{\"file\":_vm.files[file.id],\"allow-selection\":true,\"selected\":_vm.selection[file.id] === true,\"distance\":distance},on:{\"click\":_vm.openViewer,\"select-toggled\":_vm.onFileSelectToggle}})}}])}),_vm._v(\" \"),(_vm.showMoveModal)?_c('NcModal',{attrs:{\"title\":_vm.t('photos', 'Move to different person')},on:{\"close\":function($event){_vm.showMoveModal = false}}},[_c('FaceMergeForm',{attrs:{\"first-face\":'-1'},on:{\"select\":function($event){return _vm.handleMove($event, _vm.selectedFileIds)}}})],1):_vm._e()],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2022 Louis Chemineau <louis@chmn.me>\n - @copyright Copyright (c) 2022 Marcel Klehr <mklehr@gmx.net>\n -\n - @author Louis Chemineau <louis@chmn.me>\n - @author Marcel Klehr <mklehr@gmx.net>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n<template>\n\t<!-- Errors handlers-->\n\t<NcEmptyContent v-if=\"errorFetchingFiles\">\n\t\t<template #icon>\n\t\t\t<AlertCircle />\n\t\t</template>\n\t\t{{ t('photos', 'An error occurred') }}\n\t</NcEmptyContent>\n\n\t<div v-else class=\"face\">\n\t\t<div class=\"face__header\">\n\t\t\t<div class=\"face__header__left\">\n\t\t\t\t<NcActions>\n\t\t\t\t\t<NcActionButton @click=\"$router.push('/faces/')\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<ArrowLeft />\n\t\t\t\t\t\t</template>{{ t('photos', 'Back') }}\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t</NcActions>\n\t\t\t\t<div class=\"face__header__title\">\n\t\t\t\t\t<h2 :class=\"{'face-name': true}\">\n\t\t\t\t\t\t{{ t('photos', 'Unassigned faces') }}\n\t\t\t\t\t</h2>\n\t\t\t\t</div>\n\n\t\t\t\t<NcLoadingIcon v-if=\"loadingCount > 0 || loadingFaces\" />\n\t\t\t</div>\n\t\t\t<div class=\"face__header__actions\">\n\t\t\t\t<NcActions :force-menu=\"true\">\n\t\t\t\t\t<template v-if=\"selectedFileIds.length\">\n\t\t\t\t\t\t<NcActionButton :close-after-click=\"true\"\n\t\t\t\t\t\t\t:aria-label=\"t('photos', 'Download selected files')\"\n\t\t\t\t\t\t\t@click=\"downloadSelection\">\n\t\t\t\t\t\t\t<Download slot=\"icon\" />\n\t\t\t\t\t\t\t{{ t('photos', 'Download selected photos') }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionButton v-if=\"shouldFavoriteSelection\"\n\t\t\t\t\t\t\t:close-after-click=\"true\"\n\t\t\t\t\t\t\t:aria-label=\"t('photos', 'Mark selection as favorite')\"\n\t\t\t\t\t\t\t@click=\"favoriteSelection\">\n\t\t\t\t\t\t\t<Star slot=\"icon\" />\n\t\t\t\t\t\t\t{{ t('photos', 'Favorite') }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionButton v-else\n\t\t\t\t\t\t\t:close-after-click=\"true\"\n\t\t\t\t\t\t\t:aria-label=\"t('photos', 'Remove selection from favorites')\"\n\t\t\t\t\t\t\t@click=\"unFavoriteSelection\">\n\t\t\t\t\t\t\t<Star slot=\"icon\" />\n\t\t\t\t\t\t\t{{ t('photos', 'Remove from favorites') }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionButton :close-after-click=\"true\"\n\t\t\t\t\t\t\t@click=\"showMoveModal = true\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<AccountSwitch />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ n('photos', 'Move photo to a different person', 'Move photos to a different person', selectedFileIds.length) }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t</template>\n\t\t\t\t</NcActions>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<FilesListViewer class=\"face__photos\"\n\t\t\t:container-element=\"appContent\"\n\t\t\t:file-ids=\"faceFileIds\"\n\t\t\t:loading=\"loadingFiles || loadingFaces\">\n\t\t\t<File slot-scope=\"{file, distance}\"\n\t\t\t\t:file=\"files[file.id]\"\n\t\t\t\t:allow-selection=\"true\"\n\t\t\t\t:selected=\"selection[file.id] === true\"\n\t\t\t\t:distance=\"distance\"\n\t\t\t\t@click=\"openViewer\"\n\t\t\t\t@select-toggled=\"onFileSelectToggle\" />\n\t\t</FilesListViewer>\n\n\t\t<NcModal v-if=\"showMoveModal\"\n\t\t\t:title=\"t('photos', 'Move to different person')\"\n\t\t\t@close=\"showMoveModal = false\">\n\t\t\t<FaceMergeForm :first-face=\"'-1'\" @select=\"handleMove($event, selectedFileIds)\" />\n\t\t</NcModal>\n\t</div>\n</template>\n\n<script>\nimport { mapActions, mapGetters } from 'vuex'\nimport AlertCircle from 'vue-material-design-icons/AlertCircle.vue'\nimport Star from 'vue-material-design-icons/Star.vue'\nimport Download from 'vue-material-design-icons/Download.vue'\nimport ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'\nimport AccountSwitch from 'vue-material-design-icons/AccountSwitch.vue'\n\nimport { NcActions, NcActionButton, NcModal, NcEmptyContent, NcLoadingIcon } from '@nextcloud/vue'\n\nimport FetchFilesMixin from '../mixins/FetchFilesMixin.js'\nimport FilesSelectionMixin from '../mixins/FilesSelectionMixin.js'\nimport FilesListViewer from '../components/FilesListViewer.vue'\nimport File from '../components/File.vue'\nimport logger from '../services/logger.js'\nimport FetchFacesMixin from '../mixins/FetchFacesMixin.js'\nimport Vue from 'vue'\nimport FaceMergeForm from '../components/Faces/FaceMergeForm.vue'\n\nexport default {\n\tname: 'UnassignedFaces',\n\tcomponents: {\n\t\tStar,\n\t\tDownload,\n\t\tAlertCircle,\n\t\tArrowLeft,\n\t\tFaceMergeForm,\n\t\tFilesListViewer,\n\t\tFile,\n\t\tNcLoadingIcon,\n\t\tNcEmptyContent,\n\t\tNcActions,\n\t\tNcActionButton,\n\t\tNcModal,\n\t\tAccountSwitch,\n\t},\n\n\tdirectives: {\n\t\tfocus(el) {\n\t\t\tVue.nextTick(() => el.focus())\n\t\t},\n\t},\n\n\tmixins: [\n\t\tFetchFacesMixin,\n\t\tFetchFilesMixin,\n\t\tFilesSelectionMixin,\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tshowMoveModal: false,\n\t\t\tloadingCount: 0,\n\t\t\tappContent: document.getElementById('app-content-vue'),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t...mapGetters([\n\t\t\t'files',\n\t\t\t'unassignedFiles',\n\t\t]),\n\n\t\t/**\n\t\t * @return {string[]} The list of files for the current faceName.\n\t\t */\n\t\tfaceFileIds() {\n\t\t\treturn this.unassignedFiles || []\n\t\t},\n\n\t\t/** @type {boolean} */\n\t\tshouldFavoriteSelection() {\n\t\t\t// Favorite all selection if at least one file is not on the favorites.\n\t\t\treturn this.selectedFileIds.some((fileId) => this.$store.state.files.files[fileId].favorite === 0)\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.fetchUnassignedFaces()\n\t},\n\n\tmethods: {\n\t\t...mapActions([\n\t\t\t'appendFiles',\n\t\t\t'deleteFace',\n\t\t\t'renameFace',\n\t\t\t'downloadFiles',\n\t\t\t'toggleFavoriteForFiles',\n\t\t\t'removeFilesFromFace',\n\t\t\t'moveFilesToFace',\n\t\t]),\n\n\t\topenViewer(fileId) {\n\t\t\tconst file = this.files[fileId]\n\t\t\tOCA.Viewer.open({\n\t\t\t\t// remove /username/files/ from the start\n\t\t\t\tpath: '/' + file.filename.split('/').slice(3).join('/'),\n\t\t\t\tlist: this.faceFileIds.map(fileId => ({\n\t\t\t\t\t...this.files[fileId],\n\t\t\t\t\tbasename: this.files[fileId].basename.split('-').slice(1).join('-'),\n\t\t\t\t})).filter(file => !file.sectionHeader),\n\t\t\t\tloadMore: file.loadMore ? async () => await file.loadMore(true) : () => [],\n\t\t\t\tcanLoop: file.canLoop,\n\t\t\t})\n\t\t},\n\n\t\tasync handleMove(faceName, fileIds) {\n\t\t\ttry {\n\t\t\t\tthis.loadingCount++\n\t\t\t\tawait this.moveFilesToFace({ oldFace: null, faceName, fileIdsToMove: fileIds })\n\t\t\t\tthis.showMoveModal = false\n\t\t\t} catch (error) {\n\t\t\t\tlogger.error(error)\n\t\t\t} finally {\n\t\t\t\tthis.loadingCount--\n\t\t\t}\n\t\t},\n\n\t\tasync favoriteSelection() {\n\t\t\ttry {\n\t\t\t\tthis.loadingCount++\n\t\t\t\tawait this.toggleFavoriteForFiles({ fileIds: this.selectedFileIds, favoriteState: true })\n\t\t\t} catch (error) {\n\t\t\t\tlogger.error(error)\n\t\t\t} finally {\n\t\t\t\tthis.loadingCount--\n\t\t\t}\n\t\t},\n\n\t\tasync unFavoriteSelection() {\n\t\t\ttry {\n\t\t\t\tthis.loadingCount++\n\t\t\t\tawait this.toggleFavoriteForFiles({ fileIds: this.selectedFileIds, favoriteState: false })\n\t\t\t} catch (error) {\n\t\t\t\tlogger.error(error)\n\t\t\t} finally {\n\t\t\t\tthis.loadingCount--\n\t\t\t}\n\t\t},\n\n\t\tasync downloadSelection() {\n\t\t\ttry {\n\t\t\t\tthis.loadingCount++\n\t\t\t\tawait this.downloadFiles(this.selectedFileIds)\n\t\t\t} catch (error) {\n\t\t\t\tlogger.error(error)\n\t\t\t} finally {\n\t\t\t\tthis.loadingCount--\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n@import '../mixins/FaceContent';\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UnassignedFaces.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UnassignedFaces.vue?vue&type=script&lang=js&\"","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2.use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UnassignedFaces.vue?vue&type=style&index=0&id=1c4b7fbf&prod&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2.use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UnassignedFaces.vue?vue&type=style&index=0&id=1c4b7fbf&prod&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./UnassignedFaces.vue?vue&type=template&id=1c4b7fbf&scoped=true&\"\nimport script from \"./UnassignedFaces.vue?vue&type=script&lang=js&\"\nexport * from \"./UnassignedFaces.vue?vue&type=script&lang=js&\"\nimport style0 from \"./UnassignedFaces.vue?vue&type=style&index=0&id=1c4b7fbf&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1c4b7fbf\",\n null\n \n)\n\nexport default component.exports"],"names":["___CSS_LOADER_EXPORT___","push","module","id","name","components","Star","Download","AlertCircle","ArrowLeft","FaceMergeForm","FilesListViewer","File","NcLoadingIcon","NcEmptyContent","NcActions","NcActionButton","NcModal","AccountSwitch","directives","focus","el","Vue","mixins","FetchFacesMixin","FetchFilesMixin","FilesSelectionMixin","data","showMoveModal","loadingCount","appContent","document","getElementById","computed","mapGetters","faceFileIds","unassignedFiles","shouldFavoriteSelection","selectedFileIds","some","fileId","$store","state","files","favorite","mounted","fetchUnassignedFaces","methods","mapActions","openViewer","file","OCA","Viewer","open","path","filename","split","slice","join","list","map","basename","filter","sectionHeader","loadMore","canLoop","faceName","fileIds","moveFilesToFace","oldFace","fileIdsToMove","error","logger","toggleFavoriteForFiles","favoriteState","downloadFiles","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_vm","this","_c","_self","errorFetchingFiles","scopedSlots","_u","key","fn","proxy","_v","_s","t","staticClass","on","$event","$router","class","loadingFaces","_e","attrs","length","downloadSelection","slot","favoriteSelection","unFavoriteSelection","n","loadingFiles","_ref","distance","selection","onFileSelectToggle","handleMove"],"sourceRoot":""}