improve readability of error message

pull/124/head
Abdullah Alfaraj 2023-02-28 05:03:40 +03:00
parent d8d3f9fc73
commit 6a7b4726a7
1 changed files with 4 additions and 8 deletions

View File

@ -7,7 +7,7 @@ class Notification {
const r1 = await dialog_box.prompt( const r1 = await dialog_box.prompt(
'Automatic1111 is Offline', 'Automatic1111 is Offline',
"make sure Automatic1111 is running in the background, or select the 'native horde' option from the horde tab", "make sure Automatic1111 is running in the background, or select the 'native horde' option from the horde tab",
['Cancel', 'How To', 'OK'] ['Cancel', 'OK']
) )
try { try {
@ -16,8 +16,6 @@ class Notification {
console.log('cancel') console.log('cancel')
} else if (r1 === 'OK') { } else if (r1 === 'OK') {
console.log('ok') console.log('ok')
} else if (r1 === 'How To') {
console.log('How to')
} }
} catch (e) { } catch (e) {
console.warn(e) console.warn(e)
@ -25,9 +23,9 @@ class Notification {
} }
static async webuiAPIMissing() { static async webuiAPIMissing() {
const r1 = await dialog_box.prompt( const r1 = await dialog_box.prompt(
"Automatic1111 is running, but you've forgotten to add --api flag, so the plugin can communicate with it", "The Plugin can't communicate with Automatic1111",
'', 'Automatic1111 is running, but you forgot to add --api flag to the webui command flags',
['Cancel', 'How To', 'OK'] ['Cancel', 'OK']
) )
try { try {
@ -36,8 +34,6 @@ class Notification {
console.log('cancel') console.log('cancel')
} else if (r1 === 'OK') { } else if (r1 === 'OK') {
console.log('ok') console.log('ok')
} else if (r1 === 'How To') {
console.log('How to')
} }
} catch (e) { } catch (e) {
console.warn(e) console.warn(e)