diff --git a/src/components/modal/AlbumCollaborators.vue b/src/components/modal/AlbumCollaborators.vue index 26f02799..b1593c6b 100644 --- a/src/components/modal/AlbumCollaborators.vue +++ b/src/components/modal/AlbumCollaborators.vue @@ -53,7 +53,6 @@ :user="availableCollaborators[collaboratorKey].id" :display-name="availableCollaborators[collaboratorKey].label" :aria-label="t('photos', 'Add {collaboratorLabel} to the collaborators list', {collaboratorLabel: availableCollaborators[collaboratorKey].label})" - tabindex="0" @click="selectEntity(collaboratorKey)" /> diff --git a/src/components/modal/AlbumCreateModal.vue b/src/components/modal/AlbumCreateModal.vue index 7b3f5927..f76be8d5 100644 --- a/src/components/modal/AlbumCreateModal.vue +++ b/src/components/modal/AlbumCreateModal.vue @@ -46,11 +46,7 @@ export default class AlbumCreateModal extends Mixins(GlobalMixin) { public async open(edit: boolean) { if (edit) { try { - const album: any = await dav.getAlbum(this.$route.params.user, this.$route.params.name); - this.album = { - ...album.data, - ...album.data.props, - }; + this.album = await dav.getAlbum(this.$route.params.user, this.$route.params.name); } catch (e) { console.error(e); showError(this.t('photos', 'Could not load the selected album')); diff --git a/src/components/modal/AlbumForm.vue b/src/components/modal/AlbumForm.vue index 95f7739a..e9a7a99e 100644 --- a/src/components/modal/AlbumForm.vue +++ b/src/components/modal/AlbumForm.vue @@ -46,7 +46,7 @@ - + + + + + + + + + + \ No newline at end of file diff --git a/src/components/modal/Modal.vue b/src/components/modal/Modal.vue index 2c83083e..f48cf951 100644 --- a/src/components/modal/Modal.vue +++ b/src/components/modal/Modal.vue @@ -40,6 +40,8 @@ export default class Modal extends Vue { .head { font-weight: 500; + font-size: 1.15em; + margin-bottom: 5px; } :deep .buttons { diff --git a/src/components/top-matter/AlbumTopMatter.vue b/src/components/top-matter/AlbumTopMatter.vue index c69a2ebe..8e602b19 100644 --- a/src/components/top-matter/AlbumTopMatter.vue +++ b/src/components/top-matter/AlbumTopMatter.vue @@ -16,6 +16,11 @@ {{ t('memories', 'Create new album') }} + + {{ t('memories', 'Share album') }} + + {{ t('memories', 'Edit album details') }} @@ -31,6 +36,7 @@ + @@ -41,12 +47,14 @@ import UserConfig from "../../mixins/UserConfig"; import AlbumCreateModal from '../modal/AlbumCreateModal.vue'; import AlbumDeleteModal from '../modal/AlbumDeleteModal.vue'; +import AlbumShareModal from '../modal/AlbumShareModal.vue'; import { NcActions, NcActionButton, NcActionCheckbox } from '@nextcloud/vue'; import BackIcon from 'vue-material-design-icons/ArrowLeft.vue'; import EditIcon from 'vue-material-design-icons/Pencil.vue'; import DeleteIcon from 'vue-material-design-icons/Close.vue'; import PlusIcon from 'vue-material-design-icons/Plus.vue'; +import ShareIcon from 'vue-material-design-icons/ShareVariant.vue'; @Component({ components: { @@ -56,11 +64,13 @@ import PlusIcon from 'vue-material-design-icons/Plus.vue'; AlbumCreateModal, AlbumDeleteModal, + AlbumShareModal, BackIcon, EditIcon, DeleteIcon, PlusIcon, + ShareIcon, }, }) export default class AlbumTopMatter extends Mixins(GlobalMixin, UserConfig) { diff --git a/src/services/DavRequests.ts b/src/services/DavRequests.ts index 370518f1..fd5f07b1 100644 --- a/src/services/DavRequests.ts +++ b/src/services/DavRequests.ts @@ -730,10 +730,19 @@ export async function getAlbum(user: string, name: string, extraProps = {}) { ${extraProps} `; - return await client.stat(`/photos/${user}/albums/${name}`, { + let album = await client.stat(`/photos/${user}/albums/${name}`, { data: req, details: true, - }) + }) as any; + + // Post processing + album = { + ...album.data, + ...album.data.props, + }; + const c = album?.collaborators?.collaborator; + album.collaborators = c ? (Array.isArray(c) ? c : [c]) : []; + return album; } /** Rename an album */