Skip to content

Commit 6a3ee5e

Browse files
committed
disableExport
1 parent f8b2ba5 commit 6a3ee5e

File tree

3 files changed

+37
-31
lines changed

3 files changed

+37
-31
lines changed

schema-chrome.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"description": "If set to true, then 3rd party backup options will be hidden. If 3rd party backup is already configured for a user this will not stop it.",
1212
"type": "boolean"
1313
},
14-
"disableExportImport": {
14+
"disableExport": {
1515
"title": "Disable import / export menu",
16-
"description": "If set to true, then 'Export / Import' menu will be hidden.",
16+
"description": "If set to true, then export buttons will be hidden.",
1717
"type": "boolean"
1818
},
1919
"disablePasswordCaching": {

src/components/Popup/ExportPage.vue

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
11
<template>
22
<div>
3-
<div class="text warning" v-if="!encryption.getEncryptionStatus()">
4-
{{ i18n.export_info }}
3+
<div v-show="!exportDisabled">
4+
<div class="text warning" v-if="!encryption.getEncryptionStatus()">
5+
{{ i18n.export_info }}
6+
</div>
7+
<div class="text warning" v-if="unsupportedAccounts">
8+
{{ i18n.otp_unsupported_warn }}
9+
</div>
10+
<a
11+
download="authenticator.txt"
12+
v-bind:href="exportOneLineOtpAuthFile"
13+
v-if="!unsupportedAccounts"
14+
class="button"
15+
target="_blank"
16+
>{{ i18n.download_backup }}</a
17+
>
18+
<a
19+
download="authenticator.json"
20+
v-bind:href="exportFile"
21+
class="button"
22+
target="_blank"
23+
v-else
24+
>{{ i18n.download_backup }}</a
25+
>
26+
<a
27+
download="authenticator.json"
28+
v-bind:href="exportEncryptedFile"
29+
v-if="encryption.getEncryptionStatus()"
30+
class="button"
31+
target="_blank"
32+
>{{ i18n.download_enc_backup }}</a
33+
>
534
</div>
6-
<div class="text warning" v-if="unsupportedAccounts">
7-
{{ i18n.otp_unsupported_warn }}
8-
</div>
9-
<a
10-
download="authenticator.txt"
11-
v-bind:href="exportOneLineOtpAuthFile"
12-
v-if="!unsupportedAccounts"
13-
class="button"
14-
target="_blank"
15-
>{{ i18n.download_backup }}</a
16-
>
17-
<a
18-
download="authenticator.json"
19-
v-bind:href="exportFile"
20-
class="button"
21-
target="_blank"
22-
v-else
23-
>{{ i18n.download_backup }}</a
24-
>
25-
<a
26-
download="authenticator.json"
27-
v-bind:href="exportEncryptedFile"
28-
v-if="encryption.getEncryptionStatus()"
29-
class="button"
30-
target="_blank"
31-
>{{ i18n.download_enc_backup }}</a
32-
>
3335
<a class="button" href="import.html" target="_blank">{{
3436
i18n.import_backup
3537
}}</a>
@@ -57,6 +59,9 @@ export default Vue.extend({
5759
computed: {
5860
encryption: function() {
5961
return this.$store.state.accounts.encryption;
62+
},
63+
exportDisabled: function() {
64+
return this.$store.state.menu.exportDisabled;
6065
}
6166
}
6267
});

src/store/Menu.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export class Menu implements IModule {
1010
useHighContrast: localStorage.highContrast === "true",
1111
autolock: Number(localStorage.autolock) || 0,
1212
backupDisabled: await ManagedStorage.get("disableBackup"),
13+
exportDisabled: await ManagedStorage.get("disableExport"),
1314
storageArea: await ManagedStorage.get("storageArea"),
1415
feedbackURL: await ManagedStorage.get("feedbackURL")
1516
},

0 commit comments

Comments
 (0)