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

update device discovery

This commit is contained in:
Luke Pulverenti 2016-09-13 13:49:13 -04:00
parent 62265de2e5
commit fdc83ada98
21 changed files with 119 additions and 80 deletions

View file

@ -14,12 +14,12 @@
}, },
"devDependencies": {}, "devDependencies": {},
"ignore": [], "ignore": [],
"version": "1.4.241", "version": "1.4.242",
"_release": "1.4.241", "_release": "1.4.242",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "1.4.241", "tag": "1.4.242",
"commit": "80b01c00ce8c5dd7d369b76d792675cb5dd36a75" "commit": "1304a0000b9088f09c877eef42cf1f62bd42ebe9"
}, },
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.1", "_target": "^1.2.1",

View file

@ -103,8 +103,14 @@
return false; return false;
}(); }();
function getCurrentLocale() {
var locale = globalize.getCurrentLocale();
return locale;
}
function toLocaleString(date) { function toLocaleString(date) {
var currentLocale = globalize.getCurrentLocale(); var currentLocale = getCurrentLocale();
return currentLocale && toLocaleTimeStringSupportsLocales ? return currentLocale && toLocaleTimeStringSupportsLocales ?
date.toLocaleString(currentLocale) : date.toLocaleString(currentLocale) :
@ -143,7 +149,7 @@
function toLocaleDateString(date) { function toLocaleDateString(date) {
var currentLocale = globalize.getCurrentLocale(); var currentLocale = getCurrentLocale();
return currentLocale && toLocaleTimeStringSupportsLocales ? return currentLocale && toLocaleTimeStringSupportsLocales ?
date.toLocaleDateString(currentLocale) : date.toLocaleDateString(currentLocale) :
@ -152,7 +158,7 @@
function toLocaleTimeString(date) { function toLocaleTimeString(date) {
var currentLocale = globalize.getCurrentLocale(); var currentLocale = getCurrentLocale();
return currentLocale && toLocaleTimeStringSupportsLocales ? return currentLocale && toLocaleTimeStringSupportsLocales ?
date.toLocaleTimeString(currentLocale) : date.toLocaleTimeString(currentLocale) :

View file

@ -21,6 +21,8 @@
width: 100%; width: 100%;
background-color: transparent; background-color: transparent;
border-radius: 0; border-radius: 0;
/* Ensure it is over the label so that it can be clicked */
position: relative;
} }
.inputContainer { .inputContainer {

View file

@ -54,6 +54,7 @@
z-index: 1; z-index: 1;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-wrap: wrap;
} }
.formDialogFooterItem { .formDialogFooterItem {
@ -61,6 +62,7 @@
margin-right: .5em !important; margin-right: .5em !important;
flex-grow: 1; flex-grow: 1;
text-align: center; text-align: center;
flex-basis: 0;
} }
@media all and (min-width: 800px) { @media all and (min-width: 800px) {

View file

@ -7,12 +7,6 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events', 'browser
if (window.IntersectionObserver) { if (window.IntersectionObserver) {
// The api exists in chrome 50 but doesn't work
if (browser.chrome) {
var version = parseInt(browser.version.split('.')[0]);
return version >= 51;
}
return true; return true;
} }

View file

@ -2,9 +2,34 @@
var currentDialog; var currentDialog;
var recordingUpdated = false; var recordingUpdated = false;
var recordingDeleted = false;
var currentItemId; var currentItemId;
var currentServerId; var currentServerId;
function deleteTimer(apiClient, timerId) {
return new Promise(function (resolve, reject) {
require(['confirm'], function (confirm) {
confirm(globalize.translate('sharedcomponents#MessageConfirmRecordingCancellation'), globalize.translate('sharedcomponents#HeaderConfirmRecordingCancellation')).then(function () {
loading.show();
apiClient.cancelLiveTvTimer(timerId).then(function () {
require(['toast'], function (toast) {
toast(globalize.translate('sharedcomponents#RecordingCancelled'));
});
loading.hide();
resolve();
});
});
});
});
}
function renderTimer(context, item) { function renderTimer(context, item) {
var programInfo = item.ProgramInfo || {}; var programInfo = item.ProgramInfo || {};
@ -34,9 +59,10 @@
loading.hide(); loading.hide();
} }
function closeDialog(isSubmitted) { function closeDialog(isSubmitted, isDeleted) {
recordingUpdated = isSubmitted; recordingUpdated = isSubmitted;
recordingDeleted = isDeleted;
dialogHelper.close(currentDialog); dialogHelper.close(currentDialog);
} }
@ -74,6 +100,14 @@
closeDialog(false); closeDialog(false);
}); });
context.querySelector('.btnCancelRecording').addEventListener('click', function () {
var apiClient = connectionManager.getApiClient(currentServerId);
deleteTimer(apiClient, currentItemId).then(function () {
closeDialog(true, true);
});
});
context.querySelector('form').addEventListener('submit', onSubmit); context.querySelector('form').addEventListener('submit', onSubmit);
} }
@ -95,6 +129,7 @@
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
recordingUpdated = false; recordingUpdated = false;
recordingDeleted = false;
currentServerId = serverId; currentServerId = serverId;
loading.show(); loading.show();
@ -129,7 +164,7 @@
if (recordingUpdated) { if (recordingUpdated) {
resolve({ resolve({
updated: true, updated: true,
deleted: false deleted: recordingDeleted
}); });
} else { } else {
reject(); reject();

View file

@ -30,6 +30,9 @@
<button is="emby-button" type="submit" class="raised btnSubmit block formDialogFooterItem button-submit" autofocus> <button is="emby-button" type="submit" class="raised btnSubmit block formDialogFooterItem button-submit" autofocus>
<span>${Save}</span> <span>${Save}</span>
</button> </button>
<button is="emby-button" type="button" class="raised btnCancelRecording block formDialogFooterItem button-cancel" style="white-space:nowrap;" autofocus>
<span>${HeaderCancelRecording}</span>
</button>
</div> </div>
</form> </form>

View file

@ -283,5 +283,6 @@
"LiveBroadcasts": "Live broadcasts", "LiveBroadcasts": "Live broadcasts",
"Premieres": "Premieres", "Premieres": "Premieres",
"RepeatEpisodes": "Repeat episodes", "RepeatEpisodes": "Repeat episodes",
"DvrSubscriptionRequired": "Emby DVR requires an active Emby Premiere subscription." "DvrSubscriptionRequired": "Emby DVR requires an active Emby Premiere subscription.",
"HeaderCancelRecording": "Cancel Recording"
} }

