Skip to content

Commit

Permalink
Merge pull request #2794 from nextcloud/chore/create-new-album
Browse files Browse the repository at this point in the history
chore: Move Create new album action out of menu
  • Loading branch information
artonge authored Feb 5, 2025
2 parents e6a2e36 + 7d9da1f commit e681945
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 25 deletions.
1 change: 0 additions & 1 deletion cypress/e2e/albumsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import { selectMedia } from './photosUtils'

export function createAnAlbumFromTimeline(albumName: string) {
cy.contains('Add').click()
cy.contains('Create new album').click()
cy.get('form [name="name"]').type(albumName)
cy.contains('Create album').click()
Expand Down
4 changes: 2 additions & 2 deletions js/photos-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-main.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-public.js.map

Large diffs are not rendered by default.

23 changes: 8 additions & 15 deletions src/views/Timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,15 @@
@refresh="resetFetchFilesState">
<div class="timeline__header__left">
<!-- TODO: UploadPicker -->
<NcActions v-if="selectedFileIds.length === 0"
ref="addActions"
:force-menu="true"
:menu-name="t('photos', 'Add')">
<NcButton v-if="selectedFileIds.length === 0"
ref="newAlbumButton"
:aria-label="t('photos', 'Create new album')"
@click="showAlbumCreationForm = true">
{{ t('photos', 'Create new album') }}
<template #icon>
<Plus />
<PlusBoxMultiple />
</template>
<NcActionButton :close-after-click="true"
:aria-label="t('photos', 'Create new album')"
@click="showAlbumCreationForm = true">
{{ t('photos', 'Create new album') }}
<template #icon>
<PlusBoxMultiple />
</template>
</NcActionButton>
</NcActions>
</NcButton>

<template v-else>
<NcButton :close-after-click="true"
Expand Down Expand Up @@ -114,7 +107,7 @@

<NcModal v-if="showAlbumCreationForm"
key="albumCreationForm"
:set-return-focus="$refs.addActions?.$refs.menuButton?.$el"
:set-return-focus="$refs.newAlbumButton?.$el"
@close="showAlbumCreationForm = false">
<h2 class="timeline__heading">
{{ t('photos', 'New album') }}
Expand Down

0 comments on commit e681945

Please sign in to comment.