mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add recording toast
This commit is contained in:
parent
1a754cb283
commit
def418714f
3 changed files with 17 additions and 12 deletions
|
@ -291,7 +291,9 @@
|
|||
|
||||
currentItem = item;
|
||||
|
||||
var dlg = paperDialogHelper.createDialog();
|
||||
var dlg = paperDialogHelper.createDialog({
|
||||
size: 'medium'
|
||||
});
|
||||
|
||||
var html = '';
|
||||
html += Globalize.translateDocument(template);
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
var currentProgramId;
|
||||
var currentDialog;
|
||||
var currentResolve;
|
||||
var currentReject;
|
||||
var recordingCreated = false;
|
||||
|
||||
function getDaysOfWeek() {
|
||||
|
||||
|
@ -40,13 +39,8 @@
|
|||
|
||||
function closeDialog(isSubmitted) {
|
||||
|
||||
recordingCreated = isSubmitted;
|
||||
paperDialogHelper.close(currentDialog);
|
||||
|
||||
if (isSubmitted) {
|
||||
currentResolve();
|
||||
} else {
|
||||
currentReject();
|
||||
}
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
|
@ -276,9 +270,7 @@
|
|||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
currentResolve = resolve;
|
||||
currentReject = reject;
|
||||
|
||||
recordingCreated = false;
|
||||
currentProgramId = itemId;
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
|
@ -306,6 +298,16 @@
|
|||
|
||||
currentDialog = dlg;
|
||||
|
||||
dlg.addEventListener('iron-overlay-closed', function () {
|
||||
|
||||
if (recordingCreated) {
|
||||
Dashboard.alert(Globalize.translate('MessageRecordingScheduled'));
|
||||
resolve();
|
||||
} else {
|
||||
reject();
|
||||
}
|
||||
});
|
||||
|
||||
hideSeriesRecordingFields(dlg);
|
||||
init(dlg);
|
||||
|
||||
|
|
|
@ -176,6 +176,7 @@
|
|||
"HeaderConfirmRecordingCancellation": "Confirm Recording Cancellation",
|
||||
"MessageConfirmRecordingCancellation": "Are you sure you wish to cancel this recording?",
|
||||
"MessageRecordingCancelled": "Recording cancelled.",
|
||||
"MessageRecordingScheduled": "Recording scheduled.",
|
||||
"HeaderConfirmSeriesCancellation": "Confirm Series Cancellation",
|
||||
"MessageConfirmSeriesCancellation": "Are you sure you wish to cancel this series?",
|
||||
"MessageSeriesCancelled": "Series cancelled.",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue