diff --git a/scripts/system/html/css/SnapshotReview.css b/scripts/system/html/css/SnapshotReview.css
index 69de4bb147..218eb8c9a5 100644
--- a/scripts/system/html/css/SnapshotReview.css
+++ b/scripts/system/html/css/SnapshotReview.css
@@ -198,7 +198,6 @@ input[type=button].naked:active {
font-family: Raleway-Regular;
font-weight: 500;
font-size: 16px;
- text-align: right;
color: white;
}
/*
diff --git a/scripts/system/html/js/SnapshotReview.js b/scripts/system/html/js/SnapshotReview.js
index dc0d319d16..25bc25b776 100644
--- a/scripts/system/html/js/SnapshotReview.js
+++ b/scripts/system/html/js/SnapshotReview.js
@@ -217,8 +217,8 @@ function createShareBar(parentID, isLoggedIn, canShare, isGif, blastButtonDisabl
'' +
'' +
'' +
- '
' +
- 'Snaps taken in this domain can\'t be shared.' +
+ '
' +
+ 'Snaps taken from the pictured domain can\'t be shared.' +
'
';
// Add onclick handler to parent DIV's img to toggle share buttons
document.getElementById(parentID + 'img').onclick = function () { selectImageWithHelpText(parentID, true); };
@@ -230,7 +230,7 @@ function createShareBar(parentID, isLoggedIn, canShare, isGif, blastButtonDisabl
'' +
'
' +
'' +
- '' +
+ '
' +
'Please log in to share snaps' + '' +
'
';
// Add onclick handler to parent DIV's img to toggle share buttons
@@ -249,9 +249,9 @@ function appendShareBar(divID, isLoggedIn, canShare, isGif, blastButtonDisabled,
if (divID === "p0") {
if (isLoggedIn) {
if (canShare) {
- selectImageWithHelpText(divID, true);
- } else {
selectImageToShare(divID, true);
+ } else {
+ selectImageWithHelpText(divID, true);
}
} else {
selectImageWithHelpText(divID, true);
@@ -625,7 +625,7 @@ window.onload = function () {
imageCount = message.image_data.length + 1; // "+1" for the GIF that'll finish processing soon
message.image_data.push({ localPath: messageOptions.loadingGifPath });
message.image_data.forEach(function (element, idx) {
- addImage(element, messageOptions.isLoggedIn, idx === 0 && messageOptions.canShare, idx === 1, false);
+ addImage(element, messageOptions.isLoggedIn, idx === 0 && messageOptions.canShare, idx === 1, false, false, false, true);
});
document.getElementById("p1").classList.add("processingGif");
} else {
@@ -634,16 +634,14 @@ window.onload = function () {
p1img.src = gifPath;
paths[1] = gifPath;
- if (messageOptions.canShare) {
- shareForUrl("p1");
- appendShareBar("p1", messageOptions.isLoggedIn, true, false, false, true);
- document.getElementById("p1").classList.remove("processingGif");
- }
+ shareForUrl("p1");
+ appendShareBar("p1", messageOptions.isLoggedIn, messageOptions.canShare, true, false, false, messageOptions.canBlast);
+ document.getElementById("p1").classList.remove("processingGif");
}
} else {
imageCount = message.image_data.length;
message.image_data.forEach(function (element) {
- addImage(element, messageOptions.isLoggedIn, messageOptions.canShare, false, false);
+ addImage(element, messageOptions.isLoggedIn, messageOptions.canShare, false, false, false, false, true);
});
}
break;
diff --git a/scripts/system/snapshot.js b/scripts/system/snapshot.js
index a4e18d2869..2d42213771 100644
--- a/scripts/system/snapshot.js
+++ b/scripts/system/snapshot.js
@@ -175,14 +175,18 @@ function onMessage(message) {
takeSnapshot();
break;
case 'shareSnapshotForUrl':
- isLoggedIn = Account.isLoggedIn();
- if (isLoggedIn) {
- print('Sharing snapshot with audience "for_url":', message.data);
- Window.shareSnapshot(message.data, message.href || href);
- } else {
- shareAfterLogin = true;
- snapshotToShareAfterLogin.push({ path: message.data, href: message.href || href });
- }
+ isDomainOpen(Settings.getValue("previousSnapshotDomainID"), function (canShare) {
+ if (canShare) {
+ isLoggedIn = Account.isLoggedIn();
+ if (isLoggedIn) {
+ print('Sharing snapshot with audience "for_url":', message.data);
+ Window.shareSnapshot(message.data, message.href || href);
+ } else {
+ shareAfterLogin = true;
+ snapshotToShareAfterLogin.push({ path: message.data, href: message.href || href });
+ }
+ }
+ });
break;
case 'blastToConnections':
isLoggedIn = Account.isLoggedIn();
@@ -548,7 +552,8 @@ function processingGifCompleted(pathAnimatedSnapshot) {
containsGif: true,
processingGif: false,
canShare: canShare,
- isLoggedIn: isLoggedIn
+ isLoggedIn: isLoggedIn,
+ canBlast: location.domainId === Settings.getValue("previousSnapshotDomainID"),
};
imageData = [{ localPath: pathAnimatedSnapshot, href: href }];
tablet.emitScriptEvent(JSON.stringify({
@@ -596,10 +601,15 @@ function onUsernameChanged() {
});
if (isLoggedIn) {
if (shareAfterLogin) {
- snapshotToShareAfterLogin.forEach(function (element) {
- print('Uploading snapshot after login:', element.path);
- Window.shareSnapshot(element.path, element.href);
+ isDomainOpen(Settings.getValue("previousSnapshotDomainID"), function (canShare) {
+ if (canShare) {
+ snapshotToShareAfterLogin.forEach(function (element) {
+ print('Uploading snapshot after login:', element.path);
+ Window.shareSnapshot(element.path, element.href);
+ });
+ }
});
+
shareAfterLogin = false;
snapshotToShareAfterLogin = [];
}