minor
This commit is contained in:
@ -154,8 +154,13 @@ export function LyricSearchInputField(opts = {}) {
|
|||||||
});
|
});
|
||||||
}).fail((jqXHR, textStatus, error) => {
|
}).fail((jqXHR, textStatus, error) => {
|
||||||
$(spinner).addClass("hidden");
|
$(spinner).addClass("hidden");
|
||||||
|
let render_text = `😕 Failed to reach search endpoint (${jqXHR.status})`;
|
||||||
|
if (typeof jqXHR.responseJSON.detail !== "undefined") {
|
||||||
|
render_text += `\n${jqXHR.responseJSON.detail}`;
|
||||||
|
}
|
||||||
return toast.update(search_toast, {
|
return toast.update(search_toast, {
|
||||||
render: `😕 Failed to reach search endpoint (${jqXHR.status})`,
|
type: "",
|
||||||
|
render: render_text,
|
||||||
style: { backgroundColor: "rgba(255, 0, 0, 0.5)", color: 'inherit' },
|
style: { backgroundColor: "rgba(255, 0, 0, 0.5)", color: 'inherit' },
|
||||||
hideProgressBar: true,
|
hideProgressBar: true,
|
||||||
autoClose: 5000,
|
autoClose: 5000,
|
||||||
|
Reference in New Issue
Block a user