mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update polymer
This commit is contained in:
parent
22a5e48860
commit
61d616c330
44 changed files with 447 additions and 156 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "iron-icon",
|
||||
"private": true,
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "An element that supports displaying an icon",
|
||||
"main": "iron-icon.html",
|
||||
|
@ -24,6 +24,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"test-fixture": "polymerelements/test-fixture#^1.0.0",
|
||||
"promise-polyfill": "polymerlabs/promise-polyfill#^1.0.0",
|
||||
"iron-iconset": "polymerelements/iron-iconset#^1.0.0",
|
||||
"iron-icons": "polymerelements/iron-icons#^1.0.0",
|
||||
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
|
||||
|
@ -31,11 +32,11 @@
|
|||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/polymerelements/iron-icon",
|
||||
"_release": "1.0.4",
|
||||
"_release": "1.0.5",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.4",
|
||||
"commit": "5a5e6cad097561ff9d182ad2b8e20bb822d6f640"
|
||||
"tag": "v1.0.5",
|
||||
"commit": "5217361e21016b3ca52b7bbf5ba2ad56b3301486"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-icon.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "iron-icon",
|
||||
"private": true,
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "An element that supports displaying an icon",
|
||||
"main": "iron-icon.html",
|
||||
|
@ -24,6 +24,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"test-fixture": "polymerelements/test-fixture#^1.0.0",
|
||||
"promise-polyfill": "polymerlabs/promise-polyfill#^1.0.0",
|
||||
"iron-iconset": "polymerelements/iron-iconset#^1.0.0",
|
||||
"iron-icons": "polymerelements/iron-icons#^1.0.0",
|
||||
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
|
||||
|
|
62
dashboard-ui/bower_components/iron-icon/demo/async.html
vendored
Normal file
62
dashboard-ui/bower_components/iron-icon/demo/async.html
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>iron-icon demo</title>
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<link rel="import" href="../iron-icon.html">
|
||||
<link rel="import" href="../../paper-styles/demo-pages.html" >
|
||||
|
||||
<style is="custom-style">
|
||||
#loading_message {
|
||||
color: #444;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.vertical-section h4 {
|
||||
border-left: 3px solid var(--paper-grey-300);
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.vertical-section h4:hover {
|
||||
border-left-color: var(--google-blue-700);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="vertical-section-container centered">
|
||||
<h4>
|
||||
This demo is for an <iron-icon> with an asynchronously loaded
|
||||
iconset.
|
||||
</h4>
|
||||
|
||||
<div id='loading_message'>Waiting to load iconset...</div>
|
||||
|
||||
<div class="vertical-section">
|
||||
<!-- iron-icon using a iron-iconset as its icon source -->
|
||||
<iron-iconset name="example" icons="location" src="location.png" size="24" width="24"></iron-iconset>
|
||||
|
||||
<h4><iron-icon icon="example:location"></h4>
|
||||
<iron-icon icon="example:location"></iron-icon>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
// Import the code that powers the iron-iconset asynchronously
|
||||
var linkElem = document.createElement('link');
|
||||
linkElem.setAttribute('rel', 'import');
|
||||
linkElem.setAttribute('href', '../../iron-iconset/iron-iconset.html');
|
||||
document.head.appendChild(linkElem);
|
||||
document.querySelector('#loading_message').innerText = "Iconset Loaded.";
|
||||
}, 1000);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -30,7 +30,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<body>
|
||||
<div class="vertical-section-container centered">
|
||||
<h4>This demo is for a single <iron-icon>. If you're looking for the
|
||||
whole set of available icons, check out the <iron-icons> demo.</h4>
|
||||
whole set of available icons, check out the <a href="/elements/iron-icons?view=demo:demo/index.html"><iron-icons> demo.</a></h5>
|
||||
|
||||
<div class="vertical-section">
|
||||
<!-- iron-icon using a iron-iconset as its icon source -->
|
||||
|
|
|
@ -129,11 +129,14 @@ Custom property | Description | Default
|
|||
type: String,
|
||||
observer: '_srcChanged'
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* @type {!Polymer.IronMeta}
|
||||
*/
|
||||
_meta: {
|
||||
value: Polymer.Base.create('iron-meta', {type: 'iconset'})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
_DEFAULT_ICONSET: 'icons',
|
||||
|
@ -157,12 +160,13 @@ Custom property | Description | Default
|
|||
_updateIcon: function() {
|
||||
if (this._usesIconset()) {
|
||||
if (this._iconsetName) {
|
||||
this._iconset = this._meta.byKey(this._iconsetName);
|
||||
this._iconset = /** @type {?Polymer.Iconset} */ (
|
||||
this._meta.byKey(this._iconsetName));
|
||||
if (this._iconset) {
|
||||
this._iconset.applyIcon(this, this._iconName, this.theme);
|
||||
this.unlisten(window, 'iron-iconset-added', '_updateIcon');
|
||||
} else {
|
||||
this._warn(this._logf('_updateIcon', 'could not find iconset `'
|
||||
+ this._iconsetName + '`, did you import the iconset?'));
|
||||
this.listen(window, 'iron-iconset-added', '_updateIcon');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -22,6 +22,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
|
||||
<link rel="import" href="../iron-icon.html">
|
||||
<link rel="import" href="../../iron-iconset/iron-iconset.html">
|
||||
<link rel="import" href="../../promise-polyfill/promise-polyfill.html">
|
||||
<link rel="import" href="../../test-fixture/test-fixture.html">
|
||||
|
||||
</head>
|
||||
|
@ -48,6 +49,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="UsingAsyncIconset">
|
||||
<template>
|
||||
<iron-icon icon="async:location"></iron-icon>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="AsyncIconset">
|
||||
<template>
|
||||
<iron-iconset name="async" icons="location blank" src="location.png" size="24" width="48"></iron-iconset>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
function iconElementFor (node) {
|
||||
var nodes = Polymer.dom(node.root).childNodes;
|
||||
|
@ -113,6 +126,23 @@ suite('<iron-icon>', function() {
|
|||
fixture('WithoutAnIconSource');
|
||||
});
|
||||
})
|
||||
|
||||
suite('when loading async', function() {
|
||||
test('will get icon after iconset is added', function() {
|
||||
var icon = fixture('UsingAsyncIconset');
|
||||
expect(hasIcon(icon)).to.be.false;
|
||||
return new Promise(function(resolve, reject) {
|
||||
window.addEventListener('iron-iconset-added', function() {
|
||||
if (hasIcon(icon)) {
|
||||
resolve();
|
||||
} else {
|
||||
reject(new Error('icon didn\'t load after iconset loaded'));
|
||||
}
|
||||
});
|
||||
fixture('AsyncIconset');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue