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:
parent
62265de2e5
commit
fdc83ada98
21 changed files with 119 additions and 80 deletions
|
@ -14,12 +14,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.4.241",
|
||||
"_release": "1.4.241",
|
||||
"version": "1.4.242",
|
||||
"_release": "1.4.242",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.241",
|
||||
"commit": "80b01c00ce8c5dd7d369b76d792675cb5dd36a75"
|
||||
"tag": "1.4.242",
|
||||
"commit": "1304a0000b9088f09c877eef42cf1f62bd42ebe9"
|
||||
},
|
||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "^1.2.1",
|
||||
|
|
|
@ -103,8 +103,14 @@
|
|||
return false;
|
||||
}();
|
||||
|
||||
function getCurrentLocale() {
|
||||
var locale = globalize.getCurrentLocale();
|
||||
|
||||
return locale;
|
||||
}
|
||||
|
||||
function toLocaleString(date) {
|
||||
var currentLocale = globalize.getCurrentLocale();
|
||||
var currentLocale = getCurrentLocale();
|
||||
|
||||
return currentLocale && toLocaleTimeStringSupportsLocales ?
|
||||
date.toLocaleString(currentLocale) :
|
||||
|
@ -143,7 +149,7 @@
|
|||
|
||||
function toLocaleDateString(date) {
|
||||
|
||||
var currentLocale = globalize.getCurrentLocale();
|
||||
var currentLocale = getCurrentLocale();
|
||||
|
||||
return currentLocale && toLocaleTimeStringSupportsLocales ?
|
||||
date.toLocaleDateString(currentLocale) :
|
||||
|
@ -152,7 +158,7 @@
|
|||
|
||||
function toLocaleTimeString(date) {
|
||||
|
||||
var currentLocale = globalize.getCurrentLocale();
|
||||
var currentLocale = getCurrentLocale();
|
||||
|
||||
return currentLocale && toLocaleTimeStringSupportsLocales ?
|
||||
date.toLocaleTimeString(currentLocale) :
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
width: 100%;
|
||||
background-color: transparent;
|
||||
border-radius: 0;
|
||||
/* Ensure it is over the label so that it can be clicked */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.inputContainer {
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
z-index: 1;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.formDialogFooterItem {
|
||||
|
@ -61,6 +62,7 @@
|
|||
margin-right: .5em !important;
|
||||
flex-grow: 1;
|
||||
text-align: center;
|
||||
flex-basis: 0;
|
||||
}
|
||||
|
||||
@media all and (min-width: 800px) {
|
||||
|
|
|
@ -7,12 +7,6 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events', 'browser
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,9 +2,34 @@
|
|||
|
||||
var currentDialog;
|
||||
var recordingUpdated = false;
|
||||
var recordingDeleted = false;
|
||||
var currentItemId;
|
||||
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) {
|
||||
|
||||
var programInfo = item.ProgramInfo || {};
|
||||
|
@ -34,9 +59,10 @@
|
|||
loading.hide();
|
||||
}
|
||||
|
||||
function closeDialog(isSubmitted) {
|
||||
function closeDialog(isSubmitted, isDeleted) {
|
||||
|
||||
recordingUpdated = isSubmitted;
|
||||
recordingDeleted = isDeleted;
|
||||
dialogHelper.close(currentDialog);
|
||||
}
|
||||
|
||||
|
@ -74,6 +100,14 @@
|
|||
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);
|
||||
}
|
||||
|
||||
|
@ -95,6 +129,7 @@
|
|||
return new Promise(function (resolve, reject) {
|
||||
|
||||
recordingUpdated = false;
|
||||
recordingDeleted = false;
|
||||
currentServerId = serverId;
|
||||
loading.show();
|
||||
|
||||
|
@ -129,7 +164,7 @@
|
|||
if (recordingUpdated) {
|
||||
resolve({
|
||||
updated: true,
|
||||
deleted: false
|
||||
deleted: recordingDeleted
|
||||
});
|
||||
} else {
|
||||
reject();
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
<button is="emby-button" type="submit" class="raised btnSubmit block formDialogFooterItem button-submit" autofocus>
|
||||
<span>${Save}</span>
|
||||
</button>
|
||||
<button is="emby-button" type="button" class="raised btnCancelRecording block formDialogFooterItem button-cancel" style="white-space:nowrap;" autofocus>
|
||||
<span>${HeaderCancelRecording}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
|
|
@ -283,5 +283,6 @@
|
|||
"LiveBroadcasts": "Live broadcasts",
|
||||
"Premieres": "Premieres",
|
||||
"RepeatEpisodes": "Repeat episodes",
|
||||
"DvrSubscriptionRequired": "Emby DVR requires an active Emby Premiere subscription."
|
||||
"DvrSubscriptionRequired": "Emby DVR requires an active Emby Premiere subscription.",
|
||||
"HeaderCancelRecording": "Cancel Recording"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue