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
89200aaa59
commit
7790a5b573
7 changed files with 72 additions and 39 deletions
|
@ -25,14 +25,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-meta",
|
"homepage": "https://github.com/polymerelements/iron-meta",
|
||||||
"_release": "1.0.3",
|
"_release": "1.0.3",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.3",
|
"tag": "v1.0.3",
|
||||||
"commit": "91529259262b0d8f33fed44bc3fd47aedf35cb04"
|
"commit": "91529259262b0d8f33fed44bc3fd47aedf35cb04"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-meta.git",
|
"_source": "git://github.com/polymerelements/iron-meta.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/iron-meta"
|
"_originalSource": "polymerelements/iron-meta"
|
||||||
}
|
}
|
|
@ -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"
|
||||||
}
|
}
|
|
@ -34,7 +34,7 @@
|
||||||
"tag": "v1.0.11",
|
"tag": "v1.0.11",
|
||||||
"commit": "347542e9ebe3e6e5f0830ee10e1c20c12956ff2c"
|
"commit": "347542e9ebe3e6e5f0830ee10e1c20c12956ff2c"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerLabs/paper-styles.git",
|
"_source": "git://github.com/PolymerElements/paper-styles.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerLabs/paper-styles"
|
"_originalSource": "PolymerElements/paper-styles"
|
||||||
}
|
}
|
|
@ -292,7 +292,7 @@
|
||||||
color: #2ad;
|
color: #2ad;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-width: 440px) {
|
@media all and (max-width: 400px) {
|
||||||
|
|
||||||
.libraryMenuButtonText {
|
.libraryMenuButtonText {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
@ -46,45 +46,41 @@
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<a href="#" class="clearLink lnkDisplayPreferences">
|
<a href="#" class="clearLink lnkDisplayPreferences">
|
||||||
<paper-icon-item>
|
<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>
|
<paper-item-body two-line>
|
||||||
<div>${ButtonDisplaySettings}</div>
|
<div>${ButtonDisplaySettings}</div>
|
||||||
<div secondary>${ButtonDisplaySettingsHelp}</div>
|
<div secondary>${ButtonDisplaySettingsHelp}</div>
|
||||||
</paper-item-body>
|
</paper-item-body>
|
||||||
<iron-icon icon="tv"></iron-icon>
|
|
||||||
</paper-icon-item>
|
</paper-icon-item>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="#" class="clearLink lnkHomeScreenPreferences">
|
<a href="#" class="clearLink lnkHomeScreenPreferences">
|
||||||
<paper-icon-item>
|
<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>
|
<paper-item-body two-line>
|
||||||
<div>${ButtonHomeScreenSettings}</div>
|
<div>${ButtonHomeScreenSettings}</div>
|
||||||
<div secondary>${ButtonHomeScreenSettingsHelp}</div>
|
<div secondary>${ButtonHomeScreenSettingsHelp}</div>
|
||||||
</paper-item-body>
|
</paper-item-body>
|
||||||
<iron-icon icon="home"></iron-icon>
|
|
||||||
</paper-icon-item>
|
</paper-icon-item>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="#" class="clearLink lnkLanguagePreferences">
|
<a href="#" class="clearLink lnkLanguagePreferences">
|
||||||
<paper-icon-item>
|
<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>
|
<paper-item-body two-line>
|
||||||
<div>${ButtonPlaybackSettings}</div>
|
<div>${ButtonPlaybackSettings}</div>
|
||||||
<div secondary>${ButtonPlaybackSettingsHelp}</div>
|
<div secondary>${ButtonPlaybackSettingsHelp}</div>
|
||||||
</paper-item-body>
|
</paper-item-body>
|
||||||
<iron-icon icon="play-circle-outline"></iron-icon>
|
|
||||||
</paper-icon-item>
|
</paper-icon-item>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="#" class="clearLink lnkMyProfile">
|
<a href="#" class="clearLink lnkMyProfile">
|
||||||
<paper-icon-item>
|
<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>
|
<paper-item-body two-line>
|
||||||
<div>${ButtonProfile}</div>
|
<div>${ButtonProfile}</div>
|
||||||
<div secondary>${ButtonProfileHelp}</div>
|
<div secondary>${ButtonProfileHelp}</div>
|
||||||
</paper-item-body>
|
</paper-item-body>
|
||||||
<iron-icon icon="person"></iron-icon>
|
|
||||||
</paper-icon-item>
|
</paper-icon-item>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
return dictionaries[getUrl(name, culture)];
|
return dictionaries[getUrl(name, culture)];
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadDictionary(name, culture, loadUrl, saveUrl) {
|
function loadDictionary(name, culture) {
|
||||||
|
|
||||||
var deferred = DeferredBuilder.Deferred();
|
var deferred = DeferredBuilder.Deferred();
|
||||||
|
|
||||||
|
@ -25,9 +25,22 @@
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$.getJSON(loadUrl).done(function (dictionary) {
|
var url = getUrl(name, culture);
|
||||||
dictionaries[saveUrl] = dictionary;
|
|
||||||
|
$.getJSON(url).done(function (dictionary) {
|
||||||
|
|
||||||
|
dictionaries[url] = dictionary;
|
||||||
deferred.resolve();
|
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;
|
currentCulture = value;
|
||||||
|
|
||||||
var htmlValue = value;
|
return $.when(loadDictionary('html', value), loadDictionary('javascript', 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));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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() {
|
function ensure() {
|
||||||
|
|
||||||
var culture = document.documentElement.getAttribute('data-culture');
|
var deferred = DeferredBuilder.Deferred();
|
||||||
|
|
||||||
if (!culture) {
|
getDeviceCulture().done(function (culture) {
|
||||||
culture = 'en-US';
|
|
||||||
}
|
|
||||||
|
|
||||||
return setCulture(culture);
|
if (!culture) {
|
||||||
|
culture = 'en-US';
|
||||||
|
}
|
||||||
|
|
||||||
|
setCulture(culture).done(function () {
|
||||||
|
deferred.resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return deferred.promise();
|
||||||
}
|
}
|
||||||
|
|
||||||
function translateDocument(html, dictionaryName) {
|
function translateDocument(html, dictionaryName) {
|
||||||
|
|
|
@ -1510,5 +1510,6 @@
|
||||||
"ButtonPlaybackSettingsHelp": "Specify your audio and subtitle preferences, streaming quality, and more.",
|
"ButtonPlaybackSettingsHelp": "Specify your audio and subtitle preferences, streaming quality, and more.",
|
||||||
"ButtonProfileHelp": "Set your profile image and password.",
|
"ButtonProfileHelp": "Set your profile image and password.",
|
||||||
"HeaderHomeScreenSettings": "Home Screen Settings",
|
"HeaderHomeScreenSettings": "Home Screen Settings",
|
||||||
"HeaderProfile": "Profile"
|
"HeaderProfile": "Profile",
|
||||||
|
"HeaderLanguage": "Language"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue