diff --git a/README.md b/README.md index 7e19bfd..7d243d2 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Interclip desktop client Keyboard shortcuts: - * ```Ctrl(Command)+C``` = copy code +* ```Ctrl(Command)+C``` = copy code (BETA) Download for Windows (click on image below or download from releases) diff --git a/assets/js/clip.js b/assets/js/clip.js index 255af96..e31b0d0 100644 --- a/assets/js/clip.js +++ b/assets/js/clip.js @@ -32,7 +32,7 @@ function sendURL(urlInput = document.getElementById("search-input").value) { ipcRenderer.on("asynchronous-reply", (_event, code) => { if (code != "") { - document.getElementById("code").innerText = + document.getElementById("code").innerHTML = "code: " + code + ""; } else { console.log("Code is not valid"); diff --git a/main.js b/main.js index 8627a1e..5515853 100644 --- a/main.js +++ b/main.js @@ -20,6 +20,8 @@ if (setupEvents.handleSquirrelEvent()) { return; } +const endpoint = "https://link.mannoviny.cz"; + function createWindow() { // Create the browser window. win = new BrowserWindow({ @@ -62,7 +64,7 @@ function createWindow() { { label: "About", click() { - shell.openExternal("http://uni.hys.cz/about"); + shell.openExternal(`${endpoint}/about`); }, }, { type: "separator" }, @@ -80,9 +82,9 @@ function createWindow() { // receive message from index.html ipcMain.on("asynchronous-message", (event, url) => { axios - .get(`http://uni.hys.cz/includes/api?url=${url}`) + .get(`${endpoint}/includes/api?url=${url}`) .then((res) => { - const code = res.data; + const code = res.data.result; // send message to index.html event.sender.send("asynchronous-reply", code); }) @@ -93,9 +95,9 @@ function createWindow() { dialog.showErrorBox("Error with your code", `This code should be 5 characters long, not ${code.length}, please correct that.`); } else { axios - .get(`http://uni.hys.cz/includes/get-api?user=${code}`) + .get(`${endpoint}/includes/get-api?code=${code}`) .then((res) => { - const url = res.data; + const url = res.data.result; // send message to index.html event.sender.send("url-reply", url); })