diff --git a/index.html b/index.html
index 0f69225..5d008af 100644
--- a/index.html
+++ b/index.html
@@ -2,7 +2,7 @@
- Hello World!
+ Open WebUI Assistant
diff --git a/src/App.vue b/src/App.vue
index 3d9e598..8826a73 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -6,7 +6,7 @@ import { ref, onBeforeMount } from 'vue';
const url = ref('http://localhost:3000')
const token = ref('your_jwt')
-const submitHandler = () => {
+const submitHandler = async () => {
console.log(url.value, token.value)
@@ -20,6 +20,12 @@ const submitHandler = () => {
token: token.value
})
+ const res = await window.electron.checkConnection()
+
+ new Notification("Open WebUI", { body: res ? 'Server Connection Verified' : 'Server Connection Failed' })
+
+ console.log(res)
+
}
@@ -30,6 +36,8 @@ onBeforeMount(async () => {
url.value = res.url
token.value = res.token
}
+
+
})
diff --git a/src/main.ts b/src/main.ts
index 4558f9c..c6a4fba 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -2,6 +2,7 @@ import {
app,
BrowserWindow,
globalShortcut,
+ Notification,
clipboard,
ipcMain,
} from "electron";
diff --git a/src/preload.ts b/src/preload.ts
index ec307b8..aae8e0e 100644
--- a/src/preload.ts
+++ b/src/preload.ts
@@ -8,6 +8,7 @@ contextBridge.exposeInMainWorld("electron", {
ipcRenderer.on(event, callback);
},
+ checkConnection: () => ipcRenderer.invoke("check-connection"),
loadConfig: () => ipcRenderer.invoke("load-config"),
saveConfig: (data) => ipcRenderer.send("save-config", data),
});