Skip to content

Commit

Permalink
Disable QR code for url sharing (useful if PsiTransfer is only in int…
Browse files Browse the repository at this point in the history
…ranet available)
  • Loading branch information
AlkoholLiga committed Oct 15, 2023
1 parent c4c0258 commit 9ca7898
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/Upload.vue
Expand Up @@ -20,7 +20,7 @@
div(v-else-if="$root.configFetched")
.well(v-show="state === 'uploaded'")
.pull-right.btn-group.upload-success-btns
a.btn.btn-primary(@click.prevent="showQrCode" href="#" :title="$root.lang.showQrCode")
a.btn.btn-primary(v-if="!disableQrCode", @click.prevent="showQrCode" href="#" :title="$root.lang.showQrCode")
icon.fa-fw(name="qrcode")
| QR-Code
a.btn.btn-primary(:href="mailLnk" :title="$root.lang.sendViaMail")
Expand Down Expand Up @@ -90,7 +90,7 @@
computed: {
...mapState(['state']),
...mapState('config', ['uploadPassRequired', 'uploadPass', 'requireBucketPassword']),
...mapState('config', ['uploadPassRequired', 'uploadPass', 'requireBucketPassword', 'disableQrCode']),
...mapState('upload', ['sid', 'files', 'password']),
...mapGetters(['error', 'disabled']),
...mapGetters('upload', ['percentUploaded', 'shareUrl', 'bucketSize', 'bytesUploaded']),
Expand Down
2 changes: 2 additions & 0 deletions config.js
Expand Up @@ -60,6 +60,8 @@ const config = {
"maxFileSize": null, // Math.pow(2, 30) * 2, // 2GB
"maxBucketSize": null, // Math.pow(2, 30) * 2, // 10GB
"plugins": ['file-downloaded-webhook', 'file-uploaded-webhook'],
// Disable the QR code button for download url sharing, set to true to disable
"disableQrCode": false,
};

// Load NODE_ENV specific config
Expand Down
1 change: 1 addition & 0 deletions lib/endpoints.js
Expand Up @@ -109,6 +109,7 @@ app.get(`${ config.baseUrl }config.json`, (req, res) => {
requireBucketPassword: config.requireBucketPassword,
maxFileSize: config.maxFileSize,
maxBucketSize: config.maxBucketSize,
disableQrCode: config.disableQrCode,
};

eventBus.emit('getFrontendConfig', frontendConfig);
Expand Down

0 comments on commit 9ca7898

Please sign in to comment.