1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2015-06-19 00:23:55 -04:00
parent 615cc844ae
commit b9598ffaa1
88 changed files with 366 additions and 501 deletions

View file

@ -171,7 +171,6 @@
});
var existingServer = existingServers.length ? existingServers[0] : {};
existingServer.DateLastAccessed = new Date().getTime();
existingServer.LastConnectionMode = MediaBrowser.ConnectionMode.Manual;
existingServer.ManualAddress = apiClient.serverAddress();
@ -204,6 +203,18 @@
});
};
self.clearData = function () {
logger.log('connection manager clearing data');
connectUser = null;
var credentials = credentialProvider.credentials();
credentials.ConnectAccessToken = null;
credentials.ConnectUserId = null;
credentials.Servers = [];
credentialProvider.credentials(credentials);
};
function onConnectUserSignIn(user) {
connectUser = user;

View file

@ -634,14 +634,13 @@
$(MediaController).on('playerchange', function (e, newPlayer, newTarget) {
if (currentDevice) {
if (newTarget.id != currentDeviceId) {
if (currentWebAppSession) {
console.log('Disconnecting from chromecast');
//currentDevice.disconnect();
currentDevice = null;
currentDeviceId = null;
}
if (newTarget.id != currentDeviceId) {
if (currentWebAppSession) {
console.log('Disconnecting from chromecast');
//currentDevice.disconnect();
cleanupSession();
currentDevice = null;
currentDeviceId = null;
}
}
});
@ -657,9 +656,7 @@
}
}
if (!$.browser.safari) {
document.addEventListener("resume", onResume, false);
}
document.addEventListener("resume", onResume, false);
}
MediaController.registerPlayer(new chromecastPlayer());

View file

@ -647,6 +647,7 @@
if (currentDevice) {
console.log('Disconnecting from connect device');
//currentDevice.disconnect();
cleanupSession();
currentDevice = null;
currentDeviceId = null;
currentMediaControl = null;

View file

@ -38,6 +38,7 @@ See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for
<g id="add"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></g>
<g id="check"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" /></g>
<g id="close"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" /></g>
<g id="add"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" /></g>
<g id="arrow-back"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /></g>
<g id="arrow-forward"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z" /></g>
<g id="info"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" /></g>
@ -48,5 +49,9 @@ See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for
<g id="folder-open"><path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z" /></g>
<g id="mode-edit"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z" /></g>
<g id="more-vert"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" /></g>
<g id="cast"><path d="M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11z" /></g>
<g id="cast-connected"><path d="M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H5v1.63c3.96 1.28 7.09 4.41 8.37 8.37H19V7zM1 10v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" /></g>
<g id="tablet-android"><path d="M18 0H6C4.34 0 3 1.34 3 3v18c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V3c0-1.66-1.34-3-3-3zm-4 22h-4v-1h4v1zm5.25-3H4.75V3h14.5v16z" /></g>
<g id="view-comfy"><path d="M3 9h4V5H3v4zm0 5h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zM8 9h4V5H8v4zm5-4v4h4V5h-4zm5 9h4v-4h-4v4zM3 19h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zm5 0h4v-4h-4v4zm0-14v4h4V5h-4z" /></g>
</defs></svg>
</iron-iconset-svg>

View file

@ -20,7 +20,7 @@
// Need to fix those before this can be set to 0
if (window.AppInfo && AppInfo.isNativeApp && $.browser.safari) {
return 10000;
return 8000;
}
var screens = $.browser.mobile ? 2 : 1;

View file

@ -55,11 +55,11 @@
}
.ui-page-theme-b paper-button.subdued:not([disabled]) {
color: #555;
color: #484848;
}
.ui-page-theme-b paper-button[raised].subdued:not([disabled]) {
background: #555;
background: #484848;
color: #fff;
}

View file

