Solving chrome app problems
This commit is contained in:
parent
bbd00cf2d6
commit
40910c3b34
11 changed files with 204 additions and 45 deletions
|
|
@ -7,6 +7,18 @@ angular.module('copayApp.controllers').controller('SettingsController', function
|
|||
$scope.insightTestnet = config.network.testnet.url;
|
||||
$scope.defaultLogLevel = config.logLevel || 'log';
|
||||
|
||||
|
||||
var localStorage;
|
||||
|
||||
var isChromeApp = window.chrome && chrome.runtime && chrome.runtime.id;
|
||||
if (isChromeApp) {
|
||||
console.log('Is a chrome app!');
|
||||
localStorage = chrome.storage.local;
|
||||
} else {
|
||||
console.log('Is web!');
|
||||
localStorage = window.localStorage;
|
||||
}
|
||||
|
||||
var logLevels = copay.logger.getLevels();
|
||||
|
||||
$scope.availableLogLevels = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue