Skip to content

Commit

Permalink
add link from file tab to folder
Browse files Browse the repository at this point in the history
  • Loading branch information
alexislefebvre authored and lastzero committed Jun 13, 2023
1 parent 9a5af31 commit 9e316a2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions frontend/src/dialog/photo/edit/files.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@
@click.stop.prevent="showDeleteDialog(file)">
<translate>Delete</translate>
</v-btn>
<v-btn v-if="file.Primary" small depressed dark color="primary-button"
class="btn-action action-open-folder"
:href="getFolderUri(file)">
<translate>Open folder</translate>
</v-btn>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -351,6 +356,12 @@ export default {
openFile(file) {
this.$viewer.show([Thumb.fromFile(this.model, file)], 0);
},
getFolderUri(file) {
const fileName = file.Name;
const folder = fileName.substring(0, fileName.lastIndexOf('/'));
return(this.config.baseUri + '/library/index/files/' + folder);
},
downloadFile(file) {
Notify.success(this.$gettext("Downloading…"));
Expand Down

0 comments on commit 9e316a2

Please sign in to comment.