@ -0,0 +1,175 @@
<!--
@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
-->
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-icon/iron-icon.html">
<link rel="import" href="../iron-flex-layout/classes/iron-flex-layout.html">
<link rel="import" href="../paper-styles/default-theme.html">
<link rel="import" href="../paper-styles/color.html">
<link rel="import" href="../paper-material/paper-material.html">
<link rel="import" href="../paper-ripple/paper-ripple.html">
<link rel="import" href="../paper-behaviors/paper-button-behavior.html">
<!--
Material Design: <a href="http://www.google.com/design/spec/components/buttons.html">Button</a>
`paper-fab` is a floating action button. It contains an image placed in the center and
comes in two sizes: regular size and a smaller size by applying the attribute `mini`. When
the user touches the button, a ripple effect emanates from the center of the button.
You may import `iron-icons` to use with this element, or provide a URL to a custom icon.
See `iron-iconset` for more information about how to use a custom icon set.
Example:
<link href="path/to/iron-icons/iron-icons.html" rel="import">
<paper-fab icon="add"></paper-fab>
<paper-fab mini icon="favorite"></paper-fab>
<paper-fab src="star.png"></paper-fab>
### Styling
The following custom properties and mixins are available for styling:
Custom property | Description | Default
----------------|-------------|----------
`--paper-fab-background` | The background color of the button | `--accent-color`
`--paper-fab-keyboard-focus-background` | The background color of the button when focused | `--paper-pink-900`
`--paper-fab-disabled-background` | The background color of the button when it's disabled | `--paper-grey-300`
`--paper-fab-disabled-text` | The text color of the button when it's disabled | `--paper-grey-500`
`--paper-fab` | Mixin applied to the button | `{}`
`--paper-fab-mini` | Mixin applied to a mini button | `{}`
`--paper-fab-disabled` | Mixin applied to a disabled button | `{}`
@group Paper Elements
@demo demo/index.html
-->
<dom-module id="paper-fab">
<style>
:host {
display: inline-block;
position: relative;
outline: none;
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
user-select: none;
cursor: pointer;
box-sizing: border-box;
min-width: 0;
width: 56px;
height: 56px;
background: var(--paper-fab-background, --accent-color);
color: var(--text-primary-color);
border-radius: 50%;
padding: 16px;
z-index: 0;
@apply(--paper-fab);
}
:host([mini]) {
width: 40px;
height: 40px;
padding: 8px;
@apply(--paper-fab-mini);
}
:host([disabled]) {
color: var(--paper-fab-disabled-text, --paper-grey-500);
background: var(--paper-fab-disabled-background, --paper-grey-300);
@apply(--paper-fab-disabled);
}
paper-material {
border-radius: inherit;
@apply(--layout-fit);
@apply(--layout-vertical);
@apply(--layout-center-center);
}
.keyboard-focus {
background: var(--paper-fab-keyboard-focus-background, --paper-pink-900);
}
</style>
<template>
<paper-ripple></paper-ripple>
<paper-material class$="[[_computeContentClass(receivedFocusFromKeyboard)]]" elevation="[[_elevation]]" animated>
<iron-icon id="icon" src="[[src]]" icon="[[icon]]"></iron-icon>
</paper-material>
</template>
</dom-module>
<script>
Polymer({
is: 'paper-fab',
behaviors: [
Polymer.PaperButtonBehavior
],
properties: {
/**
* The URL of an image for the icon. If the src property is specified,
* the icon property should not be.
*
* @attribute src
* @type string
* @default ''
*/
src: {
type: String,
value: ''
},
/**
* Specifies the icon name or index in the set of icons available in
* the icon's icon set. If the icon property is specified,
* the src property should not be.
*
* @attribute icon
* @type string
* @default ''
*/
icon: {
type: String,
value: ''
},
/**
* Set this to true to style this is a "mini" FAB.
*
* @attribute mini
* @type boolean
* @default false
*/
mini: {
type: Boolean,
value: false
}
},
_computeContentClass: function(receivedFocusFromKeyboard) {
var className = 'content';
if (receivedFocusFromKeyboard) {
className += ' keyboard-focus';
}
return className;
}
});
</script>