Added a new snowflake colour for active cons

If there is an active connection through your snowflake proxy, your
snowflake will turn to green
This commit is contained in:
Cecylia Bocovich 2019-07-02 10:49:28 -04:00
parent 526e42a443
commit e93584029a
4 changed files with 18 additions and 0 deletions

View file

@ -98,3 +98,7 @@ class WebExtUI extends UI
super connected super connected
if connected then @stats[0] += 1 if connected then @stats[0] += 1
@postActive() @postActive()
if @active
chrome.browserAction.setIcon
path:
32: "icons/status-running.png"

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8 KiB

View file

@ -16,6 +16,9 @@ port.onMessage.addListener((m) => {
enabledText.innerText = 'Turn Off'; enabledText.innerText = 'Turn Off';
ps[0].innerText = `${clients} client${(clients !== 1) ? 's' : ''} connected.`; ps[0].innerText = `${clients} client${(clients !== 1) ? 's' : ''} connected.`;
ps[1].innerText = `Your snowflake has helped ${m.total} user${(m.total !== 1) ? 's' : ''} circumvent censorship in the last 24 hours.`; ps[1].innerText = `Your snowflake has helped ${m.total} user${(m.total !== 1) ? 's' : ''} circumvent censorship in the last 24 hours.`;
if (active) {
img.src = `icons/status-running.png`;
}
} else { } else {
ps[0].innerText = "Snowflake is off"; ps[0].innerText = "Snowflake is off";
ps[1].innerText = ""; ps[1].innerText = "";