diff --git a/src/utils/functions.js b/src/utils/functions.js index f8fa60c..d962dba 100644 --- a/src/utils/functions.js +++ b/src/utils/functions.js @@ -36,7 +36,8 @@ function showNotification(message, type = 'info') { cursor: pointer; `; - notification.innerHTML = `${icons[type] || icons.info}${message}`; + const formattedMessage = message.replace(/\n/g, '
'); + notification.innerHTML = `${icons[type] || icons.info}${formattedMessage}`; document.body.appendChild(notification); diff --git a/src/views/Settings.vue b/src/views/Settings.vue index f6cdd38..aa7417a 100644 --- a/src/views/Settings.vue +++ b/src/views/Settings.vue @@ -229,7 +229,9 @@ export default { testBody = testBody.replace(/\{\{\s*serviceName\s*\}\}/g, 'superfrpc_test_test'); testBody = testBody.replace(/\{\{\s*exceptionMsg\s*\}\}/g, 'WebHook Test'); - const headers = {}; + const headers = { + 'Content-Type': 'application/json' + }; if (webhookSettings.headers) { webhookSettings.headers.split('\n').forEach(line => { const colonIndex = line.indexOf(':'); @@ -250,9 +252,9 @@ export default { }); if (response.ok) { - showNotification('WebHook test successful', 'success'); + showNotification(`WebHook test successful\nMessage: ${await response.text()}`, 'success'); } else { - showNotification(`WebHook test failed: HTTP ${response.status}`, 'error'); + showNotification(`WebHook test failed: HTTP ${response.status}\nMessage: ${await response.text()}`, 'error'); } } catch (error) { showNotification(`WebHook test failed: ${error.message}`, 'error'); diff --git a/vite.config.js b/vite.config.js index 34894e6..ec11fd8 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' -const APP_TARGET = '192.168.1.19:19090' +const APP_TARGET = '192.168.20.4:19090' export default defineConfig({ define: {