Skip to content

Commit 9ff1dd1

Browse files
authored
Merge branch 'master' into user-cleanup
2 parents 7023f56 + 98e4775 commit 9ff1dd1

29 files changed

+282
-358
lines changed

Gruntfile.coffee

Lines changed: 17 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -603,28 +603,19 @@ gruntConfig = {
603603
Rule.copyLibs
604604
npmLibNames: ['freedom-for-chrome']
605605
pathsFromDevBuild: ['lib/churn-pipe', 'lib/loggingprovider', 'lib/zork']
606-
pathsFromThirdPartyBuild: [
607-
'uproxy-obfuscators',
608-
'freedom-port-control'
609-
]
606+
pathsFromThirdPartyBuild: ['freedom-port-control']
610607
localDestPath: 'lib/samples/zork-chromeapp/'
611608
libsForZorkFirefoxApp:
612609
Rule.copyLibs
613610
npmLibNames: ['freedom-for-firefox']
614611
pathsFromDevBuild: ['lib/churn-pipe', 'lib/loggingprovider', 'lib/zork']
615-
pathsFromThirdPartyBuild: [
616-
'uproxy-obfuscators',
617-
'freedom-port-control'
618-
]
612+
pathsFromThirdPartyBuild: ['freedom-port-control']
619613
localDestPath: 'lib/samples/zork-firefoxapp/data/'
620614
libsForZorkNode:
621615
Rule.copyLibs
622616
npmLibNames: ['freedom-for-node']
623617
pathsFromDevBuild: ['lib/churn-pipe', 'lib/loggingprovider', 'lib/zork']
624-
pathsFromThirdPartyBuild: [
625-
'uproxy-obfuscators',
626-
'freedom-port-control'
627-
]
618+
pathsFromThirdPartyBuild: ['freedom-port-control']
628619
localDestPath: 'lib/samples/zork-node/'
629620

630621
libsForEchoServerChromeApp:
@@ -637,30 +628,29 @@ gruntConfig = {
637628
npmLibNames: ['freedom-for-firefox']
638629
pathsFromDevBuild: ['lib/echo', 'lib/loggingprovider']
639630
localDestPath: 'lib/samples/echo-server-firefoxapp/data/'
631+
libsForEchoServerNode:
632+
Rule.copyLibs
633+
npmLibNames: ['freedom-for-node']
634+
pathsFromDevBuild: ['lib/echo', 'lib/loggingprovider']
635+
localDestPath: 'lib/samples/echo-server-node/'
640636

641637
libsForCopypasteChatChromeApp:
642638
Rule.copyLibs
643639
npmLibNames: ['freedom-for-chrome']
644640
pathsFromDevBuild: ['lib/copypaste-chat', 'lib/churn-pipe', 'lib/loggingprovider']
645-
pathsFromThirdPartyBuild: [
646-
'freedom-port-control'
647-
]
641+
pathsFromThirdPartyBuild: ['freedom-port-control']
648642
localDestPath: 'lib/samples/copypaste-chat-chromeapp/'
649643
libsForCopypasteChatFirefoxApp:
650644
Rule.copyLibs
651645
npmLibNames: ['freedom-for-firefox']
652646
pathsFromDevBuild: ['lib/copypaste-chat', 'lib/churn-pipe', 'lib/loggingprovider']
653-
pathsFromThirdPartyBuild: [
654-
'freedom-port-control'
655-
]
647+
pathsFromThirdPartyBuild: ['freedom-port-control']
656648
localDestPath: 'lib/samples/copypaste-chat-firefoxapp/data'
657649
libsForCopypasteChatWebApp:
658650
Rule.copyLibs
659651
npmLibNames: ['freedom']
660652
pathsFromDevBuild: ['lib/copypaste-chat', 'lib/churn-pipe', 'lib/loggingprovider']
661-
pathsFromThirdPartyBuild: [
662-
'freedom-port-control'
663-
]
653+
pathsFromThirdPartyBuild: ['freedom-port-control']
664654
localDestPath: 'lib/samples/copypaste-chat-webapp/'
665655

666656
libsForCopyPasteSocksChromeApp:
@@ -670,7 +660,6 @@ gruntConfig = {
670660
]
671661
pathsFromDevBuild: ['lib/copypaste-socks', 'lib/churn-pipe', 'lib/loggingprovider']
672662
pathsFromThirdPartyBuild: [
673-
'uproxy-obfuscators'
674663
'i18n'
675664
'bower/polymer'
676665
'freedom-pgp-e2e'
@@ -684,7 +673,6 @@ gruntConfig = {
684673
]
685674
pathsFromDevBuild: ['lib/copypaste-socks', 'lib/churn-pipe', 'lib/loggingprovider']
686675
pathsFromThirdPartyBuild: [
687-
'uproxy-obfuscators'
688676
'i18n'
689677
'bower'
690678
'freedom-pgp-e2e'
@@ -696,36 +684,26 @@ gruntConfig = {
696684
Rule.copyLibs
697685
npmLibNames: ['freedom-for-chrome']
698686
pathsFromDevBuild: ['lib/simple-socks', 'lib/churn-pipe', 'lib/loggingprovider']
699-
pathsFromThirdPartyBuild: [
700-
'uproxy-obfuscators'
701-
'freedom-port-control'
702-
]
687+
pathsFromThirdPartyBuild: ['freedom-port-control']
703688
localDestPath: 'lib/samples/simple-socks-chromeapp/'
704689
libsForSimpleSocksFirefoxApp:
705690
Rule.copyLibs
706691
npmLibNames: ['freedom-for-firefox']
707692
pathsFromDevBuild: ['lib/simple-socks', 'lib/churn-pipe', 'lib/loggingprovider']
708-
pathsFromThirdPartyBuild: [
709-
'uproxy-obfuscators'
710-
'freedom-port-control'
711-
]
693+
pathsFromThirdPartyBuild: ['freedom-port-control']
712694
localDestPath: 'lib/samples/simple-socks-firefoxapp/data/'
713695

714696
libsForSimpleChatChromeApp:
715697
Rule.copyLibs
716698
npmLibNames: ['freedom-for-chrome']
717699
pathsFromDevBuild: ['lib/simple-chat', 'lib/churn-pipe', 'lib/loggingprovider']
718-
pathsFromThirdPartyBuild: [
719-
'freedom-port-control'
720-
]
700+
pathsFromThirdPartyBuild: ['freedom-port-control']
721701
localDestPath: 'lib/samples/simple-chat-chromeapp/'
722702
libsForSimpleChatFirefoxApp:
723703
Rule.copyLibs
724704
npmLibNames: ['freedom-for-firefox']
725705
pathsFromDevBuild: ['lib/simple-chat', 'lib/churn-pipe', 'lib/loggingprovider']
726-
pathsFromThirdPartyBuild: [
727-
'freedom-port-control'
728-
]
706+
pathsFromThirdPartyBuild: ['freedom-port-control']
729707
localDestPath: 'lib/samples/simple-chat-firefoxapp/data'
730708
# While neither churn-pipe nor freedom-port-control can be used in a
731709
# regular web page environment, they are included so that obfuscation
@@ -734,9 +712,7 @@ gruntConfig = {
734712
Rule.copyLibs
735713
npmLibNames: ['freedom']
736714
pathsFromDevBuild: ['lib/simple-chat', 'lib/churn-pipe', 'lib/loggingprovider']
737-
pathsFromThirdPartyBuild: [
738-
'freedom-port-control'
739-
]
715+
pathsFromThirdPartyBuild: ['freedom-port-control']
740716
localDestPath: 'lib/samples/simple-chat-webapp/'
741717

742718
libsForUprobeChromeApp:
@@ -1050,6 +1026,7 @@ taskManager.add 'echoServer', [
10501026
'browserify:echoServerFreedomModule'
10511027
'copy:libsForEchoServerChromeApp'
10521028
'copy:libsForEchoServerFirefoxApp'
1029+
'copy:libsForEchoServerNode'
10531030
]
10541031

10551032
taskManager.add 'copypasteChat', [

src/cca/app/scripts/context.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
/// <reference path='../../../../../third_party/typings/browser.d.ts'/>
22
/// <reference path='../../../generic_ui/polymer/context.d.ts' />
33

4+
import background_ui = require('../../../generic_ui/scripts/background_ui');
45
import ui_model = require('../../../generic_ui/scripts/model');
56
import user_interface = require('../../../generic_ui/scripts/ui');
67
import CoreConnector = require('../../../generic_ui/scripts/core_connector');
78
import CordovaCoreConnector = require('./cordova_core_connector');
9+
import same_context_panel_connector = require('../../../generic_ui/scripts/same_context_panel_connector');
810

911
export var browserConnector = new CordovaCoreConnector({
1012
name: 'uproxy-ui-to-core-connector'
@@ -13,9 +15,12 @@ export var core = new CoreConnector(browserConnector);
1315
export var ui :user_interface.UserInterface;
1416
export var model :ui_model.Model;
1517

18+
export var panelConnector = new same_context_panel_connector.SameContextPanelConnector();
19+
var backgroundUi = new background_ui.BackgroundUi(panelConnector, core);
20+
1621
chrome.runtime.getBackgroundPage((bgPage) => {
1722
var ui_context = (<any>bgPage).ui_context;
18-
ui = new user_interface.UserInterface(core, ui_context.browserApi, ui_context.backgroundUi);
23+
ui = new user_interface.UserInterface(core, ui_context.browserApi, backgroundUi);
1924
model = ui.model;
2025
console.log('Got references from background page; importing vulcanized');
2126

src/firefox/data/scripts/background.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import background_ui = require('../../../generic_ui/scripts/background_ui');
22
import CoreConnector = require('../../../generic_ui/scripts/core_connector');
33
import FirefoxBrowserApi = require('./firefox_browser_api');
44
import FirefoxCoreConnector = require('./firefox_connector');
5-
import firefox_panel_connector = require('./firefox_panel_connector');
65
import ui_model = require('../../../generic_ui/scripts/model');
76
import panel_connector = require('../../../interfaces/panel_connector');
87
import port = require('./port');
8+
import same_context_panel_connector = require('../../../generic_ui/scripts/same_context_panel_connector');
99
import user_interface = require('../../../generic_ui/scripts/ui');
1010

1111
export var ui :user_interface.UserInterface;
@@ -19,7 +19,7 @@ function initUI() {
1919
browserConnector = new FirefoxCoreConnector();
2020
core = new CoreConnector(browserConnector);
2121
firefoxBrowserApi = new FirefoxBrowserApi();
22-
panelConnector = new firefox_panel_connector.FirefoxPanelConnector();
22+
panelConnector = new same_context_panel_connector.SameContextPanelConnector();
2323
var backgroundUi = new background_ui.BackgroundUi(panelConnector, core);
2424

2525
return new user_interface.UserInterface(core, firefoxBrowserApi, backgroundUi);

src/generic_core/uproxy_core.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,22 @@ export class uProxyCore implements uproxy_core_api.CoreApi {
311311
return globals.loadSettings.then(() => {
312312
var copyPasteConnectionState = copyPasteConnection.getCurrentState();
313313

314+
let moveToFront = (array :string[], element :string) :void => {
315+
let i = array.indexOf(element);
316+
if (i < 1) return;
317+
array.splice(0, 0, array.splice(i, 1)[0] );
318+
};
319+
320+
let networkNames = Object.keys(social_network.networks);
321+
322+
for (let name of ['Quiver', 'Cloud']) {
323+
if (name in social_network.networks) {
324+
moveToFront(networkNames, name);
325+
}
326+
}
327+
314328
return {
315-
networkNames: Object.keys(social_network.networks),
329+
networkNames: networkNames,
316330
cloudProviderNames: getCloudProviderNames(),
317331
globalSettings: globals.settings,
318332
onlineNetworks: social_network.getOnlineNetworks(),

src/generic_ui/locales/en/messages.json

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,9 @@
819819
"description": "Invite instructions for the uProxy Network (aka Quiver)",
820820
"message": "Generate a link and send it to your friends so they can find you on uProxy. You can request access, offer access or both."
821821
},
822+
"NETWORK_LIST_CLOUD_LABEL": {
823+
"message": "Create a private cloud server"
824+
},
822825
"ADD_A_CLOUD_FRIEND": {
823826
"description": "Title for screen where user adds a Cloud instance (virtual machine) to use uProxy with",
824827
"message": "Add a Cloud friend"
@@ -1241,7 +1244,7 @@
12411244
},
12421245
"CREATE_A_NEW_ACCOUNT": {
12431246
"description": "Button text for creating a new account (e.g. for DigitalOcean)",
1244-
"message": "Create a new account"
1247+
"message": "Create a DigitalOcean account"
12451248
},
12461249
"SIGN_IN_AND_CONNECT": {
12471250
"description": "Button text for signing into DigitalOcean",
@@ -1301,15 +1304,19 @@
13011304
},
13021305
"CLOUD_INSTALL_GET_STARTED_TITLE": {
13031306
"description": "Message shown during DigitalOcean server deployment",
1304-
"message": "uProxy now allows you to create a private cloud server through DigitalOcean."
1307+
"message": "Create a private cloud server on DigitalOcean through uProxy."
13051308
},
13061309
"CLOUD_INSTALL_GET_STARTED_MESSAGE": {
13071310
"description": "Message shown during DigitalOcean server deployment",
1308-
"message": "For $10 per month you can get and share access with your friends and family. If you sign up with uProxy, your first month is free! Create a new account or sign in to connect and share access. <uproxy-faq-link anchor='whatAreCloudServers'>Learn more.</uproxy-faq-link>"
1311+
"message": "For $10 per month you can get and share access with your friends and family. If you sign up for DigitalOcean with uProxy, your first month is free! <uproxy-faq-link anchor='whatAreCloudServers'>Learn more.</uproxy-faq-link>"
1312+
},
1313+
"CLOUD_INSTALL_EXISTING_SERVER_TITLE": {
1314+
"description": "Title for 'already have a cloud server' section",
1315+
"message": "Already have a cloud server?"
13091316
},
13101317
"CLOUD_INSTALL_EXISTING_SERVER_MESSAGE": {
13111318
"description": "Instructions link for users who already have an existing cloud server.",
1312-
"message": "Already have a cloud server? <uproxy-faq-link anchor='howDoInstallUproxyOnServer'>Learn how</uproxy-faq-link> to use it with uProxy."
1319+
"message": "You can manually set up your own uProxy server. <uproxy-faq-link anchor='howDoInstallUproxyOnServer'>Learn how</uproxy-faq-link>"
13131320
},
13141321
"CLOUD_INSTALL_INVITE_SCREEN_TITLE": {
13151322
"description": "Message shown on invite screen for DigitalOcean server deployment",
@@ -1321,19 +1328,15 @@
13211328
},
13221329
"I_HAVE_AN_ACCOUNT": {
13231330
"description": "Button text shown during DigitalOcean server deployment",
1324-
"message": "I have an account"
1331+
"message": "I have a DigitalOcean account"
13251332
},
13261333
"SIGN_ME_IN": {
13271334
"description": "Button text shown during DigitalOcean server deployment",
13281335
"message": "Sign me in!"
13291336
},
1330-
"EMPTY_ROSTER_CLOUD_INSTRUCTIONS": {
1331-
"description": "Instructions shown for cloud when the user has an empty roster",
1332-
"message": "Create a private cloud server and share access with friends & family"
1333-
},
1334-
"EMPTY_ROSTER_PEER_TO_PEER_INSTRUCTIONS": {
1335-
"description": "Instructions shown for peer-to-peer when the user has an empty roster",
1336-
"message": "Get or share access with family & friends."
1337+
"EMPTY_ROSTER_INSTRUCTIONS": {
1338+
"description": "Instructions shown when the user has an empty roster",
1339+
"message": "Get and share access from a friend or a private cloud server."
13371340
},
13381341
"ASIA_SINGAPORE": {
13391342
"description": "Region option for deploying a DigitalOcean server",

src/generic_ui/polymer/button.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
:host {
77
background: #12A391;
88
color: white;
9+
text-transform: none;
910
}
1011
</style>
1112
<shadow></shadow>

src/generic_ui/polymer/cloud-install.html

Lines changed: 15 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
width: 100%;
1818
background-color: white;
1919
}
20-
uproxy-button {
21-
margin: 15px 0px;
22-
}
2320
paper-progress {
2421
width: 100%;
2522
}
@@ -32,20 +29,25 @@
3229
}
3330
uproxy-button {
3431
background-color: #34AFCE; /* blue */
32+
margin: 4px 0;
3533
padding: 0.5em;
3634
width: 100%;
3735
font-size: 14px;
3836
}
37+
paper-checkbox {
38+
margin: 0 0 4px;
39+
}
40+
hr {
41+
margin: 20px 0;
42+
color: #eee;
43+
border-style: solid;
44+
}
3945
h1 {
40-
color: #34AFCE; /* blue */
46+
color: #003C48;
4147
font-weight: 400;
4248
font-size: 20px;
4349
line-height: 30px;
4450
}
45-
h2 {
46-
font-weight: 400;
47-
font-size: 23px;
48-
}
4951
p {
5052
line-height: 1.75em;
5153
}
@@ -73,12 +75,6 @@
7375
.warning {
7476
font-weight: bold;
7577
}
76-
#newAccount {
77-
margin: 15px 0 8px;
78-
}
79-
#haveAccount {
80-
margin: 0 0 15px;
81-
}
8278
</style>
8379

8480
<core-signals on-core-signal-open-cloud-install='{{ open }}'></core-signals>
@@ -90,44 +86,20 @@
9086

9187
<div class='content'>
9288
<div class='imgWrapper'>
93-
<img src='../../icons/cloud/create-circle-ic.svg'>
89+
<img src='../../icons/cloud/uproxy+digitalocean.svg'>
9490
</div>
9591
<h1>{{ 'CLOUD_INSTALL_GET_STARTED_TITLE' | $$ }}</h1>
9692
<p id='getStartedMessage'></p>
97-
<uproxy-button raised on-tap='{{ showDigitalOceanAccountHelpOverlay }}'
98-
id="newAccount">
99-
{{ 'CREATE_A_NEW_ACCOUNT' | $$ }}
100-
</uproxy-button>
101-
<uproxy-button raised on-tap='{{ showLoginOverlay }}' id="haveAccount">
102-
{{ 'I_HAVE_AN_ACCOUNT' | $$ }}
103-
</uproxy-button>
104-
<p id='existingServerMessage'></p>
105-
</div>
106-
</core-overlay>
107-
108-
<core-overlay id='digitalOceanAccountHelpOverlay'>
109-
<uproxy-app-bar on-go-back='{{ back }}' color='#34AFCE'>
110-
{{ 'CREATE_A_CLOUD_SERVER' | $$ }}
111-
</uproxy-app-bar>
112-
113-
<div class='content'>
114-
<div class='imgWrapper'>
115-
<img src='../../icons/cloud/getstarted-step1.svg'>
116-
<img src='../../icons/cloud/getstarted-step2.svg'>
117-
<img src='../../icons/cloud/getstarted-step3.svg'>
118-
</div>
119-
<h1>{{ 'CLOUD_INSTALL_CREATE_ACCOUNT_TITLE' | $$ }}</h1>
120-
<!-- TODO: some of this text needs to be bold - need to set the HTML element rather than use $$ to translate -->
121-
<p id='createAccountMessage'></p>
122-
12393
<paper-checkbox id='havePromoCode' label="{{ 'HAVE_PROMO_CODE' | $$ }}" on-change="{{havePromoChanged}}"></paper-checkbox>
124-
12594
<uproxy-button raised on-tap='{{ launchDigitalOceanSignup }}'>
12695
{{ 'CREATE_A_NEW_ACCOUNT' | $$ }}
12796
</uproxy-button>
12897
<uproxy-button raised on-tap='{{ showLoginOverlay }}'>
129-
{{ 'SIGN_ME_IN' | $$}}
98+
{{ 'I_HAVE_AN_ACCOUNT' | $$ }}
13099
</uproxy-button>
100+
<hr>
101+
<h1>{{ 'CLOUD_INSTALL_EXISTING_SERVER_TITLE' | $$ }}</h1>
102+
<p id='existingServerMessage'></p>
131103
</div>
132104
</core-overlay>
133105

0 commit comments

Comments
 (0)