Skip to content

Commit

Permalink
Merge pull request #291 from AlkoholLiga/DisableQR
Browse files Browse the repository at this point in the history
Disable QR code
  • Loading branch information
psi-4ward authored Oct 26, 2023
2 parents c4c0258 + 9ca7898 commit 2c4bc9d
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 2c4bc9d

Please sign in to comment.