[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [snowflake/master] Added a new snowflake colour for active cons



commit e93584029a57cc60296c7e0615c0f2eb6de037f0
Author: Cecylia Bocovich <cohosh@xxxxxxxxxxxxxx>
Date:   Tue Jul 2 10:49:28 2019 -0400

    Added a new snowflake colour for active cons
    
    If there is an active connection through your snowflake proxy, your
    snowflake will turn to green
---
 proxy/ui.coffee                       |   4 ++++
 proxy/webext/icons/status-running.png | Bin 0 -> 4758 bytes
 proxy/webext/icons/status-running.svg |  11 +++++++++++
 proxy/webext/popup.js                 |   3 +++
 4 files changed, 18 insertions(+)

diff --git a/proxy/ui.coffee b/proxy/ui.coffee
index e316e54..f9361ea 100644
--- a/proxy/ui.coffee
+++ b/proxy/ui.coffee
@@ -98,3 +98,7 @@ class WebExtUI extends UI
     super connected
     if connected then @stats[0] += 1
     @postActive()
+    if @active
+      chrome.browserAction.setIcon
+        path:
+          32: "icons/status-running.png"
diff --git a/proxy/webext/icons/status-running.png b/proxy/webext/icons/status-running.png
new file mode 100644
index 0000000..96ff7b2
Binary files /dev/null and b/proxy/webext/icons/status-running.png differ
diff --git a/proxy/webext/icons/status-running.svg b/proxy/webext/icons/status-running.svg
new file mode 100644
index 0000000..4cc9602
--- /dev/null
+++ b/proxy/webext/icons/status-running.svg
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="61px" height="60px" viewBox="0 0 61 60" version="1.1" xmlns="http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink";>
+    <!-- Generator: Sketch 53.1 (72631) - https://sketchapp.com -->
+    <title>status-on</title>
+    <desc>Created with Sketch.</desc>
+    <g id="Snowflake-Extension" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="Artboard" transform="translate(-1003.000000, -111.000000)" fill="#40E0D0">
+            <path d="M1063.03226,140.032258 L1054.85452,140.032258 C1056.9129,137.995161 1060.31774,134.62129 1062.30774,132.632258 C1062.68581,132.254194 1062.68581,131.64129 1062.30806,131.263226 C1061.93,130.885484 1061.31774,130.885806 1060.93935,131.262903 C1058.37161,133.83 1053.43548,138.714516 1052.1029,140.032258 L1036.33613,140.032258 L1047.12097,129.247419 C1047.64677,129.253871 1048.17323,129.257419 1048.69968,129.257419 C1049.99645,129.257419 1051.29065,129.24129 1052.55419,129.225161 C1054.97516,129.194839 1057.47935,129.163871 1059.97839,129.246129 C1060.51968,129.259355 1060.96,128.845484 1060.97806,128.31129 C1060.99581,127.777097 1060.5771,127.329677 1060.04258,127.311935 C1057.49903,127.227419 1054.97323,127.259032 1052.52968,127.29 C1051.3871,127.304194 1050.21968,127.314516 1049.05097,127.317419 L1055.21323,121.155161 C1055.59129,120.777742 1055.59129,120.164516 1055.21323,119.786774 C1054.83548,119.40871 1054.22226,119.40871 1053.84484,119.786774 L1048.00839,12
 5.623226 C1048.02323,122.708065 1048.04387,118.084839 1048.04452,115.345484 C1048.04484,114.810968 1047.61129,114.377742 1047.0771,114.377419 L1047.07677,114.377419 C1046.54258,114.377419 1046.10935,114.810645 1046.10903,115.345161 C1046.10839,118.843226 1046.07452,125.416129 1046.0629,127.56871 L1034.96774,138.663871 L1034.96774,123.21871 C1036.13,122.043871 1041.19774,116.92129 1043.83,114.288065 C1044.20806,113.91 1044.20806,113.297419 1043.83,112.919677 C1043.45161,112.54129 1042.83871,112.541935 1042.46097,112.919677 C1040.44129,114.940323 1036.99387,118.42 1034.96774,120.466774 L1034.96774,111.967742 C1034.96774,111.433226 1034.53452,111 1034,111 C1033.46581,111 1033.03226,111.433226 1033.03226,111.967742 L1033.03226,120.42129 C1032.29355,119.676129 1031.56032,118.929355 1030.84419,118.194839 C1029.13806,116.445161 1027.37387,114.636129 1025.51548,112.897419 C1025.12548,112.532258 1024.51323,112.551935 1024.14774,112.942581 C1023.78258,113.332903 1023.8029,113.945161 1024.1932
 3,114.310645 C1026.01903,116.019355 1027.76742,117.811935 1029.45839,119.545806 C1030.61839,120.735161 1031.81677,121.95871 1033.03226,123.151935 L1033.03226,138.663871 L1022.51097,128.142581 C1022.50581,127.20129 1022.46161,119.277097 1022.46129,115.309355 C1022.46097,114.775161 1022.02806,114.341613 1021.49323,114.341935 C1020.95903,114.341935 1020.52548,114.775484 1020.52581,115.309677 C1020.52613,118.249355 1020.55065,123.356774 1020.56516,126.196452 L1014.15516,119.786774 C1013.77774,119.40871 1013.16452,119.40871 1012.78677,119.786774 C1012.40871,120.164516 1012.40871,120.777742 1012.78677,121.155161 L1018.91226,127.280645 C1017.9471,127.275484 1016.98516,127.266452 1016.04065,127.254516 C1013.5971,127.223548 1011.07097,127.191613 1008.52774,127.276452 C1007.99355,127.294194 1007.57484,127.74129 1007.59258,128.275806 C1007.61032,128.81 1008.05484,129.229032 1008.59194,129.210645 C1011.09065,129.128065 1013.59484,129.159355 1016.01645,129.189677 C1017.28,129.205484 1018.57387,1
 29.221613 1019.87065,129.221613 C1020.19613,129.221613 1020.52161,129.218065 1020.84742,129.215806 L1031.66387,140.032258 L1016.42387,140.032258 C1015.09129,138.714516 1010.15516,133.83 1007.58742,131.262903 C1007.20935,130.885806 1006.59677,130.885484 1006.21903,131.263226 C1005.84097,131.64129 1005.84097,132.254194 1006.21903,132.632258 C1008.20903,134.62129 1011.61387,137.995161 1013.67194,140.032258 L1004.96774,140.032258 C1004.43355,140.032258 1004,140.465484 1004,141 C1004,141.534516 1004.43355,141.967742 1004.96774,141.967742 L1013.81387,141.967742 C1013.03774,142.73871 1012.25839,143.503548 1011.49226,144.250645 C1009.74355,145.956129 1007.93484,147.72 1006.19677,149.577419 C1005.83161,149.967742 1005.85161,150.58 1006.24194,150.945161 C1006.42871,151.119677 1006.66613,151.206452 1006.90323,151.206452 C1007.16161,151.206452 1007.41935,151.103226 1007.60968,150.899677 C1009.31774,149.074516 1011.11032,147.326774 1012.84355,145.636452 C1014.06387,144.446452 1015.32097,143.2161
 29 1016.54387,141.967742 L1031.66387,141.967742 L1020.35387,153.277742 C1018.69323,153.264516 1017.02516,153.282903 1015.40613,153.303871 C1012.98484,153.333548 1010.48065,153.364839 1007.98194,153.282581 C1007.44742,153.27 1007.00032,153.683226 1006.98226,154.217742 C1006.96452,154.751935 1007.38323,155.199355 1007.91774,155.216774 C1010.46065,155.30129 1012.98677,155.269355 1015.43065,155.239032 C1016.4129,155.226774 1017.41452,155.217419 1018.41871,155.212903 L1012.78677,160.844839 C1012.40871,161.222258 1012.40871,161.835484 1012.78677,162.213226 C1012.97581,162.402258 1013.22355,162.496774 1013.47097,162.496774 C1013.71871,162.496774 1013.96645,162.402258 1014.15516,162.213226 L1019.95419,156.414194 C1019.93968,159.274839 1019.91613,164.283871 1019.91581,167.183548 C1019.91548,167.718065 1020.34903,168.151613 1020.88323,168.151613 L1020.88355,168.151613 C1021.41774,168.151613 1021.85097,167.718387 1021.85129,167.184194 C1021.85194,163.349677 1021.8929,155.82 1021.9,154.468387 L
 1033.03226,143.336129 L1033.03226,158.848065 C1031.81613,160.042258 1030.6171,161.266129 1029.45645,162.456129 C1027.76613,164.189355 1026.01839,165.98129 1024.19323,167.689355 C1023.8029,168.054516 1023.78258,168.667097 1024.14774,169.057419 C1024.33839,169.260645 1024.59613,169.363871 1024.85452,169.363871 C1025.09161,169.363871 1025.32903,169.277097 1025.51548,169.102581 C1027.37323,167.364194 1029.13677,165.556129 1030.84226,163.807419 C1031.55935,163.072258 1032.29323,162.324516 1033.03226,161.579032 L1033.03226,170.032258 C1033.03226,170.566774 1033.46581,171 1034,171 C1034.53452,171 1034.96774,170.566774 1034.96774,170.032258 L1034.96774,161.533226 C1036.99387,163.580323 1040.44129,167.059355 1042.46097,169.080323 C1042.83903,169.458065 1043.45161,169.458387 1043.83,169.080645 C1044.20806,168.702581 1044.20806,168.09 1043.83,167.711935 C1041.19774,165.079032 1036.13,159.956452 1034.96774,158.781613 L1034.96774,143.336129 L1045.86806,154.236452 C1045.87645,155.739032 1045.9161
 3,163.11129 1045.91677,166.890968 C1045.9171,167.425484 1046.35032,167.85871 1046.88484,167.85871 C1047.41935,167.85871 1047.85258,167.425161 1047.85226,166.890968 C1047.85194,164.011613 1047.82871,159.053226 1047.81419,156.182258 L1053.84484,162.213226 C1054.03355,162.402258 1054.28129,162.496774 1054.52903,162.496774 C1054.77645,162.496774 1055.02452,162.402258 1055.21323,162.213226 C1055.59129,161.835484 1055.59129,161.222258 1055.21323,160.844839 L1049.28839,154.919677 C1050.3129,154.924516 1051.33516,154.933548 1052.33774,154.946129 C1054.78097,154.977097 1057.30677,155.009032 1059.85065,154.924194 C1060.38484,154.906452 1060.80355,154.459355 1060.78581,153.924839 C1060.76774,153.390645 1060.32774,152.978387 1059.78613,152.99 C1057.2871,153.072258 1054.78323,153.040968 1052.36194,153.010968 C1050.72355,152.990323 1049.03484,152.97129 1047.35387,152.985484 L1036.33613,141.967742 L1051.9829,141.967742 C1053.20581,143.216129 1054.46323,144.446452 1055.68323,145.636452 C1057.41677,
 147.326774 1059.20871,149.074516 1060.91677,150.899677 C1061.10742,151.103226 1061.36516,151.206452 1061.62387,151.206452 C1061.86065,151.206452 1062.09806,151.119677 1062.28484,150.945161 C1062.67516,150.58 1062.69548,149.967742 1062.33,149.577419 C1060.59194,147.72 1058.78355,145.956129 1057.03452,144.250645 C1056.26839,143.503548 1055.48903,142.73871 1054.7129,141.967742 L1063.03226,141.967742 C1063.56677,141.967742 1064,141.534516 1064,141 C1064,140.465484 1063.56677,140.032258 1063.03226,140.032258" id="status-on" transform="translate(1034.000000, 141.000000) rotate(65.000000) translate(-1034.000000, -141.000000) "></path>
+        </g>
+    </g>
+</svg>
diff --git a/proxy/webext/popup.js b/proxy/webext/popup.js
index c447b86..977f6a2 100644
--- a/proxy/webext/popup.js
+++ b/proxy/webext/popup.js
@@ -16,6 +16,9 @@ port.onMessage.addListener((m) => {
     enabledText.innerText = 'Turn Off';
     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.`;
+      if (active) {
+        img.src = `icons/status-running.png`;
+      }
   } else {
     ps[0].innerText = "Snowflake is off";
     ps[1].innerText = "";



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits