From 399d51e63614c9b20356b250ddd335f7d77ea8db Mon Sep 17 00:00:00 2001 From: Adrian Tiberius Date: Sun, 18 Sep 2016 07:22:57 +0300 Subject: [PATCH 01/10] fix welcome.html maitre links --- src/welcome.html | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/welcome.html b/src/welcome.html index 7497061..af218de 100644 --- a/src/welcome.html +++ b/src/welcome.html @@ -99,16 +99,16 @@

You'll be notifed when Status is ready to launch.
Help us spread the word by inviting your friends! The more friends you invite, the sooner you'll get access:

Or share your unique link:


- + @@ -116,6 +116,18 @@
+
From d77d57d3e4f17cf86959b833a7f4f79acffffc08 Mon Sep 17 00:00:00 2001 From: Adrian Tiberius Date: Sun, 18 Sep 2016 07:35:45 +0300 Subject: [PATCH 02/10] add log file --- src/post-receive.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/post-receive.php b/src/post-receive.php index 87bc6a3..e283501 100644 --- a/src/post-receive.php +++ b/src/post-receive.php @@ -7,7 +7,9 @@ if ( $_SERVER['HTTP_X_GITHUB_EVENT'] == 'push' ) { if( ($fp = popen($command, "r")) ) { while( !feof($fp) ){ - echo fread($fp, 1024); + $result = fread($fp, 1024); + file_put_contents("build.log", $result, FILE_APPEND); + echo $result; flush(); } fclose($fp); From 8b304f57a06d2a816bbda24a0d0cda84eb0ac79b Mon Sep 17 00:00:00 2001 From: Adrian Tiberius Date: Sun, 18 Sep 2016 07:46:33 +0300 Subject: [PATCH 03/10] waitlist.html - show 0 if none behind --- src/waitlist.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/waitlist.html b/src/waitlist.html index c1fbb22..6582606 100644 --- a/src/waitlist.html +++ b/src/waitlist.html @@ -105,6 +105,11 @@ "Remember to confirm your email to be added to the signup queue.
Improve your position by referring your friends and spreading the word."); jQuery("#maitre-share-container").html( ''); + var behindNumberElement = jQuery("#maitre-people-behind-number"); + var behindNumber = behindNumberElement.html(); + if (behindNumber == "") { + behindNumberElement.html("0"); + } jQuery(".gradient-text").empty(); if (data.response == "subscriber_created") { ga('send', 'event', 'Waitlist', 'Sign Up', 'Waitlist'); From e1e029f03308cb871f6f64b76e9ef66148712d07 Mon Sep 17 00:00:00 2001 From: Adrian Tiberius Date: Sun, 18 Sep 2016 08:16:17 +0300 Subject: [PATCH 04/10] fix waitlist.html maitre links --- src/post-receive.php | 2 +- src/waitlist.html | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/post-receive.php b/src/post-receive.php index e283501..2351d6e 100644 --- a/src/post-receive.php +++ b/src/post-receive.php @@ -8,7 +8,7 @@ if ( $_SERVER['HTTP_X_GITHUB_EVENT'] == 'push' ) { if( ($fp = popen($command, "r")) ) { while( !feof($fp) ){ $result = fread($fp, 1024); - file_put_contents("build.log", $result, FILE_APPEND); + file_put_contents("/var/www/status-site/build.log", $result, FILE_APPEND); echo $result; flush(); } diff --git a/src/waitlist.html b/src/waitlist.html index 6582606..b0ba0ef 100644 --- a/src/waitlist.html +++ b/src/waitlist.html @@ -100,11 +100,16 @@ }, afterSuccess: function(data, form) { + console.log(data); jQuery(".status-text").removeClass('shown'); jQuery("#maitre-verification").html( "Remember to confirm your email to be added to the signup queue.
Improve your position by referring your friends and spreading the word."); + + var emailLink = "mailto:?&subject=Ethereum Mobile Client&body=Hey,%20I%20just%20signed%20up%20to%20Status%20-%20it's%20mobile%20client%20built%20on%20Ethereum,%20check%20it%20out!%20https%3A//status.im/invite/" + data.code; + var twitterLink = "https://twitter.com/home?status=I%20just%20signed%20up%20to%20%40ethstatus%20-%20an%20%23ethereum%20%23dapps%20browser%20for%20mobile%3A%20https%3A//status.im/invite/" + data.code; + var facebookLink = "http://www.facebook.com/sharer.php?u=https%3A//status.im/invite/" + data.code; jQuery("#maitre-share-container").html( - ''); + ''); var behindNumberElement = jQuery("#maitre-people-behind-number"); var behindNumber = behindNumberElement.html(); if (behindNumber == "") { From a659dea1803c2dc786e6e9bfbc28ad8e2439fc73 Mon Sep 17 00:00:00 2001 From: Adrian Tiberius Date: Sun, 18 Sep 2016 08:37:18 +0300 Subject: [PATCH 05/10] fix email icon & removed debug message --- src/sass/index.scss | 4 ++++ src/waitlist.html | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sass/index.scss b/src/sass/index.scss index 3165e5e..dd2270a 100644 --- a/src/sass/index.scss +++ b/src/sass/index.scss @@ -971,6 +971,10 @@ footer { background-image: url('../img/icon-github.svg'); } +.icon-email { + background-image: url("../img/icon-email.svg"); +} + .icon-twitter { background-image: url('../img/icon-twitter.svg'); } diff --git a/src/waitlist.html b/src/waitlist.html index b0ba0ef..06b16d2 100644 --- a/src/waitlist.html +++ b/src/waitlist.html @@ -100,7 +100,6 @@ }, afterSuccess: function(data, form) { - console.log(data); jQuery(".status-text").removeClass('shown'); jQuery("#maitre-verification").html( "Remember to confirm your email to be added to the signup queue.
Improve your position by referring your friends and spreading the word."); From 824c0b88556860ec03089f9bd7177e7087096ac5 Mon Sep 17 00:00:00 2001 From: Adrian Tiberius Date: Sun, 18 Sep 2016 08:57:20 +0300 Subject: [PATCH 06/10] add copy to clipboard on input click --- src/js/common.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/js/common.js b/src/js/common.js index 0da8bd0..aa1cee9 100755 --- a/src/js/common.js +++ b/src/js/common.js @@ -88,7 +88,7 @@ $(function() { fade: { crossFade: true } -}); + }); var swiper2 = new Swiper('.swiper2', { loop: true, autoplay: 2000, @@ -108,6 +108,22 @@ $(function() { setTimeout(function(){ $('#maitre-field-email input').focus(); },1000); -}); + }); + var shareLinkInput = $("#shareLinkInput"); + + shareLinkInput.click(function(test) { + shareLinkInput.focus(); + console.log(shareLinkInput); + console.log(test); + shareLinkInput[0].setSelectionRange(0, shareLinkInput.val().length); + try { + succeeded = document.execCommand('copy'); + } catch (err) { + succeeded = false; + } + if (!succeeded) { + // Browser doesn't support execCommand + } + }); }); From 2dfe6c7f7ca44a0cfe85784328e2a9d6a5644855 Mon Sep 17 00:00:00 2001 From: Adrian Tiberius Date: Sun, 18 Sep 2016 09:04:31 +0300 Subject: [PATCH 07/10] removed debug messages --- src/js/common.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/js/common.js b/src/js/common.js index aa1cee9..102b92b 100755 --- a/src/js/common.js +++ b/src/js/common.js @@ -113,8 +113,6 @@ $(function() { shareLinkInput.click(function(test) { shareLinkInput.focus(); - console.log(shareLinkInput); - console.log(test); shareLinkInput[0].setSelectionRange(0, shareLinkInput.val().length); try { succeeded = document.execCommand('copy'); From 9148196a6ffc6f2428da9c0950e381f3fbf1d731 Mon Sep 17 00:00:00 2001 From: Adrian Tiberius Date: Sun, 18 Sep 2016 09:21:23 +0300 Subject: [PATCH 08/10] test deploy --- src/post-receive.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/post-receive.php b/src/post-receive.php index 2351d6e..d8823ce 100644 --- a/src/post-receive.php +++ b/src/post-receive.php @@ -3,7 +3,7 @@ $command = "cd /var/www/status-site && git reset --hard HEAD && git pull origin // TODO check against ip or secret hash -if ( $_SERVER['HTTP_X_GITHUB_EVENT'] == 'push' ) { +if ( $_SERVER['X-GitHub-Event'] == 'push' ) { if( ($fp = popen($command, "r")) ) { while( !feof($fp) ){ From 1f0c95e40d028e649a4f8eb2d5cd5de5d7478471 Mon Sep 17 00:00:00 2001 From: Adrian Tiberius Date: Sun, 18 Sep 2016 09:37:27 +0300 Subject: [PATCH 09/10] add deploy debug logs --- src/post-receive.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/post-receive.php b/src/post-receive.php index d8823ce..7d754d0 100644 --- a/src/post-receive.php +++ b/src/post-receive.php @@ -2,13 +2,16 @@ $command = "cd /var/www/status-site && git reset --hard HEAD && git pull origin master && gulp build"; // TODO check against ip or secret hash - +$log_file = "/var/www/status-site/build.log"; +file_put_contents($log_file, var_export($_SERVER, true), FILE_APPEND); +$content = file_get_contents("php://input"); +file_put_contents($log_file, var_export($content, true), FILE_APPEND); if ( $_SERVER['X-GitHub-Event'] == 'push' ) { if( ($fp = popen($command, "r")) ) { while( !feof($fp) ){ $result = fread($fp, 1024); - file_put_contents("/var/www/status-site/build.log", $result, FILE_APPEND); + file_put_contents($log_file, $result, FILE_APPEND); echo $result; flush(); } From 32c58924843a8388f72710248161407ac85f8165 Mon Sep 17 00:00:00 2001 From: Adrian Tiberius Date: Sun, 18 Sep 2016 14:49:02 +0300 Subject: [PATCH 10/10] revert key change --- src/post-receive.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/post-receive.php b/src/post-receive.php index 7d754d0..1b0b4a5 100644 --- a/src/post-receive.php +++ b/src/post-receive.php @@ -6,7 +6,7 @@ $log_file = "/var/www/status-site/build.log"; file_put_contents($log_file, var_export($_SERVER, true), FILE_APPEND); $content = file_get_contents("php://input"); file_put_contents($log_file, var_export($content, true), FILE_APPEND); -if ( $_SERVER['X-GitHub-Event'] == 'push' ) { +if ( $_SERVER['HTTP_X_GITHUB_EVENT'] == 'push' ) { if( ($fp = popen($command, "r")) ) { while( !feof($fp) ){