Download/Download all added to gallery view

This commit is contained in:
N-Pex 2025-09-23 15:33:51 +02:00
parent 0f7b9ac7ab
commit b010285a1e
4 changed files with 18 additions and 25 deletions

View file

@ -116,6 +116,7 @@
"files": "Files",
"images": "Images",
"send_attachements_dialog_title": "Do you want to send following attachments?",
"download_media": "Download media",
"download_all": "Download all",
"failed_to_render": "Failed to render event",
"room_upgraded": "This room has been upgraded, go {link} to rejoin the discussion",

View file

@ -4,7 +4,7 @@
no-gutters
align-content="center"
>
<v-col cols="auto" class="me-2 align-self-center">
<v-col cols="auto" class="me-2 align-self-center" v-if="icon != null && icon != ''">
<v-icon :size="iconSize">{{ icon }}</v-icon>
</v-col>
<v-col class="align-self-center">{{ text }}</v-col>

View file

@ -2,9 +2,8 @@
<v-dialog v-model="showDialog" content-class="more-menu-popup" class="ma-0 pa-0">
<div class="popup-wrapper">
<v-card variant="flat">
<v-card-text>
<v-container class="mt-0 pa-0 pt-3 pb-3 action-row-container-no-dividers">
<v-card-text class="ma-0 pa-2">
<v-container class="mt-0 pa-0 action-row-container-no-dividers">
<ActionRow v-for="item in menuItems" :key="item.name" :icon="item.icon" :iconSize="16" :text="item.text" @click="$emit('close');item.handler()" />
<v-row v-if="showProfile" class="profile-row clickable" @click="viewProfile" no-gutters align-content="center">

View file

@ -5,19 +5,17 @@
<v-icon @click.stop="$emit('close')" color="white" class="clickable">arrow_back</v-icon>
<div class="room-name no-upper">{{ displayDate }}</div>
<div>
<v-icon @click.stop="showInfo = true" v-if="showInfoButton" color="white" class="clickable"
<v-icon @click.stop="showInfo = true" v-if="showInfoButton" color="white" class="header-button clickable"
>info_outline</v-icon
>
<v-icon @click.stop="showMoreMenu = true" color="white" class="clickable">more_vert</v-icon>
<v-icon v-if="items.length > 1" @click.stop="showMoreMenu = true" color="white" class="header-button clickable">more_vert</v-icon>
<v-icon v-else @click.stop="() => downloadOne()" color="white" class="header-button clickable">$vuetify.icons.ic_download</v-icon>
</div>
</v-container>
</div>
<div class="gallery-current-item">
<ThumbnailView :item="currentAttachment" />
<div class="download-button clickable" @click.stop="downloadOne">
<v-icon color="black">arrow_downward</v-icon>
</div>
</div>
<div class="gallery-thumbnail-container">
<div
@ -92,7 +90,12 @@ const showInfoButton = computed(() => {
const moreMenuItems = computed(() => {
let items = [];
items.push({
icon: "$vuetify.icons.ic_download",
text: t("message.download_media"),
handler: () => {
downloadOne();
},
});
items.push({
text: t("message.download_all"),
handler: () => {
downloadAll();
@ -132,21 +135,11 @@ const downloadAll = () => {
flex: 0 0 auto;
}
// .file-drop-current-item {
// position: relative;
// }
.download-button {
position: absolute;
right: 21px;
bottom: 21px;
width: 34px;
height: 34px;
background: rgba(255, 255, 255, 0.8);
border-radius: 17px;
display: flex;
align-items: center;
justify-content: center;
.header-button {
width: 44px;
height: 44px;
padding: 10px;
margin-left: 8px;
}
.fill-screen {