Commit 3c288bf4 authored by Olivia Madrid's avatar Olivia Madrid

(wip): Referrals console - finalize sms protocol syntax

1 merge request!388WIP: epic/referrals
Pipeline #70184557 running with stages
......@@ -87,37 +87,7 @@
<path d="m17.42 18.99c.14-.12.86-.76 2.08-1.86l10.43 8.66h-27.76l10.35-8.67c1.24 1.1 1.98 1.74 2.12 1.85.83.65 1.93.63 2.78.02m11.89-10.67-4.83 4.34c-1.51 1.35-2.8 2.51-3.86 3.46l10.35 8.6c.01.01.01.02.02.03v-17.81c0-.04-.02-.07-.02-.11a3.73 3.73 0 0 0 -.08.07zm-25.19-.7a5347.74 5347.74 0 0 0 4.69 4.19c3.94 3.52 6.51 5.79 6.75 5.97a.76.76 0 0 0 .92.03c.21-.18 2.82-2.52 7.01-6.28l4.82-4.33 1.35-1.21h-27.37l.29.26zm3.66 5.28a4436.65 4436.65 0 0 1 -4.66-4.16c-.56-.5-1.07-.96-1.53-1.37l-.57-.51c0 .03-.01.05-.01.07v17.89l10.38-8.7c-1-.89-2.2-1.95-3.61-3.20" fill-rule="evenodd"></path>
</svg>
</button>
</div>
<div class="smsTests"><h4>SMS PROTOCOL TESTS</h4>
<!-- Doesn't work on my android // works on brian's ipad-->
<button i18n-title="@@M_REFERRALS__SHARE_BUTTON_SMS" title="SMS" class="m-referrals-links__shareButton m-referrals-links__shareButton--sms"
(click)="openWindow('sms:&body=Join me on Minds%20%f0%9f%92%a1%20' + this.encodedRegisterUrl)"
>
1[&]
</button>
<!-- Works on my android -->
<button i18n-title="@@M_REFERRALS__SHARE_BUTTON_SMS" title="SMS" class="m-referrals-links__shareButton m-referrals-links__shareButton--sms"
(click)="openWindow('sms:?body=Join me on Minds%20%f0%9f%92%a1%20' + this.encodedRegisterUrl)"
>
2[?]
</button>
<!-- Works on my android, works on brian's ipad -->
<button i18n-title="@@M_REFERRALS__SHARE_BUTTON_SMS" title="SMS" class="m-referrals-links__shareButton m-referrals-links__shareButton--sms"
(click)="openWindow('sms:?&body=Join me on Minds%20%f0%9f%92%a1%20' + this.encodedRegisterUrl)"
>
3[?&]
</button>
<!-- Doesn't work on my android -->
<button i18n-title="@@M_REFERRALS__SHARE_BUTTON_SMS" title="SMS" class="m-referrals-links__shareButton m-referrals-links__shareButton--sms"
(click)="openWindow('sms:;body=Join me on Minds%20%f0%9f%92%a1%20' + this.encodedRegisterUrl)"
>
4[;]
</button>
</div>
</div>
</div>
<div class="m-referrals-links__modalLinks" *ngIf="isModal">
<div>
......
......@@ -159,15 +159,4 @@
margin-right: $minds-padding * 2;
}
}
.smsTests {
margin-top: 24px;
button {
cursor: pointer;
margin: 8px;
padding: 4px;
@include m-theme(){
color: themed($m-white);
}
}
}
}
......@@ -21,7 +21,6 @@ export class ReferralsLinksComponent implements OnInit, OnDestroy {
emailAddress = '';
encodedFacebookAppId = '';
smsProtocolParamPrefix = '?'; // Android by default, iOS is '&'
registerUrlTimeout;
referrerParamTimeout;
......@@ -92,14 +91,8 @@ export class ReferralsLinksComponent implements OnInit, OnDestroy {
}
openSMS() {
// No support for iOS 6 + 7
const ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('iphone') > -1 || ua.indexOf('ipad') > -1 || ua.indexOf('ipod') > -1) {
this.smsProtocolParamPrefix = '&'; // android '?' is default
}
this.openWindow(
'sms:' + this.smsProtocolParamPrefix + 'body=Join me on Minds%20%f0%9f%92%a1%20' + this.encodedRegisterUrl
'sms:?&body=Join me on Minds%20%f0%9f%92%a1%20' + this.encodedRegisterUrl
);
}
......@@ -130,7 +123,7 @@ export class ReferralsLinksComponent implements OnInit, OnDestroy {
}
}
// Makes copyable link container appear 'focused' when you click on it
// Makes copyable link container appear focused when you click on it
// Receives the inputElement to be focused and linkType ('registerUrl' || 'referrerParam')
applyFocus(inputElement, linkType) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment