diff --git a/dashboard-ui/apiclient/connectionmanager.js b/dashboard-ui/apiclient/connectionmanager.js index 0151445e30..61942732d5 100644 --- a/dashboard-ui/apiclient/connectionmanager.js +++ b/dashboard-ui/apiclient/connectionmanager.js @@ -188,6 +188,9 @@ var existingServer = existingServers.length ? existingServers[0] : {}; existingServer.DateLastAccessed = new Date().getTime(); existingServer.LastConnectionMode = MediaBrowser.ConnectionMode.Manual; + if (existingServer.LastConnectionMode == MediaBrowser.ConnectionMode.Local) { + existingServer.DateLastLocalConnection = new Date().getTime(); + } existingServer.ManualAddress = apiClient.serverAddress(); apiClient.serverInfo(existingServer); @@ -289,6 +292,10 @@ if (options.updateDateLastAccessed !== false) { server.DateLastAccessed = new Date().getTime(); + + if (server.LastConnectionMode == MediaBrowser.ConnectionMode.Local) { + server.DateLastLocalConnection = new Date().getTime(); + } } server.Id = result.ServerId; @@ -1003,10 +1010,15 @@ updateServerInfo(server, systemInfo); + server.LastConnectionMode = connectionMode; + if (options.updateDateLastAccessed !== false) { server.DateLastAccessed = new Date().getTime(); + + if (server.LastConnectionMode == MediaBrowser.ConnectionMode.Local) { + server.DateLastLocalConnection = new Date().getTime(); + } } - server.LastConnectionMode = connectionMode; credentialProvider.addOrUpdateServer(credentials.Servers, server); credentialProvider.credentials(credentials); @@ -1371,19 +1383,27 @@ var match = matchedServers[0]; - // 31 days - if ((new Date().getTime() - (match.DateLastLocalConnection || 0)) > 2678400000) { - deferred.resolveWith(null, [{}]); + if (!match.DateLastLocalConnection) { + + ApiClient.getJSON(ApiClient.getUrl('System/Endpoint')).done(function (info) { + + if (info.IsInNetwork) { + + updateDateLastLocalConnection(match.Id); + onLocalCheckSuccess(feature, apiClient, deferred); + } else { + deferred.resolveWith(null, [{}]); + } + + }).fail(function () { + + deferred.resolveWith(null, [{}]); + }); + return; } - apiClient.getRegistrationInfo(feature).done(function (result) { - - deferred.resolveWith(null, [result]); - }).fail(function () { - - deferred.reject(); - }); + onLocalCheckSuccess(feature, apiClient, deferred); }).fail(function () { @@ -1393,6 +1413,32 @@ return deferred.promise(); }; + function updateDateLastLocalConnection(serverId) { + + var credentials = credentialProvider.credentials(); + var servers = credentials.Servers.filter(function (s) { + return s.Id == serverId; + }); + + var server = servers.length ? servers[0] : null; + + if (server) { + server.DateLastLocalConnection = new Date().getTime(); + credentialProvider.addOrUpdateServer(credentials.Servers, server); + credentialProvider.credentials(credentials); + } + } + + function onLocalCheckSuccess(feature, apiClient, deferred) { + + apiClient.getRegistrationInfo(feature).done(function (result) { + + deferred.resolveWith(null, [result]); + }).fail(function () { + + deferred.reject(); + }); + } return self; }; diff --git a/dashboard-ui/bower_components/doc-ready/.bower.json b/dashboard-ui/bower_components/doc-ready/.bower.json index adda4287b4..d4d75eca65 100644 --- a/dashboard-ui/bower_components/doc-ready/.bower.json +++ b/dashboard-ui/bower_components/doc-ready/.bower.json @@ -39,6 +39,6 @@ "commit": "cec8e49744a1e18b14a711eea77e201bb70de544" }, "_source": "git://github.com/desandro/doc-ready.git", - "_target": "1.0.x", + "_target": "~1.0.4", "_originalSource": "doc-ready" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/eventie/.bower.json b/dashboard-ui/bower_components/eventie/.bower.json index 917d217ea8..6b5b662fdc 100644 --- a/dashboard-ui/bower_components/eventie/.bower.json +++ b/dashboard-ui/bower_components/eventie/.bower.json @@ -30,6 +30,6 @@ "commit": "14d2ca3df97da64c820829a8310f9198fbafbcfa" }, "_source": "git://github.com/desandro/eventie.git", - "_target": "^1", + "_target": "~1.0.3", "_originalSource": "eventie" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/.bower.json b/dashboard-ui/bower_components/iron-a11y-announcer/.bower.json index 50c251b395..1baafa9707 100644 --- a/dashboard-ui/bower_components/iron-a11y-announcer/.bower.json +++ b/dashboard-ui/bower_components/iron-a11y-announcer/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-a11y-announcer", - "version": "1.0.3", + "version": "1.0.4", "description": "A singleton element that simplifies announcing text to screen readers.", "keywords": [ "web-components", @@ -27,14 +27,15 @@ "paper-styles": "polymerelements/paper-styles#^1.0.0", "test-fixture": "polymerelements/test-fixture#^1.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", - "web-component-tester": "*" + "web-component-tester": "polymer/web-component-tester#^3.4.0" }, + "ignore": [], "homepage": "https://github.com/polymerelements/iron-a11y-announcer", - "_release": "1.0.3", + "_release": "1.0.4", "_resolution": { "type": "version", - "tag": "v1.0.3", - "commit": "a5b8161326f11d68eacb5e9ea60694ebd779b48a" + "tag": "v1.0.4", + "commit": "5ce3eb8c4282bb53cd72e348858dc6be6b4c50b9" }, "_source": "git://github.com/polymerelements/iron-a11y-announcer.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/.travis.yml b/dashboard-ui/bower_components/iron-a11y-announcer/.travis.yml new file mode 100644 index 0000000000..2b3df2cd90 --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-announcer/.travis.yml @@ -0,0 +1,22 @@ +language: node_js +sudo: false +before_script: + - npm install web-component-tester + - npm install bower + - 'export PATH=$PWD/node_modules/.bin:$PATH' + - bower install +env: + global: + - secure: lNcOb1qPO7R65VYIQ6ekoc4I8wg98E/DRdqRMGAWrvr9eZ6lbz4hqwVvgnl05Ukc62lFsEGdaykFdcQ5QG5rDxXxh1Dofl8dfE8ohBZzR9gQ5g9808CVVbV/0kfafAMts/KYGVLAuy+30aU/xA+DQ4oR76E1glZOGoz4FDxUotIFpMyPR77HC1WDuFiF/HUOUgs8zO5v02171URdYG33ywVx6n0j1akCKksQ9Odcxn+VF51xziSuP+Hd+mju4j6xiAsvkc8EhdFMTXBKDHH0LEjP6zVLQ+lA4ePX2YxPAocFUcWFlGsfDwLdbY18zrP9vXK0AqpoU0d3hW1bLdxoH+4Fd8WkFzYB5rjtV0jT8BOWjEK+1g7GBzofZYQs+h9kRUoNQA5m7NNo3dz/NM8NxvDCALscH2kWTEYpzvaX/Gy653psOkKe8MRawa6nqgXreaNEn3dtVqlonz3KpgVLJpgBtLYvQDQ8lczntuBw6BlnCZRZw8wy0hLHIIpld/GbxrH1O13XGpT07CAny10wZYMk9J0OiEuMPd23UNdcEXibNnfDS18UKW64JoILqqBMyl10WY6dOqLt7DAd5eDoKqZ/heU3vXFm9/JcebtUB3NmOG+qkgb1UOChEtzxJFCXa3S3NFsLiHra6CgdV78gHM5WizlT0kldecgrlDtz/tQ= + - secure: ig1L3SPuNpnAqzk8wXc8SqprhF7ajVuD1MQa0KfmkCxFZCXSmAHnt9tsuwrkea0J3s3Mmj+UQBI3WX5jsFEAlwNy239uRIUxHTz/tsKznmo5Jf+u/u7jHR4H/x0+kNbA/D56eInlNeR9bwE/72kiWB2ZI9nxHIggNxJrsTK4d+CQC863V763P8sJaBNP7BXq/2igs2/wHgfsF126oKOf0fxMbeBm3tFYB0VBdkLZJvQ+NowZGn/RTvmdAMJZe/UuICf9jTl/YQXp7q3b/hF5h/CMlQckkNoiQZ8FY3yz4yg8eJc2Pe1NjuCYl8YE7nUY+mUX8B/hqB9g05LmKxAdFg1icsq14Rmb54MBa6CsYIPo5ZZNXSeCkiQvfHOOhubnB4lBxDYGSLwFIDwpRtRRkwIzpz/5sul6OP9RR/g0kXnmktFEYbu2/OQk89H2GymOdrIlUrJ9Rat74X4My3DO7I7QnGi/04I7sLxP5PxUShqcjDi5q4rZTXG/ssaLS3O4YvXigy0ZzK6PsKX8jYVTlQdMQHBY5IwYH6reJ5IM0KjJoum95VoZTTKtIAIxOjLnbVu8khwxYDyzFhrfUKkvcULCCrGx7PphBPNV6SN+/0TFNmuabhp1nLb/+lZ61bVFiV5Mfs7DF8WVVMvwhBMw68HqIyts/b5g68e/yjwV6do= +node_js: 4 +addons: + firefox: '42.0' + apt: + sources: + - google-chrome + packages: + - google-chrome-stable +script: + - xvfb-run wct + - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-a11y-announcer/CONTRIBUTING.md new file mode 100644 index 0000000000..7b10141565 --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-announcer/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/bower.json b/dashboard-ui/bower_components/iron-a11y-announcer/bower.json index b9bfc32ab4..ed8d8d0081 100644 --- a/dashboard-ui/bower_components/iron-a11y-announcer/bower.json +++ b/dashboard-ui/bower_components/iron-a11y-announcer/bower.json @@ -1,6 +1,6 @@ { "name": "iron-a11y-announcer", - "version": "1.0.3", + "version": "1.0.4", "description": "A singleton element that simplifies announcing text to screen readers.", "keywords": [ "web-components", @@ -27,6 +27,7 @@ "paper-styles": "polymerelements/paper-styles#^1.0.0", "test-fixture": "polymerelements/test-fixture#^1.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", - "web-component-tester": "*" - } + "web-component-tester": "polymer/web-component-tester#^3.4.0" + }, + "ignore": [] } diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/demo/index.html b/dashboard-ui/bower_components/iron-a11y-announcer/demo/index.html index d9e939c56b..0dd286acf5 100644 --- a/dashboard-ui/bower_components/iron-a11y-announcer/demo/index.html +++ b/dashboard-ui/bower_components/iron-a11y-announcer/demo/index.html @@ -19,14 +19,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN