1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-02 20:15:26 +02:00

i18n section strings

This commit is contained in:
McMatts 2022-03-10 15:21:25 -05:00
parent ce9c635fb4
commit 20c9168140
7 changed files with 79 additions and 39 deletions

View file

@ -28,6 +28,8 @@ export default Component.extend({
},
didReceiveAttrs() {
this._super();
let pdfOption = {};
try {
@ -46,10 +48,10 @@ export default Component.extend({
this.set('pdfOption', pdfOption);
this.setPDF();
},
didUpdateAttrs() {
this._super(...arguments);
this.setPDF();
this.setPDF();
},
setPDF() {
@ -60,7 +62,7 @@ export default Component.extend({
if (!_.isArray(files)) return;
for (let i=0; i < files.length; i++) {
if (_.endsWith(files[i].get('extension'), 'pdf') &&
if (_.endsWith(files[i].get('extension'), 'pdf') &&
files[i].get('pageId') === this.get('page.id')) {
this.set('pdfName', files[i].get('filename'));
this.set('pdfOption.fileId', files[i].get('id'));