mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
improve connect error messages
This commit is contained in:
parent
ca2375cf4f
commit
20a9c83bf6
4 changed files with 63 additions and 2347 deletions
|
@ -62,6 +62,47 @@
|
|||
|
||||
showNewUserInviteMessage(dlg, result);
|
||||
|
||||
}, function (response) {
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
||||
if (!response.status) {
|
||||
// General error
|
||||
require(['alert'], function (alert) {
|
||||
alert({
|
||||
text: Globalize.translate('DefaultErrorMessage')
|
||||
});
|
||||
});
|
||||
} else if (response.status == 404) {
|
||||
// User doesn't exist
|
||||
require(['alert'], function (alert) {
|
||||
alert({
|
||||
text: Globalize.translate('GuestUserNotFound')
|
||||
});
|
||||
});
|
||||
} else {
|
||||
|
||||
// status 400 = account not activated
|
||||
|
||||
// General error
|
||||
showAccountErrorMessage();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function showAccountErrorMessage() {
|
||||
|
||||
var html = Globalize.translate('ErrorAddingGuestAccount1', '<a href="https://emby.media/connect" target="_blank">https://emby.media/connect</a>');
|
||||
html += '<br/><br/>' + Globalize.translate('ErrorAddingGuestAccount2', 'apps@emby.media');
|
||||
|
||||
var text = Globalize.translate('ErrorAddingGuestAccount1', 'https://emby.media/connect');
|
||||
text += '\n\n' + Globalize.translate('ErrorAddingGuestAccount2', 'apps@emby.media');
|
||||
|
||||
require(['alert'], function (alert) {
|
||||
alert({
|
||||
text: text,
|
||||
html: html
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -78,10 +119,12 @@
|
|||
Globalize.translate('MessageInvitationSentToNewUser', result.GuestDisplayName) :
|
||||
Globalize.translate('MessageInvitationSentToUser', result.GuestDisplayName);
|
||||
|
||||
Dashboard.alert({
|
||||
message: message,
|
||||
require(['alert'], function (alert) {
|
||||
alert({
|
||||
text: message,
|
||||
title: Globalize.translate('HeaderInvitationSent')
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
@ -123,21 +123,26 @@
|
|||
}
|
||||
} function showEmbyConnectErrorMessage(username) {
|
||||
|
||||
var msg;
|
||||
var html;
|
||||
var text;
|
||||
|
||||
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');
|
||||
html = Globalize.translate('ErrorAddingEmbyConnectAccount1', '<a href="https://emby.media/connect" target="_blank">https://emby.media/connect</a>');
|
||||
html += '<br/><br/>' + Globalize.translate('ErrorAddingEmbyConnectAccount2', 'apps@emby.media');
|
||||
|
||||
text = Globalize.translate('ErrorAddingEmbyConnectAccount1', 'https://emby.media/connect');
|
||||
text += '\n\n' + Globalize.translate('ErrorAddingEmbyConnectAccount2', 'apps@emby.media');
|
||||
|
||||
} else {
|
||||
msg = Globalize.translate('DefaultErrorMessage');
|
||||
html = text = Globalize.translate('DefaultErrorMessage');
|
||||
}
|
||||
|
||||
Dashboard.alert({
|
||||
|
||||
message: msg
|
||||
|
||||
require(['alert'], function (alert) {
|
||||
alert({
|
||||
text: text,
|
||||
html: html
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -2331,5 +2331,8 @@
|
|||
"ConfigureDateAdded": "Configure how date added is determined in the Emby Server dashboard under Library settings",
|
||||
"LabelAllowHWTranscoding": "Allow hardware transcoding",
|
||||
"AllowHWTranscodingHelp": "If enabled, allow the tuner to transcode streams on the fly. This may help reduce transcoding required by Emby Server.",
|
||||
"OptionRequirePerfectSubtitleMatch": "Only download subtitles that are a perfect match for my video files"
|
||||
"OptionRequirePerfectSubtitleMatch": "Only download subtitles that are a perfect match for my video files",
|
||||
"ErrorAddingGuestAccount1": "There was an error adding the Emby Connect account. Has your guest created an Emby account? They can sign up at {0}.",
|
||||
"ErrorAddingGuestAccount2": "Please ensure your guest has completed activation by following the instructions in the email sent after creating the account. If they did not receive this email then please send an email to {0}, and include your email address as well as theirs.",
|
||||
"GuestUserNotFound": "User not found. Please ensure the name is correct and try again, or try entering their email address."
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue