Skip to content

Commit e681945

Browse files
authored
Merge pull request #2794 from nextcloud/chore/create-new-album
chore: Move Create new album action out of menu
2 parents e6a2e36 + 7d9da1f commit e681945

8 files changed

+17
-25
lines changed

cypress/e2e/albumsUtils.ts

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import { selectMedia } from './photosUtils'
77

88
export function createAnAlbumFromTimeline(albumName: string) {
9-
cy.contains('Add').click()
109
cy.contains('Create new album').click()
1110
cy.get('form [name="name"]').type(albumName)
1211
cy.contains('Create album').click()

js/photos-main.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/photos-main.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/photos-node_modules_vue-material-design-icons_ArrowLeft_vue-src_views_Timeline_vue.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/photos-node_modules_vue-material-design-icons_ArrowLeft_vue-src_views_Timeline_vue.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/photos-public.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/photos-public.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/views/Timeline.vue

+8-15
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,15 @@
2525
@refresh="resetFetchFilesState">
2626
<div class="timeline__header__left">
2727
<!-- TODO: UploadPicker -->
28-
<NcActions v-if="selectedFileIds.length === 0"
29-
ref="addActions"
30-
:force-menu="true"
31-
:menu-name="t('photos', 'Add')">
28+
<NcButton v-if="selectedFileIds.length === 0"
29+
ref="newAlbumButton"
30+
:aria-label="t('photos', 'Create new album')"
31+
@click="showAlbumCreationForm = true">
32+
{{ t('photos', 'Create new album') }}
3233
<template #icon>
33-
<Plus />
34+
<PlusBoxMultiple />
3435
</template>
35-
<NcActionButton :close-after-click="true"
36-
:aria-label="t('photos', 'Create new album')"
37-
@click="showAlbumCreationForm = true">
38-
{{ t('photos', 'Create new album') }}
39-
<template #icon>
40-
<PlusBoxMultiple />
41-
</template>
42-
</NcActionButton>
43-
</NcActions>
36+
</NcButton>
4437

4538
<template v-else>
4639
<NcButton :close-after-click="true"
@@ -114,7 +107,7 @@
114107

115108
<NcModal v-if="showAlbumCreationForm"
116109
key="albumCreationForm"
117-
:set-return-focus="$refs.addActions?.$refs.menuButton?.$el"
110+
:set-return-focus="$refs.newAlbumButton?.$el"
118111
@close="showAlbumCreationForm = false">
119112
<h2 class="timeline__heading">
120113
{{ t('photos', 'New album') }}

0 commit comments

Comments
 (0)