mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update offline detection
This commit is contained in:
parent
c651a45dea
commit
930c8cf6d8
26 changed files with 813 additions and 784 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-progress",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "A material design progress bar",
|
||||
"authors": "The Polymer Authors",
|
||||
|
@ -29,11 +29,11 @@
|
|||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/PolymerElements/paper-progress",
|
||||
"_release": "1.0.4",
|
||||
"_release": "1.0.5",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.4",
|
||||
"commit": "3bef91b5f9479b8b85c4725b441acf8fb433e008"
|
||||
"tag": "v1.0.5",
|
||||
"commit": "baf8049bb33c3f9557d0d3608dc0824847ac34c4"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-progress.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-progress",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "A material design progress bar",
|
||||
"authors": "The Polymer Authors",
|
||||
|
|
|
@ -108,7 +108,8 @@ Custom property | Description
|
|||
background-color: var(--paper-progress-container-color, --google-grey-300);
|
||||
}
|
||||
|
||||
:host(.transiting) > * {
|
||||
:host(.transiting) #primaryProgress,
|
||||
:host(.transiting) #secondaryProgress {
|
||||
-webkit-transition-property: -webkit-transform;
|
||||
transition-property: transform;
|
||||
|
||||
|
|
|
@ -30,89 +30,116 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="transitingProgress">
|
||||
<template>
|
||||
<paper-progress class="transiting"></paper-progress>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
suite('<paper-progress>', function() {
|
||||
var range;
|
||||
suite('basic features', function() {
|
||||
var progress;
|
||||
|
||||
setup(function() {
|
||||
range = fixture('trivialProgress');
|
||||
progress = fixture('trivialProgress');
|
||||
});
|
||||
|
||||
test('check default', function() {
|
||||
assert.equal(range.min, 0);
|
||||
assert.equal(range.max, 100);
|
||||
assert.equal(range.value, 0);
|
||||
assert.equal(progress.min, 0);
|
||||
assert.equal(progress.max, 100);
|
||||
assert.equal(progress.value, 0);
|
||||
});
|
||||
|
||||
test('set value', function(done) {
|
||||
range.value = 50;
|
||||
progress.value = 50;
|
||||
asyncPlatformFlush(function() {
|
||||
assert.equal(range.value, 50);
|
||||
assert.equal(progress.value, 50);
|
||||
// test clamp value
|
||||
range.value = 60.1;
|
||||
progress.value = 60.1;
|
||||
asyncPlatformFlush(function() {
|
||||
assert.equal(range.value, 60);
|
||||
assert.equal(progress.value, 60);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('set max', function(done) {
|
||||
range.max = 10;
|
||||
range.value = 11;
|
||||
progress.max = 10;
|
||||
progress.value = 11;
|
||||
asyncPlatformFlush(function() {
|
||||
assert.equal(range.value, range.max);
|
||||
assert.equal(progress.value, progress.max);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('test ratio', function(done) {
|
||||
range.max = 10;
|
||||
range.value = 5;
|
||||
progress.max = 10;
|
||||
progress.value = 5;
|
||||
asyncPlatformFlush(function() {
|
||||
assert.equal(range.ratio, 50);
|
||||
assert.equal(progress.ratio, 50);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('test secondary ratio', function(done) {
|
||||
range.max = 10;
|
||||
range.secondaryProgress = 5;
|
||||
progress.max = 10;
|
||||
progress.secondaryProgress = 5;
|
||||
asyncPlatformFlush(function() {
|
||||
assert.equal(range.secondaryRatio, 50);
|
||||
assert.equal(progress.secondaryRatio, 50);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('set min', function(done) {
|
||||
range.min = 10
|
||||
range.max = 50;
|
||||
range.value = 30;
|
||||
progress.min = 10
|
||||
progress.max = 50;
|
||||
progress.value = 30;
|
||||
asyncPlatformFlush(function() {
|
||||
assert.equal(range.ratio, 50);
|
||||
range.value = 0;
|
||||
assert.equal(progress.ratio, 50);
|
||||
progress.value = 0;
|
||||
asyncPlatformFlush(function() {
|
||||
assert.equal(range.value, range.min);
|
||||
assert.equal(progress.value, progress.min);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('set step', function(done) {
|
||||
range.min = 0;
|
||||
range.max = 10;
|
||||
range.value = 5.1;
|
||||
progress.min = 0;
|
||||
progress.max = 10;
|
||||
progress.value = 5.1;
|
||||
asyncPlatformFlush(function() {
|
||||
assert.equal(range.value, 5);
|
||||
range.step = 0.1;
|
||||
range.value = 5.1;
|
||||
assert.equal(progress.value, 5);
|
||||
progress.step = 0.1;
|
||||
progress.value = 5.1;
|
||||
asyncPlatformFlush(function() {
|
||||
assert.equal(range.value, 5.1);
|
||||
assert.equal(progress.value, 5.1);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('transiting class', function() {
|
||||
var progress;
|
||||
|
||||
setup(function() {
|
||||
progress = fixture('transitingProgress');
|
||||
});
|
||||
|
||||
test('progress bars', function() {
|
||||
var stylesForPrimaryProgress = window.getComputedStyle(progress.$.primaryProgress);
|
||||
var stylesForSecondaryProgress = window.getComputedStyle(progress.$.secondaryProgress);
|
||||
var transitionProp = stylesForPrimaryProgress['transition-property'];
|
||||
|
||||
assert.isTrue(transitionProp === 'transform' || transitionProp === '-webkit-transform');
|
||||
assert.equal(stylesForPrimaryProgress['transition-duration'], '0.08s');
|
||||
|
||||
transitionProp = stylesForSecondaryProgress['transition-property'];
|
||||
|
||||
assert.isTrue(transitionProp === 'transform' || transitionProp === '-webkit-transform');
|
||||
assert.equal(stylesForSecondaryProgress['transition-duration'], '0.08s');
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue