| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview 'settings-about-page' contains version and OS related | 6 * @fileoverview 'settings-about-page' contains version and OS related |
| 7 * information. | 7 * information. |
| 8 */ | 8 */ |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'settings-about-page', | 10 is: 'settings-about-page', |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 onCheckUpdatesTap_: function() { | 366 onCheckUpdatesTap_: function() { |
| 367 this.onUpdateStatusChanged_({status: UpdateStatus.CHECKING}); | 367 this.onUpdateStatusChanged_({status: UpdateStatus.CHECKING}); |
| 368 this.aboutBrowserProxy_.requestUpdate(); | 368 this.aboutBrowserProxy_.requestUpdate(); |
| 369 }, | 369 }, |
| 370 | 370 |
| 371 /** | 371 /** |
| 372 * @return {boolean} | 372 * @return {boolean} |
| 373 * @private | 373 * @private |
| 374 */ | 374 */ |
| 375 computeShowCheckUpdates_: function() { | 375 computeShowCheckUpdates_: function() { |
| 376 return !this.hasCheckedForUpdates_ || | 376 // Enable the update button if we are in a stale 'updated' status or |
| 377 this.checkStatus_(UpdateStatus.FAILED); | 377 // update has failed. Disable it otherwise. |
| 378 var staleUpdatedStatus = !this.hasCheckedForUpdates_ && |
| 379 this.checkStatus_(UpdateStatus.UPDATED); |
| 380 |
| 381 return staleUpdatedStatus || this.checkStatus_(UpdateStatus.FAILED); |
| 378 }, | 382 }, |
| 379 | 383 |
| 380 /** | 384 /** |
| 381 * @return {boolean} | 385 * @return {boolean} |
| 382 * @private | 386 * @private |
| 383 */ | 387 */ |
| 384 shouldShowRegulatoryInfo_: function() { | 388 shouldShowRegulatoryInfo_: function() { |
| 385 return this.regulatoryInfo_ !== null; | 389 return this.regulatoryInfo_ !== null; |
| 386 }, | 390 }, |
| 387 // </if> | 391 // </if> |
| 388 | 392 |
| 389 /** @private */ | 393 /** @private */ |
| 390 onProductLogoTap_: function() { | 394 onProductLogoTap_: function() { |
| 391 this.$['product-logo'].animate({ | 395 this.$['product-logo'].animate({ |
| 392 transform: ['none', 'rotate(-10turn)'], | 396 transform: ['none', 'rotate(-10turn)'], |
| 393 }, { | 397 }, { |
| 394 duration: 500, | 398 duration: 500, |
| 395 easing: 'cubic-bezier(1, 0, 0, 1)', | 399 easing: 'cubic-bezier(1, 0, 0, 1)', |
| 396 }); | 400 }); |
| 397 }, | 401 }, |
| 398 | 402 |
| 399 // <if expr="_google_chrome"> | 403 // <if expr="_google_chrome"> |
| 400 /** @private */ | 404 /** @private */ |
| 401 onReportIssueTap_: function() { | 405 onReportIssueTap_: function() { |
| 402 this.aboutBrowserProxy_.openFeedbackDialog(); | 406 this.aboutBrowserProxy_.openFeedbackDialog(); |
| 403 }, | 407 }, |
| 404 // </if> | 408 // </if> |
| 405 }); | 409 }); |
| OLD | NEW |