Skip to content

Commit

Permalink
feat: open file option on share
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiresviana committed Apr 23, 2021
1 parent aa172b8 commit 1c25f6e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
9 changes: 9 additions & 0 deletions frontend/src/css/_share.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@
word-break: break-all;
}

.share__box__element .button {
display: inline-block;
}

.share__box__element .button i {
display: block;
margin-bottom: 4px;
}

.share__box__items {
text-align: left;
flex: 10 0 25em;
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"switchView": "Switch view",
"toggleSidebar": "Toggle sidebar",
"update": "Update",
"upload": "Upload"
"upload": "Upload",
"openFile": "Open file"
},
"download": {
"downloadFile": "Download File",
Expand Down
20 changes: 17 additions & 3 deletions frontend/src/views/Share.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,23 @@
<strong>{{ $t("prompts.size") }}:</strong> {{ humanSize }}
</div>
<div class="share__box__element share__box__center">
<a target="_blank" :href="link" class="button button--flat">{{
$t("buttons.download")
}}</a>
<a target="_blank" :href="link" class="button button--flat">
<div>
<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 class="share__box__element share__box__center">
<qrcode-vue :value="fullLink" size="200" level="M"></qrcode-vue>
Expand Down

0 comments on commit 1c25f6e

Please sign in to comment.