View file

@ -32,14 +32,14 @@
"web-component-tester": "^4.0.0", "web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"homepage": "https://github.com/polymerelements/iron-icon", "homepage": "https://github.com/PolymerElements/iron-icon",
"_release": "1.0.10", "_release": "1.0.10",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.10", "tag": "v1.0.10",
"commit": "f4e146da4982ff96bb25db85290c09e8de4ec734" "commit": "f4e146da4982ff96bb25db85290c09e8de4ec734"
}, },
"_source": "git://github.com/polymerelements/iron-icon.git", "_source": "git://github.com/PolymerElements/iron-icon.git",
"_target": "^1.0.0", "_target": "^1.0.0",
"_originalSource": "polymerelements/iron-icon" "_originalSource": "PolymerElements/iron-icon"
} }

View file

@ -27,14 +27,14 @@
}, },
"main": "iron-meta.html", "main": "iron-meta.html",
"ignore": [], "ignore": [],
"homepage": "https://github.com/PolymerElements/iron-meta", "homepage": "https://github.com/polymerelements/iron-meta",
"_release": "1.1.2", "_release": "1.1.2",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.1.2", "tag": "v1.1.2",
"commit": "bae96531b63ea6d4ce982f5592248aea849c0f5a" "commit": "bae96531b63ea6d4ce982f5592248aea849c0f5a"
}, },
"_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"
} }

View file

