Skip to content

Commit c6f6454

Browse files
committed
Merge pull request #1742 from uProxy/release-candidate
Release v0.8.14
2 parents 3e7d3ed + 40c18be commit c6f6454

35 files changed

+346
-340
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uProxy",
3-
"version": "0.8.13",
3+
"version": "0.8.14",
44
"dependencies": {
55
"polymer": "^0.5.6",
66
"paper-elements": "Polymer/paper-elements#^0.5.6",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "uProxy",
33
"description": "Share your pathway to the Internet",
4-
"version": "0.8.13",
4+
"version": "0.8.14",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/uproxy/uproxy"
@@ -47,7 +47,7 @@
4747
"lodash": "^3.7.0",
4848
"regex2dfa": "^0.1.6",
4949
"tsd": "^0.5.7",
50-
"uproxy-lib": "^27.2.5",
50+
"uproxy-lib": "^28.0.0",
5151
"utransformers": "^0.2.1",
5252
"xregexp": "^2.0.0"
5353
},

src/chrome/app/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "__MSG_appName__",
44
"description": "__MSG_appDescription__",
55
"minimum_chrome_version": "41.0.2272.63",
6-
"version": "0.8.13",
6+
"version": "0.8.14",
77
"default_locale": "en",
88
"icons": {
99
"128": "icons/128_online.png"

src/chrome/extension/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "__MSG_extName__",
3-
"version": "0.8.13",
3+
"version": "0.8.14",
44
"manifest_version": 2,
55
"description": "__MSG_extDescription__",
66
"minimum_chrome_version": "41.0.2272.63",

src/chrome/extension/scripts/background.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ import UiApi = require('../../../interfaces/ui');
1515
import user_interface = require('../../../generic_ui/scripts/ui');
1616
import CoreConnector = require('../../../generic_ui/scripts/core_connector');
1717
import uproxy_core_api = require('../../../interfaces/uproxy_core_api');
18+
import Constants = require('../../../generic_ui/scripts/constants');
1819

1920
/// <reference path='../../../freedom/typings/social.d.ts' />
2021
/// <reference path='../../../third_party/typings/chrome/chrome.d.ts'/>
2122

22-
export import model = user_interface.model;
23-
2423
// --------------------- Communicating with the App ----------------------------
2524
export var browserConnector :ChromeCoreConnector; // way for ui to speak to a uProxy.CoreApi
2625
export var core :CoreConnector; // way for ui to speak to a uProxy.CoreApi
@@ -63,13 +62,25 @@ chrome.runtime.onMessageExternal.addListener((request :any, sender :chrome.runti
6362
* updates from the Chrome App side propogate to the UI.
6463
*/
6564
browserApi = new ChromeBrowserApi();
65+
browserConnector = new ChromeCoreConnector({ name: 'uproxy-extension-to-app-port' });
66+
browserConnector.onUpdate(uproxy_core_api.Update.LAUNCH_UPROXY,
67+
browserApi.bringUproxyToFront);
68+
6669
// TODO (lucyhe): Make sure that the "install" event isn't missed if we
6770
// are adding the listener after the event is fired.
6871
chrome.runtime.onInstalled.addListener((details :chrome.runtime.InstalledDetails) => {
6972
if (details.reason !== 'install') {
7073
// we only want to launch the window on the first install
7174
return;
7275
}
76+
browserConnector.onceConnected.then(() => {
77+
chrome.browserAction.setIcon({
78+
path: {
79+
"19" : "icons/19_" + Constants.DEFAULT_ICON,
80+
"38" : "icons/38_" + Constants.DEFAULT_ICON,
81+
}
82+
});
83+
});
7384

7485
chrome.tabs.query({currentWindow: true, active: true}, function(tabs){
7586
// Do not open the extension when it's installed if the user is
@@ -85,10 +96,6 @@ chrome.browserAction.onClicked.addListener((tab) => {
8596
browserApi.bringUproxyToFront();
8697
});
8798

88-
browserConnector = new ChromeCoreConnector({ name: 'uproxy-extension-to-app-port' });
89-
browserConnector.onUpdate(uproxy_core_api.Update.LAUNCH_UPROXY,
90-
browserApi.bringUproxyToFront);
91-
9299
core = new CoreConnector(browserConnector);
93100
var oAuth = new ChromeTabAuth();
94101
browserConnector.onUpdate(uproxy_core_api.Update.GET_CREDENTIALS,

src/chrome/extension/scripts/chrome_browser_api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class ChromeBrowserApi implements BrowserAPI {
5757

5858
private popupState_ = PopupState.NOT_LAUNCHED;
5959

60-
public fulfillLaunched : () => void;
60+
public handlePopupLaunch :() => void;
6161
private onceLaunched_ :Promise<void>;
6262

6363
constructor() {
@@ -169,7 +169,7 @@ class ChromeBrowserApi implements BrowserAPI {
169169
// after webstore installation), then allow the popup to open at a default
170170
// location.
171171
this.onceLaunched_ = new Promise<void>((F, R) => {
172-
this.fulfillLaunched = F;
172+
this.handlePopupLaunch = F;
173173
});
174174
chrome.windows.create({url: this.POPUP_URL,
175175
type: "popup",

src/chrome/extension/scripts/chrome_core_connector.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ describe('core-connector', () => {
3939
chromeBrowserApi = jasmine.createSpyObj('ChromeBrowserApi',
4040
['bringUproxyToFront',
4141
'showNotification',
42-
'on']);
42+
'on',
43+
'handlePopupLaunch']);
4344

4445

4546

src/chrome/extension/scripts/chrome_tab_auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class ChromeTabAuth {
3434
}
3535
};
3636

37-
var isActive = !user_interface.model.reconnecting;
37+
var isActive = true; //TODO use actual value
3838
chrome.tabs.create({url: url, active: isActive},
3939
function(tab: chrome.tabs.Tab) {
4040
if (isActive) {

src/chrome/extension/scripts/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export var browserConnector :browser_connector.CoreBrowserConnector = ui_context
1313

1414
export var ui :user_interface.UserInterface = new user_interface.UserInterface(core, ui_context.browserApi);
1515

16-
export var model :user_interface.Model = user_interface.model;
16+
export var model :user_interface.Model = ui.model;
1717

1818
ui.browser = 'chrome';
1919
console.log('Loaded dependencies for Chrome Extension.');

src/firefox/data/scripts/background.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import CoreConnector = require('../../../generic_ui/scripts/core_connector');
33
import FirefoxCoreConnector = require('./firefox_connector');
44
import FirefoxBrowserApi = require('./firefox_browser_api');
55

6-
export import model = user_interface.model;
76
export var ui :user_interface.UserInterface;
87
export var core :CoreConnector;
98
export var browserConnector: FirefoxCoreConnector;
9+
export var model :user_interface.Model;
1010
function initUI() {
1111
browserConnector = new FirefoxCoreConnector();
1212
core = new CoreConnector(browserConnector);
@@ -17,6 +17,7 @@ function initUI() {
1717

1818
if (undefined === ui) {
1919
ui = initUI();
20+
model = ui.model;
2021
}
2122

2223
ui.browser = 'firefox';

0 commit comments

Comments
 (0)