mirror of
https://github.com/photoprism/photoprism.git
synced 2026-01-23 02:24:24 +00:00
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
b97809589e
commit
93183fbd21
2 changed files with 10 additions and 9 deletions
|
|
@ -77,7 +77,7 @@ export default {
|
|||
|
||||
// Opens the photo edit dialog (when more than 1 image are selected).
|
||||
this.subscriptions.push(
|
||||
this.$event.subscribe("dialog.editBatch", (ev, data) => {
|
||||
this.$event.subscribe("dialog.batchedit", (ev, data) => {
|
||||
this.onEditBatch(data);
|
||||
})
|
||||
);
|
||||
|
|
@ -120,12 +120,12 @@ export default {
|
|||
this.edit.visible = true;
|
||||
},
|
||||
onEditBatch(data) {
|
||||
if (this.editBatch.visible || !this.hasAuth()) {
|
||||
if (this.batchedit.visible || !this.hasAuth()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.editBatch.selection = data.selection;
|
||||
this.editBatch.visible = true;
|
||||
this.batchedit.selection = data.selection;
|
||||
this.batchedit.visible = true;
|
||||
},
|
||||
closeEditDialog() {
|
||||
if (this.edit.visible) {
|
||||
|
|
@ -133,8 +133,8 @@ export default {
|
|||
}
|
||||
},
|
||||
closeEditBatch() {
|
||||
if (this.editBatch.visible) {
|
||||
this.editBatch.visible = false;
|
||||
if (this.batchedit.visible) {
|
||||
this.batchedit.visible = false;
|
||||
}
|
||||
},
|
||||
onUpload(data) {
|
||||
|
|
|
|||
|
|
@ -227,6 +227,7 @@ export default {
|
|||
canManage: this.$config.allow("photos", "manage") && features.albums,
|
||||
canEdit: this.$config.allow("photos", "update") && features.edit,
|
||||
canEditAlbum: this.$config.allow("albums", "update") && features.albums,
|
||||
canBatchEdit: this.$config.allow("photos", "update") && this.$config.allow("photos", "access_all"),
|
||||
busy: false,
|
||||
config: this.$config.values,
|
||||
expanded: false,
|
||||
|
|
@ -424,11 +425,11 @@ export default {
|
|||
download(path, "photos.zip");
|
||||
},
|
||||
edit() {
|
||||
// Open Edit Dialog
|
||||
if (this.selection.length == 1) {
|
||||
// Open Edit or Batch Edit Dialog.
|
||||
if (!this.canBatchEdit || this.selection.length === 1) {
|
||||
this.$event.PubSub.publish("dialog.edit", { selection: this.selection, album: this.album, index: 0 });
|
||||
} else {
|
||||
this.$event.PubSub.publish("dialog.editBatch", { selection: this.selection, album: this.album, index: 0 });
|
||||
this.$event.PubSub.publish("dialog.batchedit", { selection: this.selection, album: this.album, index: 0 });
|
||||
}
|
||||
},
|
||||
onShared() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue