Fix allow list UI issues

This commit is contained in:
yflory
2020-03-06 12:55:20 +01:00
parent 6d8cdca7a3
commit 62725caace
7 changed files with 34 additions and 11 deletions

View File

@@ -1523,11 +1523,11 @@ define([
},
onError: function (err) {
channel.bcast("PAD_ERROR", err);
delete channels[data.channel];
Store.leavePad(null, data, function () {});
},
onChannelError: function (err) {
channel.bcast("PAD_ERROR", err);
delete channels[data.channel];
Store.leavePad(null, data, function () {});
},
onConnectionChange: function (info) {
if (!info.state) {
@@ -1777,6 +1777,10 @@ define([
var metadata = (obj && obj[0]) || {};
cb(metadata);
// If you don't have access to the metadata, stop here
// (we can't update the local data)
if (metadata.rejected) { return; }
// Update owners and expire time in the drive
getAllStores().forEach(function (s) {
var allData = s.manager.findChannel(data.channel, true);

View File

@@ -60,7 +60,6 @@ define([
if (!c) {
c = ctx.clients[client] = {
channel: channel,
padChan: padChan,
cursor: {}
};
} else {
@@ -95,6 +94,8 @@ define([
ctx.channels[channel] = ctx.channels[channel] || {};
var chan = ctx.channels[channel];
chan.padChan = padChan;
if (!c.id) { c.id = wc.myID + '-' + client; }
if (chan.clients) {
// If 2 tabs from the same worker have been opened at the same time,

View File

@@ -12,7 +12,6 @@ define([
if (!c) {
c = ctx.clients[client] = {
channel: channel,
padChan: padChan,
};
} else {
return void cb();
@@ -45,6 +44,7 @@ define([
};
chan = ctx.channels[channel];
chan.padChan = padChan;
// Create our client ID using the netflux ID
if (!c.id) { c.id = wc.myID + '-' + client; }