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;
|
currentItem = item;
|
||||||
|
|
||||||
var dlg = paperDialogHelper.createDialog();
|
var dlg = paperDialogHelper.createDialog({
|
||||||
|
size: 'medium'
|
||||||
|
});
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
html += Globalize.translateDocument(template);
|
html += Globalize.translateDocument(template);
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
var currentProgramId;
|
var currentProgramId;
|
||||||
var currentDialog;
|
var currentDialog;
|
||||||
var currentResolve;
|
var recordingCreated = false;
|
||||||
var currentReject;
|
|
||||||
|
|
||||||
function getDaysOfWeek() {
|
function getDaysOfWeek() {
|
||||||
|
|
||||||
|
@ -40,13 +39,8 @@
|
||||||
|
|
||||||
function closeDialog(isSubmitted) {
|
function closeDialog(isSubmitted) {
|
||||||
|
|
||||||
|
recordingCreated = isSubmitted;
|
||||||
paperDialogHelper.close(currentDialog);
|
paperDialogHelper.close(currentDialog);
|
||||||
|
|
||||||
if (isSubmitted) {
|
|
||||||
currentResolve();
|
|
||||||
} else {
|
|
||||||
currentReject();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
|
@ -276,9 +270,7 @@
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
currentResolve = resolve;
|
recordingCreated = false;
|
||||||
currentReject = reject;
|
|
||||||
|
|
||||||
currentProgramId = itemId;
|
currentProgramId = itemId;
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
@ -306,6 +298,16 @@
|
||||||
|
|
||||||
currentDialog = dlg;
|
currentDialog = dlg;
|
||||||
|
|
||||||
|
dlg.addEventListener('iron-overlay-closed', function () {
|
||||||
|
|
||||||
|
if (recordingCreated) {
|
||||||
|
Dashboard.alert(Globalize.translate('MessageRecordingScheduled'));
|
||||||
|
resolve();
|
||||||
|
} else {
|
||||||
|
reject();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
hideSeriesRecordingFields(dlg);
|
hideSeriesRecordingFields(dlg);
|
||||||
init(dlg);
|
init(dlg);
|
||||||
|
|
||||||
|
|
|
@ -176,6 +176,7 @@
|
||||||
"HeaderConfirmRecordingCancellation": "Confirm Recording Cancellation",
|
"HeaderConfirmRecordingCancellation": "Confirm Recording Cancellation",
|
||||||
"MessageConfirmRecordingCancellation": "Are you sure you wish to cancel this recording?",
|
"MessageConfirmRecordingCancellation": "Are you sure you wish to cancel this recording?",
|
||||||
"MessageRecordingCancelled": "Recording cancelled.",
|
"MessageRecordingCancelled": "Recording cancelled.",
|
||||||
|
"MessageRecordingScheduled": "Recording scheduled.",
|
||||||
"HeaderConfirmSeriesCancellation": "Confirm Series Cancellation",
|
"HeaderConfirmSeriesCancellation": "Confirm Series Cancellation",
|
||||||
"MessageConfirmSeriesCancellation": "Are you sure you wish to cancel this series?",
|
"MessageConfirmSeriesCancellation": "Are you sure you wish to cancel this series?",
|
||||||
"MessageSeriesCancelled": "Series cancelled.",
|
"MessageSeriesCancelled": "Series cancelled.",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue