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-07-28 17:48:52 -04:00
parent 89200aaa59
commit 7790a5b573
7 changed files with 72 additions and 39 deletions

View file

@ -25,14 +25,14 @@
"web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"homepage": "https://github.com/PolymerElements/iron-meta",
"homepage": "https://github.com/polymerelements/iron-meta",
"_release": "1.0.3",
"_resolution": {
"type": "version",
"tag": "v1.0.3",
"commit": "91529259262b0d8f33fed44bc3fd47aedf35cb04"
},
"_source": "git://github.com/PolymerElements/iron-meta.git",
"_source": "git://github.com/polymerelements/iron-meta.git",
"_target": "^1.0.0",
"_originalSource": "PolymerElements/iron-meta"
"_originalSource": "polymerelements/iron-meta"
}

View file

@ -27,14 +27,14 @@
"web-component-tester": "*",
"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",
"_resolution": {
"type": "version",
"tag": "v1.0.2",
"commit": "85de8ba28be2bf17c81d6436ef1119022b003674"
},
"_source": "git://github.com/PolymerElements/iron-resizable-behavior.git",
"_source": "git://github.com/polymerelements/iron-resizable-behavior.git",
"_target": "^1.0.0",
"_originalSource": "PolymerElements/iron-resizable-behavior"
"_originalSource": "polymerelements/iron-resizable-behavior"
}

View file

@ -34,7 +34,7 @@
"tag": "v1.0.11",
"commit": "347542e9ebe3e6e5f0830ee10e1c20c12956ff2c"
},
"_source": "git://github.com/PolymerLabs/paper-styles.git",
"_source": "git://github.com/PolymerElements/paper-styles.git",
"_target": "^1.0.0",
"_originalSource": "PolymerLabs/paper-styles"
"_originalSource": "PolymerElements/paper-styles"
}

View file

@ -292,7 +292,7 @@
color: #2ad;
}
@media all and (max-width: 440px) {
@media all and (max-width: 400px) {
.libraryMenuButtonText {
display: none;

View file

@ -46,45 +46,41 @@
<div class="list">
<a href="#" class="clearLink lnkDisplayPreferences">
<paper-icon-item>
<div class="avatar blue" item-icon></div>
<paper-fab class="avatar blue" icon="tv" item-icon></paper-fab>
<paper-item-body two-line>
<div>${ButtonDisplaySettings}</div>
<div secondary>${ButtonDisplaySettingsHelp}</div>
</paper-item-body>
<iron-icon icon="tv"></iron-icon>
</paper-icon-item>
</a>
<a href="#" class="clearLink lnkHomeScreenPreferences">
<paper-icon-item>
<div class="avatar red" item-icon></div>
<paper-fab class="avatar red" icon="home" item-icon></paper-fab>
<paper-item-body two-line>
<div>${ButtonHomeScreenSettings}</div>
<div secondary>${ButtonHomeScreenSettingsHelp}</div>
</paper-item-body>
<iron-icon icon="home"></iron-icon>
</paper-icon-item>
</a>
<a href="#" class="clearLink lnkLanguagePreferences">
<paper-icon-item>
<div class="avatar green" item-icon></div>
<paper-fab class="avatar green" icon="play-circle-filled" item-icon></paper-fab>
<paper-item-body two-line>
<div>${ButtonPlaybackSettings}</div>
<div secondary>${ButtonPlaybackSettingsHelp}</div>
</paper-item-body>
<iron-icon icon="play-circle-outline"></iron-icon>
</paper-icon-item>
</a>
<a href="#" class="clearLink lnkMyProfile">
<paper-icon-item>
<div class="avatar orange" item-icon></div>
<paper-fab class="avatar orange" icon="person" item-icon></paper-fab>
<paper-item-body two-line>
<div>${ButtonProfile}</div>
<div secondary>${ButtonProfileHelp}</div>
</paper-item-body>
<iron-icon icon="person"></iron-icon>
</paper-icon-item>
</a>
</div>

View file

@ -17,7 +17,7 @@
return dictionaries[getUrl(name, culture)];
}
function loadDictionary(name, culture, loadUrl, saveUrl) {
function loadDictionary(name, culture) {
var deferred = DeferredBuilder.Deferred();
@ -25,9 +25,22 @@
deferred.resolve();
} else {
$.getJSON(loadUrl).done(function (dictionary) {
dictionaries[saveUrl] = dictionary;
var url = getUrl(name, culture);
$.getJSON(url).done(function (dictionary) {
dictionaries[url] = dictionary;
deferred.resolve();
}).fail(function () {
// If there's no dictionary for that language, grab English
$.getJSON(getUrl(name, 'en-US')).done(function (dictionary) {
dictionaries[url] = dictionary;
deferred.resolve();
});
});
}
@ -39,30 +52,53 @@
currentCulture = value;
var htmlValue = value;
var jsValue = value;
var htmlUrl = getUrl('html', htmlValue);
var jsUrl = getUrl('javascript', jsValue);
var htmlLoadUrl = getUrl('html', htmlValue);
var jsLoadUrl = getUrl('javascript', jsValue);
//htmlLoadUrl = getUrl('html', 'server');
//jsLoadUrl = getUrl('javascript', 'javascript');
return $.when(loadDictionary('html', htmlValue, htmlLoadUrl, htmlUrl), loadDictionary('javascript', jsValue, jsLoadUrl, jsUrl));
return $.when(loadDictionary('html', value), loadDictionary('javascript', value));
}
function getDeviceCulture() {
var deferred = DeferredBuilder.Deferred();
var culture;
if (navigator.globalization && navigator.globalization.getLocaleName) {
navigator.globalization.getLocaleName(function (locale) {
culture = (locale.value || '').replace('_', '-');
Logger.log('Device culture is ' + culture);
deferred.resolveWith(null, [culture]);
}, function () {
deferred.resolveWith(null, [null]);
});
} else {
culture = document.documentElement.getAttribute('data-culture');
deferred.resolveWith(null, [culture]);
}
return deferred.promise();
}
function ensure() {
var culture = document.documentElement.getAttribute('data-culture');
var deferred = DeferredBuilder.Deferred();
getDeviceCulture().done(function (culture) {
if (!culture) {
culture = 'en-US';
}
return setCulture(culture);
setCulture(culture).done(function () {
deferred.resolve();
});
});
return deferred.promise();
}
function translateDocument(html, dictionaryName) {

View file

@ -1510,5 +1510,6 @@
"ButtonPlaybackSettingsHelp": "Specify your audio and subtitle preferences, streaming quality, and more.",
"ButtonProfileHelp": "Set your profile image and password.",
"HeaderHomeScreenSettings": "Home Screen Settings",
"HeaderProfile": "Profile"
"HeaderProfile": "Profile",
"HeaderLanguage": "Language"
}