diff options
Diffstat (limited to 'src/client/app/desktop/views')
| -rw-r--r-- | src/client/app/desktop/views/components/context-menu.menu.vue | 2 | ||||
| -rw-r--r-- | src/client/app/desktop/views/components/drive.file.vue | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/client/app/desktop/views/components/context-menu.menu.vue b/src/client/app/desktop/views/components/context-menu.menu.vue index 1ae3c85d57..f2bb3bec23 100644 --- a/src/client/app/desktop/views/components/context-menu.menu.vue +++ b/src/client/app/desktop/views/components/context-menu.menu.vue @@ -6,7 +6,7 @@ <p @click="click(item)"><i v-if="item.icon" :class="$style.icon"><fa :icon="item.icon"/></i>{{ item.text }}</p> </template> <template v-else-if="item.type == 'link'"> - <a :href="item.href" :target="item.target" @click="click(item)"><i v-if="item.icon" :class="$style.icon"><fa :icon="item.icon"/></i>{{ item.text }}</a> + <a :href="item.href" :target="item.target" @click="click(item)" :download="item.download"><i v-if="item.icon" :class="$style.icon"><fa :icon="item.icon"/></i>{{ item.text }}</a> </template> <template v-else-if="item.type == 'nest'"> <p><i v-if="item.icon" :class="$style.icon"><fa :icon="item.icon"/></i>{{ item.text }}...<span class="caret"><fa icon="caret-right"/></span></p> diff --git a/src/client/app/desktop/views/components/drive.file.vue b/src/client/app/desktop/views/components/drive.file.vue index fbd649e8f6..b9d202f555 100644 --- a/src/client/app/desktop/views/components/drive.file.vue +++ b/src/client/app/desktop/views/components/drive.file.vue @@ -38,6 +38,7 @@ import anime from 'animejs'; import copyToClipboard from '../../../common/scripts/copy-to-clipboard'; import updateAvatar from '../../api/update-avatar'; import updateBanner from '../../api/update-banner'; +import { appendQuery } from '../../../../../prelude/url'; export default Vue.extend({ i18n: i18n('desktop/views/components/drive.file.vue'), @@ -88,9 +89,10 @@ export default Vue.extend({ action: this.copyUrl }, { type: 'link', - href: `${this.file.url}?download`, + href: appendQuery(this.file.url, 'download'), text: this.$t('contextmenu.download'), icon: 'download', + download: this.file.name }, null, { type: 'item', text: this.$t('@.delete'), |