photos/js/photos-src_mixins_FetchAlbu...

1 line
62 KiB
Plaintext

{"version":3,"file":"photos-src_mixins_FetchAlbumsMixin_js-src_components_Albums_AlbumForm_vue.js?v=3d3de89124bb1801b0b3","mappings":";qtCA6BA,SACCA,KAAM,mBAENC,KAHc,WAIb,MAAO,CACNC,oBAAqB,KACrBC,eAAe,EAEhB,EAEDC,OAAQ,CACPC,EAAAA,GAGKC,YAdQ,WAcM,0IACnB,EAAKC,cADc,4CAEnB,EAEDC,SAAU,EAAF,IACJC,EAAAA,EAAAA,IAAW,CACb,YAIFC,QAAS,EAAF,MACHC,EAAAA,EAAAA,IAAW,CACb,eAFK,IAKAJ,YALE,WAKY,wJACf,EAAKJ,cADU,iEAMlB,EAAKA,eAAgB,EACrB,EAAKD,oBAAsB,KAPT,UASGK,EAAAA,EAAAA,IAAY,WAAD,kBAAYK,EAAAA,EAAAA,aAAZ,aAAY,EAAkBC,IAA9B,WAA4C,EAAKC,gBAAgBC,QAT/E,OASZC,EATY,OAWlB,EAAKC,UAAU,CAAED,OAAAA,IAXC,kDAaa,OAA3B,eAAME,gBAAN,eAAgBC,QACnB,EAAKjB,oBAAsB,IAE3B,EAAKA,oBAAL,KAhBiB,yBAmBlB,EAAKC,eAAgB,EAnBH,8EAqBnB,0EC5ECiB,QAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,u5BAAw5B,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,mDAAmD,MAAQ,GAAG,SAAW,uQAAuQ,eAAiB,CAAC,0wDAA01D,WAAa,MAErqG,+ECJIH,QAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,83DAA+3D,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,oEAAoE,MAAQ,GAAG,SAAW,ijBAAijB,eAAiB,CAAC,mgGAAmlG,WAAa,MAEhsL,4CCPA,wlCC6GA,MC7GgL,ED6GhL,CACA,iBAEA,YACA,cACA,wBACA,SACA,oBACA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AAgBtC,YAAYT,EAAIU,GAAG,CAAC,CAACC,IAAI,OAAOC,GAAG,WAAW,MAAO,CAAEZ,EAAoB,iBAAEI,EAAG,SAASA,EAAG,eAAe,EAAEqB,OAAM,IAAO,MAAK,EAAM,YAAY,CAAEzB,EAAoB,iBAAE,CAACA,EAAImB,GAAG,iBAAiBnB,EAAIoB,GAAGpB,EAAIgB,EAAE,SAAU,wBAAwB,iBAAiB,CAAChB,EAAImB,GAAG,iBAAiBnB,EAAIoB,GAAGpB,EAAIgB,EAAE,SAAU,qBAAqB,kBAAkB,GAAGhB,EAAImB,GAAG,KAAKf,EAAG,WAAW,CAACG,MAAM,CAAC,KAAO,WAAW,aAAaP,EAAIgB,EAAE,SAAU,0BAA0B,SAAiC,KAAtBhB,EAAI8C,WAAWrD,IAAWwB,GAAG,CAAC,MAAQjB,EAAIgD,mBAAmB,CAAwB,KAAtBhD,EAAI8C,WAAWrD,GAAWW,EAAG,gBAAgB,CAACG,MAAM,CAAC,KAAO,QAAQ0B,KAAK,SAAS7B,EAAG,QAAQ,CAACG,MAAM,CAAC,KAAO,QAAQ0B,KAAK,UAAU,IAAI7B,EAAG,WAAW,CAACW,YAAY,2CAA2CE,GAAG,CAAC,MAAQjB,EAAIiD,2BAA2B,CAAC7C,EAAG,QAAQ,CAACG,MAAM,CAAC,KAAO,QAAQ0B,KAAK,SAASjC,EAAImB,GAAG,aAAanB,EAAIoB,GAAGpB,EAAIgB,EAAE,SAAU,0BAA0B,aAAa,IAAI,GAAGhB,EAAI+B,KAAK/B,EAAImB,GAAG,KAAKf,EAAG,MAAM,CAACW,YAAY,iBAAiB,CAACf,EAAIkD,GAAG,UAAU,KAAK,CAAC,cAAgBlD,EAAImD,yBAAyB,MAAM,GACl+I,IIWpB,EACA,KACA,WACA,MAI8B","sources":["webpack:///photos/src/mixins/FetchAlbumsMixin.js","webpack:///photos/src/components/Albums/AlbumForm.vue?vue&type=style&index=0&id=5bc188a2&lang=scss&scoped=true&","webpack:///photos/src/components/Albums/CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=55e75420&lang=scss&scoped=true&","webpack:///photos/src/components/Albums/AlbumForm.vue?vue&type=template&id=5bc188a2&scoped=true&","webpack:///photos/src/components/Albums/AlbumForm.vue","webpack:///photos/src/components/Albums/AlbumForm.vue?vue&type=script&lang=js&","webpack://photos/./src/components/Albums/AlbumForm.vue?295a","webpack://photos/./src/components/Albums/AlbumForm.vue?8dc6","webpack:///photos/src/components/Albums/CollaboratorsSelectionForm.vue?vue&type=template&id=55e75420&scoped=true&","webpack:///photos/src/components/Albums/CollaboratorsSelectionForm.vue","webpack:///photos/src/components/Albums/CollaboratorsSelectionForm.vue?vue&type=script&lang=js&","webpack://photos/./src/components/Albums/CollaboratorsSelectionForm.vue?ba77","webpack://photos/./src/components/Albums/CollaboratorsSelectionForm.vue?e975"],"sourcesContent":["/**\n * @copyright Copyright (c) 2022 Louis Chemineau <louis@chmn.me>\n *\n * @author Louis Chemineau <louis@chmn.me>\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\nimport { mapGetters, mapActions } from 'vuex'\n\nimport { getCurrentUser } from '@nextcloud/auth'\n\nimport AbortControllerMixin from './AbortControllerMixin.js'\nimport { fetchAlbums } from '../services/Albums.js'\n\nexport default {\n\tname: 'FetchAlbumsMixin',\n\n\tdata() {\n\t\treturn {\n\t\t\terrorFetchingAlbums: null,\n\t\t\tloadingAlbums: false,\n\t\t}\n\t},\n\n\tmixins: [\n\t\tAbortControllerMixin,\n\t],\n\n\tasync beforeMount() {\n\t\tthis.fetchAlbums()\n\t},\n\n\tcomputed: {\n\t\t...mapGetters([\n\t\t\t'albums',\n\t\t]),\n\t},\n\n\tmethods: {\n\t\t...mapActions([\n\t\t\t'addAlbums',\n\t\t]),\n\n\t\tasync fetchAlbums() {\n\t\t\tif (this.loadingAlbums) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tthis.loadingAlbums = true\n\t\t\t\tthis.errorFetchingAlbums = null\n\n\t\t\t\tconst albums = await fetchAlbums(`/photos/${getCurrentUser()?.uid}/albums`, this.abortController.signal)\n\n\t\t\t\tthis.addAlbums({ albums })\n\t\t\t} catch (error) {\n\t\t\t\tif (error.response?.status === 404) {\n\t\t\t\t\tthis.errorFetchingAlbums = 404\n\t\t\t\t} else {\n\t\t\t\t\tthis.errorFetchingAlbums = error\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tthis.loadingAlbums = false\n\t\t\t}\n\t\t},\n\t},\n}\n","// 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, \".album-form[data-v-5bc188a2]{display:flex;flex-direction:column;height:350px;padding:16px}.album-form .form-title[data-v-5bc188a2]{font-weight:bold}.album-form .form-subtitle[data-v-5bc188a2]{color:var(--color-text-lighter)}.album-form .form-inputs[data-v-5bc188a2]{flex-grow:1;justify-items:flex-end}.album-form .form-inputs input[data-v-5bc188a2]{width:100%}.album-form .form-inputs label[data-v-5bc188a2]{display:flex;margin-top:16px}.album-form .form-inputs label[data-v-5bc188a2] svg{margin-right:12px}.album-form .form-buttons[data-v-5bc188a2]{display:flex;justify-content:space-between}.album-form .form-buttons .left-buttons[data-v-5bc188a2],.album-form .form-buttons .right-buttons[data-v-5bc188a2]{display:flex}.album-form .form-buttons .right-buttons[data-v-5bc188a2]{justify-content:flex-end}.album-form .form-buttons button[data-v-5bc188a2]{margin-right:16px}.left-buttons[data-v-5bc188a2]{flex-grow:1}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/Albums/AlbumForm.vue\"],\"names\":[],\"mappings\":\"AAoPA,6BACC,YAAA,CACA,qBAAA,CACA,YAAA,CACA,YAAA,CAEA,yCACC,gBAAA,CAGD,4CACC,+BAAA,CAGD,0CACC,WAAA,CACA,sBAAA,CAEA,gDACC,UAAA,CAGD,gDACC,YAAA,CACA,eAAA,CAEA,qDACC,iBAAA,CAKH,2CACC,YAAA,CACA,6BAAA,CAEA,mHACC,YAAA,CAGD,0DACC,wBAAA,CAGD,kDACC,iBAAA,CAKH,+BACC,WAAA\",\"sourcesContent\":[\"$sizes: (\\\"400\\\": (\\\"count\\\": 3, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"700\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"1024\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1280\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1440\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"1600\\\": (\\\"count\\\": 6, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2048\\\": (\\\"count\\\": 7, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2560\\\": (\\\"count\\\": 8, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"3440\\\": (\\\"count\\\": 9, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"max\\\": (\\\"count\\\": 10, \\\"marginTop\\\": 88, \\\"marginW\\\": 88));\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n.album-form {\\n\\tdisplay: flex;\\n\\tflex-direction: column;\\n\\theight: 350px;\\n\\tpadding: 16px;\\n\\n\\t.form-title {\\n\\t\\tfont-weight: bold;\\n\\t}\\n\\n\\t.form-subtitle {\\n\\t\\tcolor: var(--color-text-lighter);\\n\\t}\\n\\n\\t.form-inputs {\\n\\t\\tflex-grow: 1;\\n\\t\\tjustify-items: flex-end;\\n\\n\\t\\tinput {\\n\\t\\t\\twidth: 100%;\\n\\t\\t}\\n\\n\\t\\tlabel {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tmargin-top: 16px;\\n\\n\\t\\t\\t::v-deep svg {\\n\\t\\t\\t\\tmargin-right: 12px;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t.form-buttons {\\n\\t\\tdisplay: flex;\\n\\t\\tjustify-content: space-between;\\n\\n\\t\\t.left-buttons, .right-buttons {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t}\\n\\n\\t\\t.right-buttons {\\n\\t\\t\\tjustify-content: flex-end;\\n\\t\\t}\\n\\n\\t\\tbutton {\\n\\t\\t\\tmargin-right: 16px;\\n\\t\\t}\\n\\t}\\n}\\n\\n.left-buttons {\\n\\tflex-grow: 1;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// 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, \".manage-collaborators[data-v-55e75420]{display:flex;flex-direction:column;padding:20px;height:500px}.manage-collaborators__title[data-v-55e75420]{font-weight:bold}.manage-collaborators__subtitle[data-v-55e75420]{color:var(--color-text-lighter)}.manage-collaborators__public-link-button[data-v-55e75420]{margin:4px 0}.manage-collaborators__form[data-v-55e75420]{margin-top:4px 0;display:flex;flex-direction:column}.manage-collaborators__form__input[data-v-55e75420]{position:relative;display:block}.manage-collaborators__form__input input[data-v-55e75420]{width:100%;padding-left:34px}.manage-collaborators__form__input .loading-icon[data-v-55e75420]{position:absolute;top:8px;right:8px}.manage-collaborators__form__list[data-v-55e75420]{padding:8px;height:500px;overflow:scroll}.manage-collaborators__form__list__result[data-v-55e75420]{padding:8px;border-radius:100px;box-sizing:border-box}.manage-collaborators__form__list__result[data-v-55e75420],.manage-collaborators__form__list__result *[data-v-55e75420]{cursor:pointer !important}.manage-collaborators__form__list__result[data-v-55e75420]:hover{background:var(--color-background-dark)}.manage-collaborators__form__list--empty[data-v-55e75420]{margin:100px 0}.manage-collaborators__selection[data-v-55e75420]{display:flex;flex-direction:column;margin-top:8px;flex-grow:1}.manage-collaborators__selection__item[data-v-55e75420]{border-radius:var(--border-radius-pill);padding:0 8px}.manage-collaborators__selection__item[data-v-55e75420]:hover{background:var(--color-background-dark)}.manage-collaborators .actions[data-v-55e75420]{display:flex;margin-top:8px}.manage-collaborators .actions__public-link[data-v-55e75420]{display:flex;align-items:center}.manage-collaborators .actions__public-link button[data-v-55e75420]{margin-left:8px}.manage-collaborators .actions__slot[data-v-55e75420]{flex-grow:1;display:flex;justify-content:flex-end;align-items:center}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/Albums/CollaboratorsSelectionForm.vue\"],\"names\":[],\"mappings\":\"AAyaA,uCACC,YAAA,CACA,qBAAA,CACA,YAAA,CACA,YAAA,CAEA,8CACC,gBAAA,CAGD,iDACC,+BAAA,CAGD,2DACC,YAAA,CAGD,6CACC,gBAAA,CACA,YAAA,CACA,qBAAA,CAEA,oDACC,iBAAA,CACA,aAAA,CAEA,0DACC,UAAA,CACA,iBAAA,CAGD,kEACC,iBAAA,CACA,OAAA,CACA,SAAA,CAIF,mDACC,WAAA,CACA,YAAA,CACA,eAAA,CACA,2DACC,WAAA,CACA,mBAAA,CACA,qBAAA,CAEA,wHACC,yBAAA,CAGD,iEACC,uCAAA,CAIF,0DACC,cAAA,CAKH,kDACC,YAAA,CACA,qBAAA,CACA,cAAA,CACA,WAAA,CAEA,wDACC,uCAAA,CACA,aAAA,CAEA,8DACC,uCAAA,CAKH,gDACC,YAAA,CACA,cAAA,CAEA,6DACC,YAAA,CACA,kBAAA,CAEA,oEACC,eAAA,CAIF,sDACC,WAAA,CACA,YAAA,CACA,wBAAA,CACA,kBAAA\",\"sourcesContent\":[\"$sizes: (\\\"400\\\": (\\\"count\\\": 3, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"700\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"1024\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1280\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1440\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"1600\\\": (\\\"count\\\": 6, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2048\\\": (\\\"count\\\": 7, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2560\\\": (\\\"count\\\": 8, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"3440\\\": (\\\"count\\\": 9, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"max\\\": (\\\"count\\\": 10, \\\"marginTop\\\": 88, \\\"marginW\\\": 88));\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n.manage-collaborators {\\n\\tdisplay: flex;\\n\\tflex-direction: column;\\n\\tpadding: 20px;\\n\\theight: 500px;\\n\\n\\t&__title {\\n\\t\\tfont-weight: bold;\\n\\t}\\n\\n\\t&__subtitle {\\n\\t\\tcolor: var(--color-text-lighter);\\n\\t}\\n\\n\\t&__public-link-button {\\n\\t\\tmargin: 4px 0;\\n\\t}\\n\\n\\t&__form {\\n\\t\\tmargin-top: 4px 0;\\n\\t\\tdisplay: flex;\\n\\t\\tflex-direction: column;\\n\\n\\t\\t&__input {\\n\\t\\t\\tposition: relative;\\n\\t\\t\\tdisplay: block;\\n\\n\\t\\t\\tinput {\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\tpadding-left: 34px;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.loading-icon {\\n\\t\\t\\t\\tposition: absolute;\\n\\t\\t\\t\\ttop: calc(36px / 2 - 20px / 2);\\n\\t\\t\\t\\tright: 8px;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t&__list {\\n\\t\\t\\tpadding: 8px;\\n\\t\\t\\theight: 500px;\\n\\t\\t\\toverflow: scroll;\\n\\t\\t\\t&__result {\\n\\t\\t\\t\\tpadding: 8px;\\n\\t\\t\\t\\tborder-radius: 100px;\\n\\t\\t\\t\\tbox-sizing: border-box;\\n\\n\\t\\t\\t\\t&, & * {\\n\\t\\t\\t\\t\\tcursor: pointer !important;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t&:hover {\\n\\t\\t\\t\\t\\tbackground: var(--color-background-dark);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t&--empty {\\n\\t\\t\\t\\tmargin: 100px 0;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t&__selection {\\n\\t\\tdisplay: flex;\\n\\t\\tflex-direction: column;\\n\\t\\tmargin-top: 8px;\\n\\t\\tflex-grow: 1;\\n\\n\\t\\t&__item {\\n\\t\\t\\tborder-radius: var(--border-radius-pill);\\n\\t\\t\\tpadding: 0 8px;\\n\\n\\t\\t\\t&:hover {\\n\\t\\t\\t\\tbackground: var(--color-background-dark);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t.actions {\\n\\t\\tdisplay: flex;\\n\\t\\tmargin-top: 8px;\\n\\n\\t\\t&__public-link {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\talign-items: center;\\n\\n\\t\\t\\tbutton {\\n\\t\\t\\t\\tmargin-left: 8px;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t&__slot {\\n\\t\\t\\tflex-grow: 1;\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tjustify-content: flex-end;\\n\\t\\t\\talign-items: center;\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.showCollaboratorView)?_c('form',{staticClass:\"album-form\",on:{\"submit\":function($event){$event.preventDefault();return _vm.submit.apply(null, arguments)}}},[_c('div',{staticClass:\"form-inputs\"},[_c('NcTextField',{ref:\"nameInput\",attrs:{\"value\":_vm.albumName,\"type\":\"text\",\"name\":\"name\",\"required\":true,\"autofocus\":\"true\",\"placeholder\":_vm.t('photos', 'Name of the album')},on:{\"update:value\":function($event){_vm.albumName=$event}}}),_vm._v(\" \"),_c('label',[_c('MapMarker'),_c('NcTextField',{attrs:{\"value\":_vm.albumLocation,\"name\":\"location\",\"type\":\"text\",\"placeholder\":_vm.t('photos', 'Location of the album')},on:{\"update:value\":function($event){_vm.albumLocation=$event}}})],1)],1),_vm._v(\" \"),_c('div',{staticClass:\"form-buttons\"},[_c('span',{staticClass:\"left-buttons\"},[(_vm.displayBackButton)?_c('NcButton',{attrs:{\"aria-label\":_vm.t('photos', 'Go back to the previous view.'),\"type\":\"tertiary\"},on:{\"click\":_vm.back}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Back'))+\"\\n\\t\\t\\t\")]):_vm._e()],1),_vm._v(\" \"),_c('span',{staticClass:\"right-buttons\"},[(_vm.sharingEnabled && !_vm.editMode)?_c('NcButton',{attrs:{\"aria-label\":_vm.t('photos', 'Go to the add collaborators view.'),\"type\":\"secondary\",\"disabled\":_vm.albumName.trim() === '' || _vm.loading},on:{\"click\":function($event){_vm.showCollaboratorView = true}},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('AccountMultiplePlus')]},proxy:true}],null,false,1531126728)},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Add collaborators'))+\"\\n\\t\\t\\t\")]):_vm._e(),_vm._v(\" \"),_c('NcButton',{attrs:{\"aria-label\":_vm.editMode ? _vm.t('photos', 'Save.') : _vm.t('photos', 'Create the album.'),\"type\":\"primary\",\"disabled\":_vm.albumName === '' || _vm.loading},on:{\"click\":function($event){return _vm.submit()}},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [(_vm.loading)?_c('NcLoadingIcon'):_c('Send')]},proxy:true}],null,false,3914512768)},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.editMode ? _vm.t('photos', 'Save') : _vm.t('photos', 'Create album'))+\"\\n\\t\\t\\t\")])],1)])]):_c('CollaboratorsSelectionForm',{attrs:{\"album-name\":_vm.albumName,\"allow-public-link\":false},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar collaborators = ref.collaborators;\nreturn [_c('span',{staticClass:\"left-buttons\"},[_c('NcButton',{attrs:{\"aria-label\":_vm.t('photos', 'Back to the new album form.'),\"type\":\"tertiary\"},on:{\"click\":function($event){_vm.showCollaboratorView = false}}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Back'))+\"\\n\\t\\t\\t\")])],1),_vm._v(\" \"),_c('span',{staticClass:\"right-buttons\"},[_c('NcButton',{attrs:{\"aria-label\":_vm.editMode ? _vm.t('photos', 'Save.') : _vm.t('photos', 'Create the album.'),\"type\":\"primary\",\"disabled\":_vm.albumName.trim() === '' || _vm.loading},on:{\"click\":function($event){return _vm.submit(collaborators)}},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [(_vm.loading)?_c('NcLoadingIcon'):_c('Send')]},proxy:true}],null,true)},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.editMode ? _vm.t('photos', 'Save') : _vm.t('photos', 'Create album'))+\"\\n\\t\\t\\t\")])],1)]}}])})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2022 Louis Chemineau <louis@chmn.me>\n -\n - @author Louis Chemineau <louis@chmn.me>\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<form v-if=\"!showCollaboratorView\" class=\"album-form\" @submit.prevent=\"submit\">\n\t\t<div class=\"form-inputs\">\n\t\t\t<NcTextField ref=\"nameInput\"\n\t\t\t\t:value.sync=\"albumName\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tname=\"name\"\n\t\t\t\t:required=\"true\"\n\t\t\t\tautofocus=\"true\"\n\t\t\t\t:placeholder=\"t('photos', 'Name of the album')\" />\n\t\t\t<label>\n\t\t\t\t<MapMarker /><NcTextField :value.sync=\"albumLocation\"\n\t\t\t\t\tname=\"location\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t:placeholder=\"t('photos', 'Location of the album')\" />\n\t\t\t</label>\n\t\t</div>\n\t\t<div class=\"form-buttons\">\n\t\t\t<span class=\"left-buttons\">\n\t\t\t\t<NcButton v-if=\"displayBackButton\"\n\t\t\t\t\t:aria-label=\"t('photos', 'Go back to the previous view.')\"\n\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\t@click=\"back\">\n\t\t\t\t\t{{ t('photos', 'Back') }}\n\t\t\t\t</NcButton>\n\t\t\t</span>\n\t\t\t<span class=\"right-buttons\">\n\t\t\t\t<NcButton v-if=\"sharingEnabled && !editMode\"\n\t\t\t\t\t:aria-label=\"t('photos', 'Go to the add collaborators view.')\"\n\t\t\t\t\ttype=\"secondary\"\n\t\t\t\t\t:disabled=\"albumName.trim() === '' || loading\"\n\t\t\t\t\t@click=\"showCollaboratorView = true\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AccountMultiplePlus />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ t('photos', 'Add collaborators') }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton :aria-label=\"editMode ? t('photos', 'Save.') : t('photos', 'Create the album.')\"\n\t\t\t\t\ttype=\"primary\"\n\t\t\t\t\t:disabled=\"albumName === '' || loading\"\n\t\t\t\t\t@click=\"submit()\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcLoadingIcon v-if=\"loading\" />\n\t\t\t\t\t\t<Send v-else />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ editMode ? t('photos', 'Save') : t('photos', 'Create album') }}\n\t\t\t\t</NcButton>\n\t\t\t</span>\n\t\t</div>\n\t</form>\n\t<CollaboratorsSelectionForm v-else\n\t\t:album-name=\"albumName\"\n\t\t:allow-public-link=\"false\">\n\t\t<template slot-scope=\"{collaborators}\">\n\t\t\t<span class=\"left-buttons\">\n\t\t\t\t<NcButton :aria-label=\"t('photos', 'Back to the new album form.')\"\n\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\t@click=\"showCollaboratorView = false\">\n\t\t\t\t\t{{ t('photos', 'Back') }}\n\t\t\t\t</NcButton>\n\t\t\t</span>\n\t\t\t<span class=\"right-buttons\">\n\t\t\t\t<NcButton :aria-label=\"editMode ? t('photos', 'Save.') : t('photos', 'Create the album.')\"\n\t\t\t\t\ttype=\"primary\"\n\t\t\t\t\t:disabled=\"albumName.trim() === '' || loading\"\n\t\t\t\t\t@click=\"submit(collaborators)\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcLoadingIcon v-if=\"loading\" />\n\t\t\t\t\t\t<Send v-else />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ editMode ? t('photos', 'Save') : t('photos', 'Create album') }}\n\t\t\t\t</NcButton>\n\t\t\t</span>\n\t\t</template>\n\t</CollaboratorsSelectionForm>\n</template>\n<script>\nimport { mapActions } from 'vuex'\nimport MapMarker from 'vue-material-design-icons/MapMarker'\nimport AccountMultiplePlus from 'vue-material-design-icons/AccountMultiplePlus'\nimport Send from 'vue-material-design-icons/Send'\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { NcButton, NcLoadingIcon, NcTextField } from '@nextcloud/vue'\nimport moment from '@nextcloud/moment'\n\nimport CollaboratorsSelectionForm from './CollaboratorsSelectionForm.vue'\n\nexport default {\n\tname: 'AlbumForm',\n\n\tcomponents: {\n\t\tMapMarker,\n\t\tAccountMultiplePlus,\n\t\tSend,\n\t\tNcButton,\n\t\tNcLoadingIcon,\n\t\tNcTextField,\n\t\tCollaboratorsSelectionForm,\n\t},\n\n\tprops: {\n\t\talbum: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t\tdisplayBackButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tshowCollaboratorView: false,\n\t\t\talbumName: '',\n\t\t\talbumLocation: '',\n\t\t\tloading: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * @return {boolean} Whether sharing is enabled.\n\t\t */\n\t\teditMode() {\n\t\t\treturn this.album !== null\n\t\t},\n\n\t\t/**\n\t\t * @return {boolean} Whether sharing is enabled.\n\t\t */\n\t\tsharingEnabled() {\n\t\t\treturn OC.Share !== undefined\n\t\t},\n\t},\n\n\tmounted() {\n\t\tif (this.editMode) {\n\t\t\tthis.albumName = this.album.basename\n\t\t\tthis.albumLocation = this.album.location\n\t\t}\n\n\t\tthis.$nextTick(() => {\n\t\t\tthis.$refs.nameInput.$el.getElementsByTagName('input')[0].focus()\n\t\t})\n\t},\n\n\tmethods: {\n\t\t...mapActions(['createAlbum', 'renameAlbum', 'updateAlbum']),\n\n\t\tsubmit(collaborators = []) {\n\t\t\tif (this.albumName === '' || this.loading) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (this.editMode) {\n\t\t\t\tthis.handleUpdateAlbum()\n\t\t\t} else {\n\t\t\t\tthis.handleCreateAlbum(collaborators)\n\t\t\t}\n\t\t},\n\n\t\tasync handleCreateAlbum(collaborators = []) {\n\t\t\ttry {\n\t\t\t\tthis.loading = true\n\t\t\t\tlet album = await this.createAlbum({\n\t\t\t\t\talbum: {\n\t\t\t\t\t\tbasename: this.albumName,\n\t\t\t\t\t\tfilename: `/photos/${getCurrentUser().uid}/albums/${this.albumName}`,\n\t\t\t\t\t\tnbItems: 0,\n\t\t\t\t\t\tlocation: this.albumLocation,\n\t\t\t\t\t\tlastPhoto: -1,\n\t\t\t\t\t\tdate: moment().format('MMMM YYYY'),\n\t\t\t\t\t\tcollaborators,\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t\t\tif (this.albumLocation !== '' || collaborators.length !== 0) {\n\t\t\t\t\talbum = await this.updateAlbum(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\talbumName: this.albumName,\n\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\tlocation: this.albumLocation,\n\t\t\t\t\t\t\t\tcollaborators,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tthis.$emit('done', { album })\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\tasync handleUpdateAlbum() {\n\t\t\ttry {\n\t\t\t\tthis.loading = true\n\n\t\t\t\tlet album = { ...this.album }\n\n\t\t\t\tif (this.album.basename !== this.albumName) {\n\t\t\t\t\talbum = await this.renameAlbum({ currentAlbumName: this.album.basename, newAlbumName: this.albumName })\n\t\t\t\t}\n\n\t\t\t\tif (this.album.location !== this.albumLocation) {\n\t\t\t\t\talbum.location = await this.updateAlbum({ albumName: this.albumName, properties: { location: this.albumLocation } })\n\t\t\t\t}\n\n\t\t\t\tthis.$emit('done', { album })\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\tback() {\n\t\t\tthis.$emit('back')\n\t\t},\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.album-form {\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 350px;\n\tpadding: 16px;\n\n\t.form-title {\n\t\tfont-weight: bold;\n\t}\n\n\t.form-subtitle {\n\t\tcolor: var(--color-text-lighter);\n\t}\n\n\t.form-inputs {\n\t\tflex-grow: 1;\n\t\tjustify-items: flex-end;\n\n\t\tinput {\n\t\t\twidth: 100%;\n\t\t}\n\n\t\tlabel {\n\t\t\tdisplay: flex;\n\t\t\tmargin-top: 16px;\n\n\t\t\t::v-deep svg {\n\t\t\t\tmargin-right: 12px;\n\t\t\t}\n\t\t}\n\t}\n\n\t.form-buttons {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\n\t\t.left-buttons, .right-buttons {\n\t\t\tdisplay: flex;\n\t\t}\n\n\t\t.right-buttons {\n\t\t\tjustify-content: flex-end;\n\t\t}\n\n\t\tbutton {\n\t\t\tmargin-right: 16px;\n\t\t}\n\t}\n}\n\n.left-buttons {\n\tflex-grow: 1;\n}\n</style>\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AlbumForm.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!./AlbumForm.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[0].rules[0].use[3]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AlbumForm.vue?vue&type=style&index=0&id=5bc188a2&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[0].rules[0].use[3]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AlbumForm.vue?vue&type=style&index=0&id=5bc188a2&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./AlbumForm.vue?vue&type=template&id=5bc188a2&scoped=true&\"\nimport script from \"./AlbumForm.vue?vue&type=script&lang=js&\"\nexport * from \"./AlbumForm.vue?vue&type=script&lang=js&\"\nimport style0 from \"./AlbumForm.vue?vue&type=style&index=0&id=5bc188a2&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 \"5bc188a2\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"manage-collaborators\"},[_c('h2',{staticClass:\"manage-collaborators__title\"},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('photos', 'Add collaborators'))+\"\\n\\t\")]),_vm._v(\" \"),_c('div',{staticClass:\"manage-collaborators__subtitle\"},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('photos', 'Add people or groups who can edit your album'))+\"\\n\\t\")]),_vm._v(\" \"),_c('form',{staticClass:\"manage-collaborators__form\",on:{\"submit\":function($event){$event.preventDefault();}}},[_c('NcPopover',{ref:\"popover\",attrs:{\"auto-size\":true,\"distance\":0}},[_c('label',{staticClass:\"manage-collaborators__form__input\",attrs:{\"slot\":\"trigger\"},slot:\"trigger\"},[_c('NcTextField',{attrs:{\"value\":_vm.searchText,\"autocomplete\":\"off\",\"type\":\"search\",\"name\":\"search\",\"aria-label\":_vm.t('photos', 'Search for collaborators'),\"aria-autocomplete\":\"list\",\"aria-controls\":(\"manage-collaborators__form__selection-\" + _vm.randomId + \" manage-collaborators__form__list-\" + _vm.randomId),\"placeholder\":_vm.t('photos', 'Search people or groups')},on:{\"update:value\":function($event){_vm.searchText=$event},\"input\":_vm.searchCollaborators}},[_c('Magnify',{attrs:{\"size\":16}})],1),_vm._v(\" \"),(_vm.loadingCollaborators)?_c('NcLoadingIcon'):_vm._e()],1),_vm._v(\" \"),(_vm.searchResults.length !== 0)?_c('ul',{staticClass:\"manage-collaborators__form__list\",attrs:{\"id\":(\"manage-collaborators__form__list-\" + _vm.randomId)}},_vm._l((_vm.searchResults),function(collaboratorKey){return _c('li',{key:collaboratorKey},[_c('a',[_c('NcListItemIcon',{staticClass:\"manage-collaborators__form__list__result\",attrs:{\"id\":_vm.availableCollaborators[collaboratorKey].id,\"title\":_vm.availableCollaborators[collaboratorKey].id,\"search\":_vm.searchText,\"user\":_vm.availableCollaborators[collaboratorKey].id,\"display-name\":_vm.availableCollaborators[collaboratorKey].label,\"aria-label\":_vm.t('photos', 'Add {collaboratorLabel} to the collaborators list', {collaboratorLabel: _vm.availableCollaborators[collaboratorKey].label})},on:{\"click\":function($event){return _vm.selectEntity(collaboratorKey)}}})],1)])}),0):_c('NcEmptyContent',{key:\"emptycontent\",staticClass:\"manage-collaborators__form__list--empty\",attrs:{\"title\":_vm.t('photos', 'No collaborators available')}},[_c('AccountGroup',{attrs:{\"slot\":\"icon\"},slot:\"icon\"})],1)],1)],1),_vm._v(\" \"),_c('ul',{staticClass:\"manage-collaborators__selection\"},_vm._l((_vm.listableSelectedCollaboratorsKeys),function(collaboratorKey){return _c('li',{key:collaboratorKey,staticClass:\"manage-collaborators__selection__item\"},[_c('NcListItemIcon',{attrs:{\"id\":_vm.availableCollaborators[collaboratorKey].id,\"display-name\":_vm.availableCollaborators[collaboratorKey].label,\"title\":_vm.availableCollaborators[collaboratorKey].id,\"user\":_vm.availableCollaborators[collaboratorKey].id}},[_c('NcButton',{attrs:{\"type\":\"tertiary\",\"aria-label\":_vm.t('photos', 'Remove {collaboratorLabel} from the collaborators list', {collaboratorLabel: _vm.availableCollaborators[collaboratorKey].label})},on:{\"click\":function($event){return _vm.unselectEntity(collaboratorKey)}}},[_c('Close',{attrs:{\"slot\":\"icon\",\"size\":20},slot:\"icon\"})],1)],1)],1)}),0),_vm._v(\" \"),_c('div',{staticClass:\"actions\"},[(_vm.allowPublicLink)?_c('div',{staticClass:\"actions__public-link\"},[(_vm.isPublicLinkSelected)?[_c('NcButton',{staticClass:\"manage-collaborators__public-link-button\",attrs:{\"aria-label\":_vm.t('photos', 'Copy the public link'),\"disabled\":_vm.publicLink.id === ''},on:{\"click\":_vm.copyPublicLink},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [(_vm.publicLinkCopied)?_c('Check'):_c('ContentCopy')]},proxy:true}],null,false,845538853)},[(_vm.publicLinkCopied)?[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Public link copied!'))+\"\\n\\t\\t\\t\\t\\t\")]:[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Copy public link'))+\"\\n\\t\\t\\t\\t\\t\")]],2),_vm._v(\" \"),_c('NcButton',{attrs:{\"type\":\"tertiary\",\"aria-label\":_vm.t('photos', 'Delete the public link'),\"disabled\":_vm.publicLink.id === ''},on:{\"click\":_vm.deletePublicLink}},[(_vm.publicLink.id === '')?_c('NcLoadingIcon',{attrs:{\"slot\":\"icon\"},slot:\"icon\"}):_c('Close',{attrs:{\"slot\":\"icon\"},slot:\"icon\"})],1)]:_c('NcButton',{staticClass:\"manage-collaborators__public-link-button\",on:{\"click\":_vm.createPublicLinkForAlbum}},[_c('Earth',{attrs:{\"slot\":\"icon\"},slot:\"icon\"}),_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Share via public link'))+\"\\n\\t\\t\\t\")],1)],2):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"actions__slot\"},[_vm._t(\"default\",null,{\"collaborators\":_vm.selectedCollaborators})],2)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2022 Louis Chemineau <louis@chmn.me>\n -\n - @author Louis Chemineau <louis@chmn.me>\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<div class=\"manage-collaborators\">\n\t\t<h2 class=\"manage-collaborators__title\">\n\t\t\t{{ t('photos', 'Add collaborators') }}\n\t\t</h2>\n\t\t<div class=\"manage-collaborators__subtitle\">\n\t\t\t{{ t('photos', 'Add people or groups who can edit your album') }}\n\t\t</div>\n\n\t\t<form class=\"manage-collaborators__form\" @submit.prevent>\n\t\t\t<NcPopover ref=\"popover\" :auto-size=\"true\" :distance=\"0\">\n\t\t\t\t<label slot=\"trigger\" class=\"manage-collaborators__form__input\">\n\t\t\t\t\t<NcTextField :value.sync=\"searchText\"\n\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\ttype=\"search\"\n\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t:aria-label=\"t('photos', 'Search for collaborators')\"\n\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t:aria-controls=\"`manage-collaborators__form__selection-${randomId} manage-collaborators__form__list-${randomId}`\"\n\t\t\t\t\t\t:placeholder=\"t('photos', 'Search people or groups')\"\n\t\t\t\t\t\t@input=\"searchCollaborators\">\n\t\t\t\t\t\t<Magnify :size=\"16\" />\n\t\t\t\t\t</NcTextField>\n\t\t\t\t\t<NcLoadingIcon v-if=\"loadingCollaborators\" />\n\t\t\t\t</label>\n\n\t\t\t\t<ul v-if=\"searchResults.length !== 0\" :id=\"`manage-collaborators__form__list-${randomId}`\" class=\"manage-collaborators__form__list\">\n\t\t\t\t\t<li v-for=\"collaboratorKey of searchResults\" :key=\"collaboratorKey\">\n\t\t\t\t\t\t<a>\n\t\t\t\t\t\t\t<NcListItemIcon :id=\"availableCollaborators[collaboratorKey].id\"\n\t\t\t\t\t\t\t\tclass=\"manage-collaborators__form__list__result\"\n\t\t\t\t\t\t\t\t:title=\"availableCollaborators[collaboratorKey].id\"\n\t\t\t\t\t\t\t\t:search=\"searchText\"\n\t\t\t\t\t\t\t\t:user=\"availableCollaborators[collaboratorKey].id\"\n\t\t\t\t\t\t\t\t:display-name=\"availableCollaborators[collaboratorKey].label\"\n\t\t\t\t\t\t\t\t:aria-label=\"t('photos', 'Add {collaboratorLabel} to the collaborators list', {collaboratorLabel: availableCollaborators[collaboratorKey].label})\"\n\t\t\t\t\t\t\t\t@click=\"selectEntity(collaboratorKey)\" />\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<NcEmptyContent v-else\n\t\t\t\t\tkey=\"emptycontent\"\n\t\t\t\t\tclass=\"manage-collaborators__form__list--empty\"\n\t\t\t\t\t:title=\"t('photos', 'No collaborators available')\">\n\t\t\t\t\t<AccountGroup slot=\"icon\" />\n\t\t\t\t</NcEmptyContent>\n\t\t\t</NcPopover>\n\t\t</form>\n\n\t\t<ul class=\"manage-collaborators__selection\">\n\t\t\t<li v-for=\"collaboratorKey of listableSelectedCollaboratorsKeys\"\n\t\t\t\t:key=\"collaboratorKey\"\n\t\t\t\tclass=\"manage-collaborators__selection__item\">\n\t\t\t\t<NcListItemIcon :id=\"availableCollaborators[collaboratorKey].id\"\n\t\t\t\t\t:display-name=\"availableCollaborators[collaboratorKey].label\"\n\t\t\t\t\t:title=\"availableCollaborators[collaboratorKey].id\"\n\t\t\t\t\t:user=\"availableCollaborators[collaboratorKey].id\">\n\t\t\t\t\t<NcButton type=\"tertiary\"\n\t\t\t\t\t\t:aria-label=\"t('photos', 'Remove {collaboratorLabel} from the collaborators list', {collaboratorLabel: availableCollaborators[collaboratorKey].label})\"\n\t\t\t\t\t\t@click=\"unselectEntity(collaboratorKey)\">\n\t\t\t\t\t\t<Close slot=\"icon\" :size=\"20\" />\n\t\t\t\t\t</NcButton>\n\t\t\t\t</NcListItemIcon>\n\t\t\t</li>\n\t\t</ul>\n\n\t\t<div class=\"actions\">\n\t\t\t<div v-if=\"allowPublicLink\" class=\"actions__public-link\">\n\t\t\t\t<template v-if=\"isPublicLinkSelected\">\n\t\t\t\t\t<NcButton class=\"manage-collaborators__public-link-button\"\n\t\t\t\t\t\t:aria-label=\"t('photos', 'Copy the public link')\"\n\t\t\t\t\t\t:disabled=\"publicLink.id === ''\"\n\t\t\t\t\t\t@click=\"copyPublicLink\">\n\t\t\t\t\t\t<template v-if=\"publicLinkCopied\">\n\t\t\t\t\t\t\t{{ t('photos', 'Public link copied!') }}\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t\t{{ t('photos', 'Copy public link') }}\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<Check v-if=\"publicLinkCopied\" />\n\t\t\t\t\t\t\t<ContentCopy v-else />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcButton>\n\t\t\t\t\t<NcButton type=\"tertiary\"\n\t\t\t\t\t\t:aria-label=\"t('photos', 'Delete the public link')\"\n\t\t\t\t\t\t:disabled=\"publicLink.id === ''\"\n\t\t\t\t\t\t@click=\"deletePublicLink\">\n\t\t\t\t\t\t<NcLoadingIcon v-if=\"publicLink.id === ''\" slot=\"icon\" />\n\t\t\t\t\t\t<Close v-else slot=\"icon\" />\n\t\t\t\t\t</NcButton>\n\t\t\t\t</template>\n\t\t\t\t<NcButton v-else\n\t\t\t\t\tclass=\"manage-collaborators__public-link-button\"\n\t\t\t\t\t@click=\"createPublicLinkForAlbum\">\n\t\t\t\t\t<Earth slot=\"icon\" />\n\t\t\t\t\t{{ t('photos', 'Share via public link') }}\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\n\t\t\t<div class=\"actions__slot\">\n\t\t\t\t<slot :collaborators=\"selectedCollaborators\" />\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport { mapActions } from 'vuex'\n\nimport Magnify from 'vue-material-design-icons/Magnify'\nimport Close from 'vue-material-design-icons/Close'\nimport Check from 'vue-material-design-icons/Check'\nimport ContentCopy from 'vue-material-design-icons/ContentCopy'\nimport AccountGroup from 'vue-material-design-icons/AccountGroup'\nimport Earth from 'vue-material-design-icons/Earth'\n\nimport axios from '@nextcloud/axios'\nimport { showError } from '@nextcloud/dialogs'\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { generateOcsUrl, generateUrl } from '@nextcloud/router'\nimport { NcButton, NcListItemIcon, NcLoadingIcon, NcPopover, NcTextField, NcEmptyContent } from '@nextcloud/vue'\nimport { Type } from '@nextcloud/sharing'\n\nimport logger from '../../services/logger.js'\nimport AbortControllerMixin from '../../mixins/AbortControllerMixin.js'\nimport { fetchAlbum } from '../../services/Albums.js'\n\n/**\n * @typedef {object} Collaborator\n * @property {string} id - The id of the collaborator.\n * @property {string} label - The label of the collaborator for display.\n * @property {Type.SHARE_TYPE_USER|Type.SHARE_TYPE_GROUP|Type.SHARE_TYPE_LINK} type - The type of the collaborator.\n */\n\nexport default {\n\tname: 'CollaboratorsSelectionForm',\n\n\tcomponents: {\n\t\tMagnify,\n\t\tClose,\n\t\tAccountGroup,\n\t\tContentCopy,\n\t\tCheck,\n\t\tEarth,\n\t\tNcLoadingIcon,\n\t\tNcButton,\n\t\tNcListItemIcon,\n\t\tNcTextField,\n\t\tNcPopover,\n\t\tNcEmptyContent,\n\t},\n\n\tmixins: [AbortControllerMixin],\n\n\tprops: {\n\t\talbumName: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** @type {import('vue').PropType<Collaborator[]>} */\n\t\tcollaborators: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\tallowPublicLink: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tsearchText: '',\n\t\t\t/** @type {Object<string, Collaborator>} */\n\t\t\tavailableCollaborators: {},\n\t\t\t/** @type {string[]} */\n\t\t\tselectedCollaboratorsKeys: [],\n\t\t\t/** @type {Collaborator[]} */\n\t\t\tcurrentSearchResults: [],\n\t\t\tloadingAlbum: false,\n\t\t\terrorFetchingAlbum: null,\n\t\t\tloadingCollaborators: false,\n\t\t\trandomId: Math.random().toString().substring(2, 10),\n\t\t\tpublicLinkCopied: false,\n\t\t\tconfig: {\n\t\t\t\tminSearchStringLength: parseInt(OC.config['sharing.minSearchStringLength'], 10) || 0,\n\t\t\t},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * @return {string[]}\n\t\t */\n\t\tsearchResults() {\n\t\t\treturn this.currentSearchResults\n\t\t\t\t.filter(({ id }) => id !== getCurrentUser().uid)\n\t\t\t\t.map(({ type, id }) => `${type}:${id}`)\n\t\t\t\t.filter(collaboratorKey => !this.selectedCollaboratorsKeys.includes(collaboratorKey))\n\t\t},\n\n\t\t/**\n\t\t * @return {string[]}\n\t\t */\n\t\tlistableSelectedCollaboratorsKeys() {\n\t\t\treturn this.selectedCollaboratorsKeys\n\t\t\t\t.filter(collaboratorKey => this.availableCollaborators[collaboratorKey].type !== Type.SHARE_TYPE_LINK)\n\t\t},\n\n\t\t/**\n\t\t * @return {Collaborator[]}\n\t\t */\n\t\tselectedCollaborators() {\n\t\t\treturn this.selectedCollaboratorsKeys\n\t\t\t\t.map((collaboratorKey) => this.availableCollaborators[collaboratorKey])\n\t\t},\n\n\t\t/**\n\t\t * @return {boolean}\n\t\t */\n\t\tisPublicLinkSelected() {\n\t\t\treturn this.selectedCollaboratorsKeys.includes(`${Type.SHARE_TYPE_LINK}`)\n\t\t},\n\n\t\t/** @return {Collaborator} */\n\t\tpublicLink() {\n\t\t\treturn this.availableCollaborators[Type.SHARE_TYPE_LINK]\n\t\t},\n\t},\n\n\twatch: {\n\t\tcollaborators(collaborators) {\n\t\t\tthis.populateCollaborators(collaborators)\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.searchCollaborators()\n\t\tthis.populateCollaborators(this.collaborators)\n\t},\n\n\tmethods: {\n\t\t...mapActions(['updateAlbum', 'addAlbums']),\n\n\t\t/**\n\t\t * Fetch possible collaborators.\n\t\t */\n\t\tasync searchCollaborators() {\n\t\t\ttry {\n\t\t\t\tif (this.searchText.length < this.config.minSearchStringLength) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.loadingCollaborators = true\n\t\t\t\tconst response = await axios.get(generateOcsUrl('core/autocomplete/get'), {\n\t\t\t\t\tparams: {\n\t\t\t\t\t\tsearch: this.searchText,\n\t\t\t\t\t\titemType: 'share-recipients',\n\t\t\t\t\t\tshareTypes: [\n\t\t\t\t\t\t\tType.SHARE_TYPE_USER,\n\t\t\t\t\t\t\tType.SHARE_TYPE_GROUP,\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t\t\tthis.currentSearchResults = response.data.ocs.data\n\t\t\t\t\t.map(collaborator => {\n\t\t\t\t\t\tswitch (collaborator.source) {\n\t\t\t\t\t\tcase 'users':\n\t\t\t\t\t\t\treturn { id: collaborator.id, label: collaborator.label, type: Type.SHARE_TYPE_USER }\n\t\t\t\t\t\tcase 'groups':\n\t\t\t\t\t\t\treturn { id: collaborator.id, label: collaborator.label, type: Type.SHARE_TYPE_GROUP }\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new Error(`Invalid collaborator source ${collaborator.source}`)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\n\t\t\t\tthis.availableCollaborators = {\n\t\t\t\t\t...this.availableCollaborators,\n\t\t\t\t\t...this.currentSearchResults.reduce(this.indexCollaborators, {}),\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tthis.errorFetchingCollaborators = error\n\t\t\t\tlogger.error(t('photos', 'Failed to fetch collaborators list.'), error)\n\t\t\t\tshowError(t('photos', 'Failed to fetch collaborators list.'))\n\t\t\t} finally {\n\t\t\t\tthis.loadingCollaborators = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Populate selectedCollaboratorsKeys and availableCollaborators.\n\t\t *\n\t\t * @param {Collaborator[]} collaborators\n\t\t */\n\t\tpopulateCollaborators(collaborators) {\n\t\t\tconst initialCollaborators = collaborators.reduce(this.indexCollaborators, {})\n\t\t\tthis.selectedCollaboratorsKeys = Object.keys(initialCollaborators)\n\t\t\tthis.availableCollaborators = {\n\t\t\t\t3: {\n\t\t\t\t\tid: '',\n\t\t\t\t\tlabel: t('photos', 'Public link'),\n\t\t\t\t\ttype: Type.SHARE_TYPE_LINK,\n\t\t\t\t},\n\t\t\t\t...this.availableCollaborators,\n\t\t\t\t...initialCollaborators,\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @param {Object<string, Collaborator>} collaborators - Index of collaborators\n\t\t * @param {Collaborator} collaborator - A collaborator\n\t\t */\n\t\tindexCollaborators(collaborators, collaborator) {\n\t\t\treturn { ...collaborators, [`${collaborator.type}${collaborator.type === Type.SHARE_TYPE_LINK ? '' : ':'}${collaborator.type === Type.SHARE_TYPE_LINK ? '' : collaborator.id}`]: collaborator }\n\t\t},\n\n\t\tasync createPublicLinkForAlbum() {\n\t\t\tthis.selectEntity(`${Type.SHARE_TYPE_LINK}`)\n\t\t\tawait this.updateAlbumCollaborators()\n\t\t\ttry {\n\t\t\t\tthis.loadingAlbum = true\n\t\t\t\tthis.errorFetchingAlbum = null\n\n\t\t\t\tconst album = await fetchAlbum(\n\t\t\t\t\t`/photos/${getCurrentUser().uid}/albums/${this.albumName}`,\n\t\t\t\t\t{ signal: this.abortController.signal }\n\t\t\t\t)\n\n\t\t\t\tthis.addAlbums({ albums: [album] })\n\t\t\t} catch (error) {\n\t\t\t\tif (error.response?.status === 404) {\n\t\t\t\t\tthis.errorFetchingAlbum = 404\n\t\t\t\t} else {\n\t\t\t\t\tthis.errorFetchingAlbum = error\n\t\t\t\t}\n\n\t\t\t\tlogger.error('[PublicAlbumContent] Error fetching album', { error })\n\t\t\t\tshowError(this.t('photos', 'Failed to fetch album.'))\n\t\t\t} finally {\n\t\t\t\tthis.loadingAlbum = false\n\t\t\t}\n\t\t},\n\n\t\tasync deletePublicLink() {\n\t\t\tthis.unselectEntity(`${Type.SHARE_TYPE_LINK}`)\n\t\t\tthis.availableCollaborators[3] = {\n\t\t\t\tid: '',\n\t\t\t\tlabel: t('photos', 'Public link'),\n\t\t\t\ttype: Type.SHARE_TYPE_LINK,\n\t\t\t}\n\t\t\tthis.publicLinkCopied = false\n\t\t\tawait this.updateAlbumCollaborators()\n\t\t},\n\n\t\tasync updateAlbumCollaborators() {\n\t\t\ttry {\n\t\t\t\tawait this.updateAlbum({\n\t\t\t\t\talbumName: this.albumName,\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tcollaborators: this.selectedCollaborators,\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t} catch (error) {\n\t\t\t\tlogger.error('[PublicAlbumContent] Error updating album', { error })\n\t\t\t\tshowError(this.t('photos', 'Failed to update album.'))\n\t\t\t} finally {\n\t\t\t\tthis.loadingAlbum = false\n\t\t\t}\n\t\t},\n\n\t\tasync copyPublicLink() {\n\t\t\tawait navigator.clipboard.writeText(`${window.location.protocol}//${window.location.host}${generateUrl(`apps/photos/public/${this.publicLink.id}`)}`)\n\t\t\tthis.publicLinkCopied = true\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.publicLinkCopied = false\n\t\t\t}, 10000)\n\t\t},\n\n\t\tselectEntity(collaboratorKey) {\n\t\t\tif (this.selectedCollaboratorsKeys.includes(collaboratorKey)) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.$refs.popover.$refs.popover.hide()\n\t\t\tthis.selectedCollaboratorsKeys.push(collaboratorKey)\n\t\t},\n\n\t\tunselectEntity(collaboratorKey) {\n\t\t\tconst index = this.selectedCollaboratorsKeys.indexOf(collaboratorKey)\n\n\t\t\tif (index === -1) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.selectedCollaboratorsKeys.splice(index, 1)\n\t\t},\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.manage-collaborators {\n\tdisplay: flex;\n\tflex-direction: column;\n\tpadding: 20px;\n\theight: 500px;\n\n\t&__title {\n\t\tfont-weight: bold;\n\t}\n\n\t&__subtitle {\n\t\tcolor: var(--color-text-lighter);\n\t}\n\n\t&__public-link-button {\n\t\tmargin: 4px 0;\n\t}\n\n\t&__form {\n\t\tmargin-top: 4px 0;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\t&__input {\n\t\t\tposition: relative;\n\t\t\tdisplay: block;\n\n\t\t\tinput {\n\t\t\t\twidth: 100%;\n\t\t\t\tpadding-left: 34px;\n\t\t\t}\n\n\t\t\t.loading-icon {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: calc(36px / 2 - 20px / 2);\n\t\t\t\tright: 8px;\n\t\t\t}\n\t\t}\n\n\t\t&__list {\n\t\t\tpadding: 8px;\n\t\t\theight: 500px;\n\t\t\toverflow: scroll;\n\t\t\t&__result {\n\t\t\t\tpadding: 8px;\n\t\t\t\tborder-radius: 100px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t&, & * {\n\t\t\t\t\tcursor: pointer !important;\n\t\t\t\t}\n\n\t\t\t\t&:hover {\n\t\t\t\t\tbackground: var(--color-background-dark);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&--empty {\n\t\t\t\tmargin: 100px 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__selection {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tmargin-top: 8px;\n\t\tflex-grow: 1;\n\n\t\t&__item {\n\t\t\tborder-radius: var(--border-radius-pill);\n\t\t\tpadding: 0 8px;\n\n\t\t\t&:hover {\n\t\t\t\tbackground: var(--color-background-dark);\n\t\t\t}\n\t\t}\n\t}\n\n\t.actions {\n\t\tdisplay: flex;\n\t\tmargin-top: 8px;\n\n\t\t&__public-link {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\n\t\t\tbutton {\n\t\t\t\tmargin-left: 8px;\n\t\t\t}\n\t\t}\n\n\t\t&__slot {\n\t\t\tflex-grow: 1;\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: flex-end;\n\t\t\talign-items: center;\n\t\t}\n\t}\n}\n</style>\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollaboratorsSelectionForm.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!./CollaboratorsSelectionForm.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[0].rules[0].use[3]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=55e75420&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[0].rules[0].use[3]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=55e75420&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./CollaboratorsSelectionForm.vue?vue&type=template&id=55e75420&scoped=true&\"\nimport script from \"./CollaboratorsSelectionForm.vue?vue&type=script&lang=js&\"\nexport * from \"./CollaboratorsSelectionForm.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=55e75420&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 \"55e75420\",\n null\n \n)\n\nexport default component.exports"],"names":["name","data","errorFetchingAlbums","loadingAlbums","mixins","AbortControllerMixin","beforeMount","fetchAlbums","computed","mapGetters","methods","mapActions","getCurrentUser","uid","abortController","signal","albums","addAlbums","response","status","___CSS_LOADER_EXPORT___","push","module","id","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_vm","this","_h","$createElement","_c","_self","showCollaboratorView","attrs","albumName","scopedSlots","_u","key","fn","ref","collaborators","staticClass","t","on","$event","_v","_s","editMode","trim","loading","submit","proxy","preventDefault","apply","arguments","albumLocation","back","_e","sharingEnabled","slot","searchText","randomId","searchCollaborators","searchResults","length","_l","collaboratorKey","availableCollaborators","label","collaboratorLabel","selectEntity","unselectEntity","publicLink","copyPublicLink","deletePublicLink","createPublicLinkForAlbum","_t","selectedCollaborators"],"sourceRoot":""}