@ -40,6 +40,6 @@
"commit": "1f197d9d7874b1e5808b2a5c26f34446a7d912fc" "commit": "1f197d9d7874b1e5808b2a5c26f34446a7d912fc"
}, },
"_source": "git://github.com/Polymer/polymer.git", "_source": "git://github.com/Polymer/polymer.git",
"_target": "^1.1.0", "_target": "^1.2.0",
"_originalSource": "Polymer/polymer" "_originalSource": "Polymer/polymer"
} }

View file

@ -212,25 +212,6 @@ div[data-role='page'] {
transform: translateY(-210%); transform: translateY(-210%);
} }
.checkboxContainer {
white-space: nowrap;
}
.checkboxContainer input:not([is=emby-checkbox]) {
width: 20px;
height: 20px;
vertical-align: middle;
display: inline-block;
margin: 0;
padding: 0;
}
.checkboxContainer label:not(.mdl-checkbox) {
vertical-align: middle;
display: inline-block;
padding: .7em .5em;
}
textarea { textarea {
width: 100%; width: 100%;
} }

View file

@ -1,4 +1,4 @@
define([], function () { define(['emby-checkbox'], function () {
function reload(page, providerId) { function reload(page, providerId) {

View file

@ -92,7 +92,9 @@
</div> </div>
<br /> <br />
<div> <div>
<button is="emby-button" type="submit" class="raised button-submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button> <button is="emby-button" type="submit" class="raised button-submit block">
<span>${ButtonSave}</span>
</button>
</div> </div>
</form> </form>

View file

@ -54,12 +54,14 @@
<option value="">${OptionNone}</option> <option value="">${OptionNone}</option>
</select> </select>
</div> </div>
<div> <div class="checkboxContainer checkboxContainer-withDescription">
<br /> <label>
<paper-checkbox class="chkEnabled" checked>${LabelEnableThisTuner}</paper-checkbox> <input type="checkbox" is="emby-checkbox" class="chkEnabled" />
<div class="fieldDescription paperCheckboxFieldDescription">${LabelEnableThisTunerHelp}</div> <span>${LabelEnableThisTuner}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelEnableThisTunerHelp}</div>
</div> </div>
<br /><br /> <br />
<div> <div>
<button is="emby-button" type="submit" class="raised submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button> <button is="emby-button" type="submit" class="raised submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button>
<button is="emby-button" type="button" class="raised cancel block btnCancel" onclick="history.back();"><i class="md-icon">close</i><span>${ButtonCancel}</span></button> <button is="emby-button" type="button" class="raised cancel block btnCancel" onclick="history.back();"><i class="md-icon">close</i><span>${ButtonCancel}</span></button>

View file

@ -168,20 +168,20 @@
itemHtml += '<i class="listItemIcon md-icon">dvr</i>'; itemHtml += '<i class="listItemIcon md-icon">dvr</i>';
itemHtml += '<div class="listItemBody three-line">'; itemHtml += '<div class="listItemBody two-line">';
itemHtml += '<h3 class="listItemBodyText">'; itemHtml += '<div class="listItemBodyText">';
itemHtml += item.Title; itemHtml += item.Title;
itemHtml += '</h3>'; itemHtml += '</div>';
itemHtml += '<div class="listItemBodyText secondary">'; itemHtml += '<div class="listItemBodyText secondary">';
var date = datetime.parseISO8601Date(item.Date, true); var date = datetime.parseISO8601Date(item.Date, true);
itemHtml += date.toLocaleDateString(); itemHtml += date.toLocaleDateString();
itemHtml += '</div>'; itemHtml += '</div>';
itemHtml += '<div class="listItemBodyText secondary listItemBodyText-nowrap">'; //itemHtml += '<div class="listItemBodyText secondary listItemBodyText-nowrap">';
itemHtml += item.Description; //itemHtml += item.Description;
itemHtml += '</div>'; //itemHtml += '</div>';
itemHtml += '</div>'; itemHtml += '</div>';
@ -1067,9 +1067,9 @@
html += '<div class="listItemBody three-line">'; html += '<div class="listItemBody three-line">';
html += '<h3 class="listItemBodyText">'; html += '<div class="listItemBodyText">';
html += entry.Name; html += entry.Name;
html += '</h3>'; html += '</div>';
html += '<div class="listItemBodyText secondary">'; html += '<div class="listItemBodyText secondary">';
var date = datetime.parseISO8601Date(entry.Date, true); var date = datetime.parseISO8601Date(entry.Date, true);

View file

@ -1633,7 +1633,7 @@ var AppInfo = {};
define("imageFetcher", [embyWebComponentsBowerPath + "/images/basicimagefetcher"], returnFirstDependency); define("imageFetcher", [embyWebComponentsBowerPath + "/images/basicimagefetcher"], returnFirstDependency);
} }
var preferNativeAlerts = browser.mobile || browser.tv || browser.xboxOne; var preferNativeAlerts = (browser.mobile && !browser.animate) || browser.tv || browser.xboxOne || browser.ps4;
// use native alerts if preferred and supported (not supported in opera tv) // use native alerts if preferred and supported (not supported in opera tv)
if (preferNativeAlerts && window.alert) { if (preferNativeAlerts && window.alert) {
define("alert", [embyWebComponentsBowerPath + "/alert/nativealert"], returnFirstDependency); define("alert", [embyWebComponentsBowerPath + "/alert/nativealert"], returnFirstDependency);
@ -2182,7 +2182,7 @@ var AppInfo = {};
defineRoute({ defineRoute({
path: '/livetvtunerprovider-satip.html', path: '/livetvtunerprovider-satip.html',
dependencies: ['emby-input', 'paper-checkbox'], dependencies: ['emby-input'],
autoFocus: false, autoFocus: false,
roles: 'admin', roles: 'admin',
controller: 'dashboard/livetvtunerprovider-satip' controller: 'dashboard/livetvtunerprovider-satip'

View file

@ -90,7 +90,7 @@
"LabelCountry": "Country:", "LabelCountry": "Country:",
"LabelLanguage": "Language:", "LabelLanguage": "Language:",
"LabelTimeLimitHours": "Time limit (hours):", "LabelTimeLimitHours": "Time limit (hours):",
"HeaderPreferredMetadataLanguage": "Preferred metadata language:", "HeaderPreferredMetadataLanguage": "Preferred Metadata Language",
"LabelSaveLocalMetadata": "Save artwork and metadata into media folders", "LabelSaveLocalMetadata": "Save artwork and metadata into media folders",
"LabelSaveLocalMetadataHelp": "Saving artwork and metadata directly into media folders will put them in a place where they can be easily edited.", "LabelSaveLocalMetadataHelp": "Saving artwork and metadata directly into media folders will put them in a place where they can be easily edited.",
"LabelDownloadInternetMetadata": "Download artwork and metadata from the internet", "LabelDownloadInternetMetadata": "Download artwork and metadata from the internet",

View file

@ -151,9 +151,13 @@
</div> </div>
<br /> <br />
<div> <div>
<button is="emby-button" type="submit" class="raised button-submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button> <button is="emby-button" type="submit" class="raised button-submit block">
<span>${ButtonSave}</span>
</button>
<button is="emby-button" type="button" class="raised button-cancel block btnCancel" onclick="history.back();"><i class="md-icon">close</i><span>${ButtonCancel}</span></button> <button is="emby-button" type="button" class="raised button-cancel block btnCancel" onclick="history.back();">
<span>${ButtonCancel}</span>
</button>
</div> </div>
</form> </form>
</div> </div>

View file

@ -1,4 +1,4 @@
<div id="wizardAgreementPage" data-role="page" class="page standalonePage wizardPage" data-require="scripts/wizardagreement,paper-checkbox,emby-button"> <div id="wizardAgreementPage" data-role="page" class="page standalonePage wizardPage" data-require="scripts/wizardagreement,emby-checkbox,emby-button">
<div data-role="content"> <div data-role="content">
@ -13,9 +13,10 @@
<p style="margin:1.5em 0;"><a href="http://emby.media/privacy" target="_blank">${ButtonPrivacyPolicy}</a></p> <p style="margin:1.5em 0;"><a href="http://emby.media/privacy" target="_blank">${ButtonPrivacyPolicy}</a></p>
<p style="margin:1.5em 0;"><a href="http://emby.media/terms" target="_blank">${ButtonTermsOfService}</a></p> <p style="margin:1.5em 0;"><a href="http://emby.media/terms" target="_blank">${ButtonTermsOfService}</a></p>
<div> <label class="checkboxContainer">
<paper-checkbox class="chkAccept" checked>${OptionIAcceptTermsOfService}</paper-checkbox> <input type="checkbox" is="emby-checkbox" class="chkAccept" />
</div> <span>${OptionIAcceptTermsOfService}</span>
</label>
<div class="wizardNavigation"> <div class="wizardNavigation">
<button is="emby-button" type="button" onclick="history.back();" class="raised button-cancel"> <button is="emby-button" type="button" onclick="history.back();" class="raised button-cancel">

View file

@ -1,4 +1,4 @@
<div id="wizardSettingsPage" data-role="page" class="page standalonePage wizardPage" data-require="scripts/wizardsettings,paper-checkbox,emby-button"> <div id="wizardSettingsPage" data-role="page" class="page standalonePage wizardPage" data-require="scripts/wizardsettings,emby-checkbox,emby-button,emby-select">
<div data-role="content"> <div data-role="content">
@ -7,26 +7,32 @@
<h1> <h1>
${LabelConfigureSettings} ${LabelConfigureSettings}
</h1> </h1>
<div style="margin: 3em 0;"> <br/>
<paper-checkbox class="chkEnableInternetProviders" checked>${LabelDownloadInternetMetadata}</paper-checkbox> <div class="checkboxContainer checkboxContainer-withDescription">
<div class="fieldDescription paperCheckboxFieldDescription">${LabelDownloadInternetMetadataHelp}</div> <label>
<input type="checkbox" is="emby-checkbox" class="chkEnableInternetProviders" />
<span>${LabelDownloadInternetMetadata}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelDownloadInternetMetadataHelp}</div>
</div> </div>
<div> <div class="checkboxContainer checkboxContainer-withDescription">
<paper-checkbox class="chkSaveLocalMetadata">${LabelSaveLocalMetadata}</paper-checkbox> <label>
<div class="fieldDescription paperCheckboxFieldDescription">${LabelSaveLocalMetadataHelp}</div> <input type="checkbox" is="emby-checkbox" class="chkSaveLocalMetadata" />
<span>${LabelSaveLocalMetadata}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelSaveLocalMetadataHelp}</div>
</div> </div>
<h1 style="margin-top: 1.5em;">${HeaderPreferredMetadataLanguage}</h1> <h1 style="margin:2em 0 1.5em;">${HeaderPreferredMetadataLanguage}</h1>
<div style="margin: 2em 0;"> <div class="selectContainer">
<label for="selectLanguage" class="selectLabel">${LabelLanguage}</label> <select is="emby-select" id="selectLanguage" required="required" label="${LabelLanguage}"></select>
<select name="selectLanguage" id="selectLanguage" data-mini="true" required="required"></select>
</div> </div>
<div style="margin: 2em 0;"> <div class="selectContainer">
<label for="selectCountry" class="selectLabel">${LabelCountry}</label> <select is="emby-select" id="selectCountry" required="required" label="${LabelCountry}"></select>
<select name="selectCountry" id="selectCountry" data-mini="true" required="required"></select>
</div> </div>
<br />
<div class="wizardNavigation"> <div class="wizardNavigation">
<button is="emby-button" type="button" class="raised button-cancel" onclick="history.back();"><i class="md-icon">arrow_back</i><span>${LabelPrevious}</span></button> <button is="emby-button" type="button" class="raised button-cancel" onclick="history.back();"><i class="md-icon">arrow_back</i><span>${LabelPrevious}</span></button>