Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyrat committed Feb 3, 2020
1 parent 76b3f99 commit 70d5eee
Show file tree
Hide file tree
Showing 12 changed files with 1,010 additions and 1,055 deletions.
5 changes: 2 additions & 3 deletions app/scripts/comp/multi-instance-comms.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const BroadcastChannel = require('broadcast-channel').default;
const LeaderElection = require('broadcast-channel/leader-election');
const { BroadcastChannel, createLeaderElection } = require('broadcast-channel');
const Locale = require('../util/locale');
const Alerts = require('./alerts');
const RuntimeInfo = require('../comp/runtime-info');
Expand All @@ -17,7 +16,7 @@ const MultiInstanceComms = {

channel.onmessage = msg => MultiInstanceComms.handleMessage(msg);
leadershipTimeout = setTimeout(MultiInstanceComms.otherLeaderExists, 1000);
elector = LeaderElection.create(channel);
elector = createLeaderElection(channel);
window.addEventListener('unload', MultiInstanceComms.abdicate);
await elector.awaitLeadership();
clearTimeout(leadershipTimeout);
Expand Down
4 changes: 2 additions & 2 deletions app/scripts/mixins/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ _.extend(Backbone.View.prototype, {
renderTemplate: function(model, replace) {
Tip.hideTips(this.$el);
if (replace && replace.plain) {
this.$el.html(this.template(model));
this.$el.html(this.template(model, {allowProtoPropertiesByDefault: true}));
} else {
if (replace) {
this.$el.html('');
}
const el = $(this.template(model));
const el = $(this.template(model, {allowProtoPropertiesByDefault: true}));
if (!this._elAppended || replace) {
this.$el.append(el);
this._elAppended = true;
Expand Down
4 changes: 2 additions & 2 deletions app/scripts/util/kdbxweb-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const KdbxwebInit = {
});
},

workerPostRun() {
workerPostRun: function() {
self.postMessage({ op: 'postRun' });
self.onmessage = e => {
try {
Expand All @@ -115,7 +115,7 @@ const KdbxwebInit = {
};
},

calcHash(Module, args) {
calcHash: function(Module, args) {
let { password, salt } = args;
const { memory, iterations, length, parallelism, type, version } = args;
const passwordLen = password.byteLength;
Expand Down
3 changes: 2 additions & 1 deletion app/scripts/views/app-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ const AppView = Backbone.View.extend({
this.$el.html(this.template({
beta: this.model.isBeta,
titlebarStyle: this.titlebarStyle
}));
},
{allowProtoPropertiesByDefault: true}));
this.panelEl = this.$el.find('.app__panel:first');
this.views.listWrap.setElement(this.$el.find('.app__list-wrap')).render();
this.views.menu.setElement(this.$el.find('.app__menu')).render();
Expand Down
6 changes: 3 additions & 3 deletions app/scripts/views/details/details-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,16 @@ const DetailsView = Backbone.View.extend({
extensionAvailable: !!browserName,
extensionEnabled: window.keeAddonEnabled,
browserName: browserName
}));
}, {allowProtoPropertiesByDefault: true}));
return;
}
if (this.model instanceof GroupModel) {
this.$el.html(this.groupTemplate());
this.$el.html(this.groupTemplate({}, {allowProtoPropertiesByDefault: true}));
Tip.createTips(this.$el);
return;
}
const model = $.extend({ deleted: this.appModel.filter.trash }, this.model);
this.$el.html(this.template(model));
this.$el.html(this.template(model, {allowProtoPropertiesByDefault: true}));
Tip.createTips(this.$el);
this.setSelectedColor(this.model.color);
this.model.initOtpGenerator();
Expand Down
8 changes: 4 additions & 4 deletions app/scripts/views/list-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const ListView = Backbone.View.extend({

render: function () {
if (!this.itemsEl) {
this.$el.html(this.template());
this.$el.html(this.template({}, {allowProtoPropertiesByDefault: true}));
this.itemsEl = this.$el.find('.list__items>.scroller');
this.views.search.setElement(this.$el.find('.list__header')).render();
this.setTableView();
Expand All @@ -93,13 +93,13 @@ const ListView = Backbone.View.extend({
let itemsHtml = '';
this.items.forEach(item => {
presenter.present(item);
itemsHtml += itemTemplate(presenter);
itemsHtml += itemTemplate(presenter, {allowProtoPropertiesByDefault: true});
}, this);
const html = itemsTemplate({ items: itemsHtml, columns: this.tableColumns });
const html = itemsTemplate({ items: itemsHtml, columns: this.tableColumns }, {allowProtoPropertiesByDefault: true});
this.itemsEl.html(html);
} else {
const showAllEntriesLink = this.model && this.model.files && this.model.files.hasAtLeastOneEntry();
this.itemsEl.html(this.emptyTemplate({showAllEntriesLink}));
this.itemsEl.html(this.emptyTemplate({showAllEntriesLink}, {allowProtoPropertiesByDefault: true}));
}
this.pageResized();
return this;
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/views/menu/menu-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const MenuView = Backbone.View.extend({
},

render: function () {
this.$el.html(this.template());
this.$el.html(this.template({}, {allowProtoPropertiesByDefault: true}));
const sectionsEl = this.$el.find('.menu');
this.model.get('sections').forEach(function(section) {
const sectionView = new MenuSectionView({ el: sectionsEl, model: section });
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/views/modal-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const ModalView = Backbone.View.extend({

render: function () {
const parent = this.$el;
this.setElement($(this.template(this.model)));
this.setElement($(this.template(this.model, {allowProtoPropertiesByDefault: true})));
parent.append(this.$el);
const el = this.$el;
el.addClass('modal--hidden');
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/views/vault-modal-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const VaultModalView = Backbone.View.extend({

render: function () {
const parent = this.$el;
this.setElement($(this.template(this.model)));
this.setElement($(this.template(this.model, {allowProtoPropertiesByDefault: true})));
parent.append(this.$el);
const el = this.$el;
if (this.model.view) {
Expand Down
Loading

0 comments on commit 70d5eee

Please sign in to comment.