feat: open file option on share

pull/1373/head
Ramires Viana 2021-04-23 11:55:56 +00:00
parent aa172b8bb5
commit 1c25f6ee69
3 changed files with 28 additions and 4 deletions

View File

@ -43,6 +43,15 @@
word-break: break-all; word-break: break-all;
} }
.share__box__element .button {
display: inline-block;
}
.share__box__element .button i {
display: block;
margin-bottom: 4px;
}
.share__box__items { .share__box__items {
text-align: left; text-align: left;
flex: 10 0 25em; flex: 10 0 25em;

View File

@ -33,7 +33,8 @@
"switchView": "Switch view", "switchView": "Switch view",
"toggleSidebar": "Toggle sidebar", "toggleSidebar": "Toggle sidebar",
"update": "Update", "update": "Update",
"upload": "Upload" "upload": "Upload",
"openFile": "Open file"
}, },
"download": { "download": {
"downloadFile": "Download File", "downloadFile": "Download File",

View File

@ -85,9 +85,23 @@
<strong>{{ $t("prompts.size") }}:</strong> {{ humanSize }} <strong>{{ $t("prompts.size") }}:</strong> {{ humanSize }}
</div> </div>
<div class="share__box__element share__box__center"> <div class="share__box__element share__box__center">
<a target="_blank" :href="link" class="button button--flat">{{ <a target="_blank" :href="link" class="button button--flat">
$t("buttons.download") <div>
}}</a> <i class="material-icons">file_download</i
>{{ $t("buttons.download") }}
</div>
</a>
<a
target="_blank"
:href="link + '?inline=true'"
class="button button--flat"
v-if="!req.isDir"
>
<div>
<i class="material-icons">open_in_new</i
>{{ $t("buttons.openFile") }}
</div>
</a>
</div> </div>
<div class="share__box__element share__box__center"> <div class="share__box__element share__box__center">
<qrcode-vue :value="fullLink" size="200" level="M"></qrcode-vue> <qrcode-vue :value="fullLink" size="200" level="M"></qrcode-vue>