mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update emby connect error message
This commit is contained in:
parent
d558f928f0
commit
16d7fb58ef
2 changed files with 38 additions and 10 deletions
|
@ -113,11 +113,7 @@
|
||||||
|
|
||||||
}, function () {
|
}, function () {
|
||||||
|
|
||||||
Dashboard.alert({
|
showEmbyConnectErrorMessage('.');
|
||||||
|
|
||||||
message: Globalize.translate('ErrorAddingEmbyConnectAccount', 'apps@emby.media')
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -125,8 +121,27 @@
|
||||||
noActionCallback();
|
noActionCallback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} function showEmbyConnectErrorMessage(username) {
|
||||||
|
|
||||||
|
var msg;
|
||||||
|
|
||||||
|
if (username) {
|
||||||
|
|
||||||
|
msg = Globalize.translate('ErrorAddingEmbyConnectAccount1', '<a href="https://emby.media/connect" target="_blank">https://emby.media/connect</a>');
|
||||||
|
msg += '<br/><br/>' + Globalize.translate('ErrorAddingEmbyConnectAccount2', 'apps@emby.media');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
msg = Globalize.translate('DefaultErrorMessage');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Dashboard.alert({
|
||||||
|
|
||||||
|
message: msg
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function onSaveComplete(page, user) {
|
function onSaveComplete(page, user) {
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
|
|
|
@ -47,14 +47,28 @@
|
||||||
|
|
||||||
}).then(onUpdateUserComplete, function () {
|
}).then(onUpdateUserComplete, function () {
|
||||||
|
|
||||||
var msgKey = form.querySelector('#txtConnectUserName').value ? 'ErrorAddingEmbyConnectAccount' : 'DefaultErrorMessage';
|
showEmbyConnectErrorMessage(form.querySelector('#txtConnectUserName').value);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function showEmbyConnectErrorMessage(username) {
|
||||||
|
|
||||||
|
var msg;
|
||||||
|
|
||||||
|
if (username) {
|
||||||
|
|
||||||
|
msg = Globalize.translate('ErrorAddingEmbyConnectAccount1', '<a href="https://emby.media/connect" target="_blank">https://emby.media/connect</a>');
|
||||||
|
msg += '<br/><br/>' + Globalize.translate('ErrorAddingEmbyConnectAccount2', 'apps@emby.media');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
msg = Globalize.translate('DefaultErrorMessage');
|
||||||
|
}
|
||||||
|
|
||||||
Dashboard.alert({
|
Dashboard.alert({
|
||||||
|
|
||||||
message: Globalize.translate(msgKey)
|
message: msg
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
|
@ -84,7 +98,6 @@
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
})(jQuery, document, window);
|
})(jQuery, document, window);
|
Loading…
Add table
Add a link
Reference in a new issue