diff --git a/apps/twofactor_backupcodes/js/settings.js b/apps/twofactor_backupcodes/js/settings.js index 53da7e9f46..4ea6f131e3 100644 Binary files a/apps/twofactor_backupcodes/js/settings.js and b/apps/twofactor_backupcodes/js/settings.js differ diff --git a/apps/twofactor_backupcodes/js/settings.js.map b/apps/twofactor_backupcodes/js/settings.js.map index 6d2ab6c2f3..cbdabc71d0 100644 Binary files a/apps/twofactor_backupcodes/js/settings.js.map and b/apps/twofactor_backupcodes/js/settings.js.map differ diff --git a/apps/twofactor_backupcodes/src/service/PrintService.js b/apps/twofactor_backupcodes/src/service/PrintService.js index 6ea8d4732c..7f4a0f46c5 100644 --- a/apps/twofactor_backupcodes/src/service/PrintService.js +++ b/apps/twofactor_backupcodes/src/service/PrintService.js @@ -1,6 +1,7 @@ export function print (data) { - const newTab = window.open('', t('twofactor_backupcodes', 'Nextcloud backup codes')); - newTab.document.write('

' + t('twofactor_backupcodes', 'Nextcloud backup codes') + '

'); + const name = OC.theme.name || 'Nextcloud'; + const newTab = window.open('', t('twofactor_backupcodes', '{name} backup codes', {name: name})); + newTab.document.write('

' + t('twofactor_backupcodes', '{name} backup codes', {name: name}) + '

'); newTab.document.write('
' + data + '
'); newTab.print(); newTab.close(); diff --git a/apps/twofactor_backupcodes/src/views/PersonalSettings.vue b/apps/twofactor_backupcodes/src/views/PersonalSettings.vue index 2ca389461c..15e20395e1 100644 --- a/apps/twofactor_backupcodes/src/views/PersonalSettings.vue +++ b/apps/twofactor_backupcodes/src/views/PersonalSettings.vue @@ -15,7 +15,7 @@ {{ t('twofactor_backupcodes', 'Save backup codes') }} + :download="downloadFilename">{{ t('twofactor_backupcodes', 'Save backup codes') }} @@ -52,6 +52,10 @@ return prev + code + '\r\n'; }, '')); }, + downloadFilename: function() { + const name = OC.theme.name || 'Nextcloud'; + return name + '-backup-codes.txt'; + }, enabled: function() { return this.$store.state.enabled }, @@ -63,6 +67,9 @@ }, codes: function() { return this.$store.state.codes + }, + name: function() { + return OC.theme.name || 'Nextcloud' } }, methods: {