mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
fa050a3b08
commit
f6b3dd3b16
10 changed files with 103 additions and 28 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-behaviors",
|
"name": "iron-behaviors",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"description": "Provides a set of behaviors for the iron elements",
|
"description": "Provides a set of behaviors for the iron elements",
|
||||||
"private": true,
|
"private": true,
|
||||||
"authors": [
|
"authors": [
|
||||||
|
@ -28,11 +28,11 @@
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/PolymerElements/iron-behaviors",
|
"homepage": "https://github.com/PolymerElements/iron-behaviors",
|
||||||
"_release": "1.0.6",
|
"_release": "1.0.7",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.6",
|
"tag": "v1.0.7",
|
||||||
"commit": "9dad0f52150c887997045b8bbf2a82b2394b8a37"
|
"commit": "033889b20c6b9ebb45a1ff153fbd667e153fe3f7"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-behaviors.git",
|
"_source": "git://github.com/PolymerElements/iron-behaviors.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-behaviors",
|
"name": "iron-behaviors",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"description": "Provides a set of behaviors for the iron elements",
|
"description": "Provides a set of behaviors for the iron elements",
|
||||||
"private": true,
|
"private": true,
|
||||||
"authors": [
|
"authors": [
|
||||||
|
|
|
@ -50,8 +50,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
value: false,
|
value: false,
|
||||||
notify: true,
|
notify: true,
|
||||||
reflectToAttribute: true,
|
reflectToAttribute: true
|
||||||
observer: '_activeChanged'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -72,6 +71,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
receivedFocusFromKeyboard: {
|
receivedFocusFromKeyboard: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The aria attribute to be set if the button is a toggle and in the
|
||||||
|
* active state.
|
||||||
|
*/
|
||||||
|
ariaActiveAttribute: {
|
||||||
|
type: String,
|
||||||
|
value: 'aria-pressed',
|
||||||
|
observer: '_ariaActiveAttributeChanged'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -82,7 +91,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
},
|
},
|
||||||
|
|
||||||
observers: [
|
observers: [
|
||||||
'_detectKeyboardFocus(focused)'
|
'_detectKeyboardFocus(focused)',
|
||||||
|
'_activeChanged(active, ariaActiveAttribute)'
|
||||||
],
|
],
|
||||||
|
|
||||||
keyBindings: {
|
keyBindings: {
|
||||||
|
@ -180,11 +190,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
this._changedButtonState();
|
this._changedButtonState();
|
||||||
},
|
},
|
||||||
|
|
||||||
_activeChanged: function(active) {
|
_ariaActiveAttributeChanged: function(value, oldValue) {
|
||||||
|
if (oldValue && oldValue != value && this.hasAttribute(oldValue)) {
|
||||||
|
this.removeAttribute(oldValue);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_activeChanged: function(active, ariaActiveAttribute) {
|
||||||
if (this.toggles) {
|
if (this.toggles) {
|
||||||
this.setAttribute('aria-pressed', active ? 'true' : 'false');
|
this.setAttribute(this.ariaActiveAttribute,
|
||||||
|
active ? 'true' : 'false');
|
||||||
} else {
|
} else {
|
||||||
this.removeAttribute('aria-pressed');
|
this.removeAttribute(this.ariaActiveAttribute);
|
||||||
}
|
}
|
||||||
this._changedButtonState();
|
this._changedButtonState();
|
||||||
},
|
},
|
||||||
|
|
|
@ -60,6 +60,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
MockInteractions.downAndUp(activeTarget, function() {
|
MockInteractions.downAndUp(activeTarget, function() {
|
||||||
try {
|
try {
|
||||||
expect(activeTarget.hasAttribute('active')).to.be.eql(true);
|
expect(activeTarget.hasAttribute('active')).to.be.eql(true);
|
||||||
|
expect(activeTarget.hasAttribute('aria-pressed')).to.be.eql(true);
|
||||||
|
expect(activeTarget.getAttribute('aria-pressed')).to.be.eql('true');
|
||||||
done();
|
done();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
done(e);
|
done(e);
|
||||||
|
@ -72,6 +74,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
MockInteractions.downAndUp(activeTarget, function() {
|
MockInteractions.downAndUp(activeTarget, function() {
|
||||||
try {
|
try {
|
||||||
expect(activeTarget.hasAttribute('active')).to.be.eql(false);
|
expect(activeTarget.hasAttribute('active')).to.be.eql(false);
|
||||||
|
expect(activeTarget.hasAttribute('aria-pressed')).to.be.eql(true);
|
||||||
|
expect(activeTarget.getAttribute('aria-pressed')).to.be.eql('false');
|
||||||
done();
|
done();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
done(e);
|
done(e);
|
||||||
|
@ -79,6 +83,39 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('the correct aria attribute is set', function(done) {
|
||||||
|
activeTarget.ariaActiveAttribute = 'aria-checked';
|
||||||
|
MockInteractions.downAndUp(activeTarget, function() {
|
||||||
|
try {
|
||||||
|
expect(activeTarget.hasAttribute('active')).to.be.eql(true);
|
||||||
|
expect(activeTarget.hasAttribute('aria-checked')).to.be.eql(true);
|
||||||
|
expect(activeTarget.getAttribute('aria-checked')).to.be.eql('true');
|
||||||
|
done();
|
||||||
|
} catch (e) {
|
||||||
|
done(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('the aria attribute is updated correctly', function(done) {
|
||||||
|
activeTarget.ariaActiveAttribute = 'aria-checked';
|
||||||
|
MockInteractions.downAndUp(activeTarget, function() {
|
||||||
|
try {
|
||||||
|
expect(activeTarget.hasAttribute('active')).to.be.eql(true);
|
||||||
|
expect(activeTarget.hasAttribute('aria-checked')).to.be.eql(true);
|
||||||
|
expect(activeTarget.getAttribute('aria-checked')).to.be.eql('true');
|
||||||
|
|
||||||
|
activeTarget.ariaActiveAttribute = 'aria-pressed';
|
||||||
|
expect(activeTarget.hasAttribute('aria-checked')).to.be.eql(false);
|
||||||
|
expect(activeTarget.hasAttribute('aria-pressed')).to.be.eql(true);
|
||||||
|
expect(activeTarget.getAttribute('aria-pressed')).to.be.eql('true');
|
||||||
|
done();
|
||||||
|
} catch (e) {
|
||||||
|
done(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -27,14 +27,14 @@
|
||||||
"web-component-tester": "*",
|
"web-component-tester": "*",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/polymerelements/iron-resizable-behavior",
|
"homepage": "https://github.com/PolymerElements/iron-resizable-behavior",
|
||||||
"_release": "1.0.2",
|
"_release": "1.0.2",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.2",
|
"tag": "v1.0.2",
|
||||||
"commit": "85de8ba28be2bf17c81d6436ef1119022b003674"
|
"commit": "85de8ba28be2bf17c81d6436ef1119022b003674"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/iron-resizable-behavior.git",
|
"_source": "git://github.com/PolymerElements/iron-resizable-behavior.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/iron-resizable-behavior"
|
"_originalSource": "PolymerElements/iron-resizable-behavior"
|
||||||
}
|
}
|
|
@ -16,8 +16,11 @@
|
||||||
<div class="detailSectionContent">
|
<div class="detailSectionContent">
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<paper-checkbox class="chkSyncToExternalCard">${OptionSyncToSDCard}</paper-checkbox>
|
<div>
|
||||||
|
<paper-input type="text" id="txtSyncPath" label="${LabelSyncPath}" style="display:inline-block;width:80%;" readonly></paper-input>
|
||||||
|
<paper-icon-button class="btnSelectSyncPath" icon="search"></paper-icon-button>
|
||||||
|
<div class="fieldDescription">${LabelSyncPathHelp}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -56,13 +56,13 @@
|
||||||
|
|
||||||
return appStorage.getItem('enableFullScreen') == 'true';
|
return appStorage.getItem('enableFullScreen') == 'true';
|
||||||
},
|
},
|
||||||
enableSyncToExternalStorage: function (val) {
|
syncPath: function (val) {
|
||||||
|
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
update('enableSyncToExternalStorage', val.toString());
|
update('syncPath', val);
|
||||||
}
|
}
|
||||||
|
|
||||||
return appStorage.getItem('enableSyncToExternalStorage') != 'false';
|
return appStorage.getItem('syncPath');
|
||||||
},
|
},
|
||||||
|
|
||||||
displayLanguage: function (val) {
|
displayLanguage: function (val) {
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
|
|
||||||
function loadForm(page, user) {
|
function loadForm(page, user) {
|
||||||
|
|
||||||
page.querySelector('.chkSyncToExternalCard').checked = AppSettings.enableSyncToExternalStorage();
|
page.querySelector('#txtSyncPath').value = AppSettings.syncPath();
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveUser(page, user) {
|
function saveUser(page, user) {
|
||||||
|
|
||||||
AppSettings.enableSyncToExternalStorage(page.querySelector('.chkSyncToExternalCard').checked);
|
AppSettings.syncPath(page.querySelector('#txtSyncPath').value);
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1517,5 +1517,6 @@
|
||||||
"LabelTranscodingThreadCount": "Transcoding thread count:",
|
"LabelTranscodingThreadCount": "Transcoding thread count:",
|
||||||
"LabelTranscodingThreadCountHelp": "Select the maximum number of threads to use when transcoding. Reducing the thread count will lower cpu usage but may not convert fast enough for a smooth playback experience.",
|
"LabelTranscodingThreadCountHelp": "Select the maximum number of threads to use when transcoding. Reducing the thread count will lower cpu usage but may not convert fast enough for a smooth playback experience.",
|
||||||
"OptionMax": "Max",
|
"OptionMax": "Max",
|
||||||
"HeaderEmbyGuide": "Emby Guide"
|
"HeaderEmbyGuide": "Emby Guide",
|
||||||
|
"LabelSyncPath": "Sync path:"
|
||||||
}
|
}
|
||||||
|
|
|
@ -6850,8 +6850,7 @@ this.fire('dom-change');
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
value: false,
|
value: false,
|
||||||
notify: true,
|
notify: true,
|
||||||
reflectToAttribute: true,
|
reflectToAttribute: true
|
||||||
observer: '_activeChanged'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6872,6 +6871,16 @@ this.fire('dom-change');
|
||||||
receivedFocusFromKeyboard: {
|
receivedFocusFromKeyboard: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The aria attribute to be set if the button is a toggle and in the
|
||||||
|
* active state.
|
||||||
|
*/
|
||||||
|
ariaActiveAttribute: {
|
||||||
|
type: String,
|
||||||
|
value: 'aria-pressed',
|
||||||
|
observer: '_ariaActiveAttributeChanged'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -6882,7 +6891,8 @@ this.fire('dom-change');
|
||||||
},
|
},
|
||||||
|
|
||||||
observers: [
|
observers: [
|
||||||
'_detectKeyboardFocus(focused)'
|
'_detectKeyboardFocus(focused)',
|
||||||
|
'_activeChanged(active, ariaActiveAttribute)'
|
||||||
],
|
],
|
||||||
|
|
||||||
keyBindings: {
|
keyBindings: {
|
||||||
|
@ -6980,11 +6990,18 @@ this.fire('dom-change');
|
||||||
this._changedButtonState();
|
this._changedButtonState();
|
||||||
},
|
},
|
||||||
|
|
||||||
_activeChanged: function(active) {
|
_ariaActiveAttributeChanged: function(value, oldValue) {
|
||||||
|
if (oldValue && oldValue != value && this.hasAttribute(oldValue)) {
|
||||||
|
this.removeAttribute(oldValue);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_activeChanged: function(active, ariaActiveAttribute) {
|
||||||
if (this.toggles) {
|
if (this.toggles) {
|
||||||
this.setAttribute('aria-pressed', active ? 'true' : 'false');
|
this.setAttribute(this.ariaActiveAttribute,
|
||||||
|
active ? 'true' : 'false');
|
||||||
} else {
|
} else {
|
||||||
this.removeAttribute('aria-pressed');
|
this.removeAttribute(this.ariaActiveAttribute);
|
||||||
}
|
}
|
||||||
this._changedButtonState();
|
this._changedButtonState();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue