diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2019-03-18 13:20:49 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-03-18 13:20:49 +0900 |
| commit | de47a17be7ce541fcd5c8ee698c2ef4aa926b5fb (patch) | |
| tree | 667cc893d415dad545d5bf6a054fa7ce67982f1f /src/client/app/mobile | |
| parent | 10.97.2 (diff) | |
| download | sharkey-de47a17be7ce541fcd5c8ee698c2ef4aa926b5fb.tar.gz sharkey-de47a17be7ce541fcd5c8ee698c2ef4aa926b5fb.tar.bz2 sharkey-de47a17be7ce541fcd5c8ee698c2ef4aa926b5fb.zip | |
Improve drive downloading (#4523)
* Improve drive file downloading
* fix name
* wtf crlf
* semicolon
Diffstat (limited to 'src/client/app/mobile')
| -rw-r--r-- | src/client/app/mobile/views/components/drive.file-detail.vue | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/app/mobile/views/components/drive.file-detail.vue b/src/client/app/mobile/views/components/drive.file-detail.vue index 4d0a747fcb..d7432437e0 100644 --- a/src/client/app/mobile/views/components/drive.file-detail.vue +++ b/src/client/app/mobile/views/components/drive.file-detail.vue @@ -38,7 +38,7 @@ <div class="menu"> <div> <ui-input readonly :value="file.url">URL</ui-input> - <ui-button link :href="`${file.url}?download`" :download="file.name"><fa icon="download"/> {{ $t('download') }}</ui-button> + <ui-button link :href="dlUrl" :download="file.name"><fa icon="download"/> {{ $t('download') }}</ui-button> <ui-button @click="rename"><fa icon="pencil-alt"/> {{ $t('rename') }}</ui-button> <ui-button @click="move"><fa :icon="['far', 'folder-open']"/> {{ $t('move') }}</ui-button> <ui-button @click="toggleSensitive" v-if="file.isSensitive"><fa :icon="['far', 'eye']"/> {{ $t('unmark-as-sensitive') }}</ui-button> @@ -61,6 +61,7 @@ import Vue from 'vue'; import i18n from '../../../i18n'; import { gcd } from '../../../../../prelude/math'; +import { appendQuery } from '../../../../../prelude/url'; export default Vue.extend({ i18n: i18n('mobile/views/components/drive.file-detail.vue'), @@ -86,6 +87,10 @@ export default Vue.extend({ return this.file.properties.avgColor && this.file.properties.avgColor.length == 3 ? { 'background-color': `rgb(${ this.file.properties.avgColor.join(',') })` } : {}; + }, + + dlUrl(): string { + return appendQuery(this.file.url, 'download'); } }, |