From 10ab5d09ba0022af5c6065183b0573398c6a5fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Tron=C3=AD=C4=8Dek?= Date: Sun, 24 Nov 2019 20:29:55 +0100 Subject: [PATCH 1/2] Change page --- assets/css/main.css | 2 +- assets/css/recieve.css | 28 ++++++++++------- assets/css/title-bar.css | 1 + src/clip.html | 68 ++++++++++++++++++++-------------------- src/clip.js | 9 ++++-- src/get.html | 5 ++- 6 files changed, 63 insertions(+), 50 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index 53e0317..f1324d5 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -10,4 +10,4 @@ body { margin: 0; max-height: 100vh !important; max-width: 100vw !important; - } \ No newline at end of file +} diff --git a/assets/css/recieve.css b/assets/css/recieve.css index 1ea2506..25955b4 100644 --- a/assets/css/recieve.css +++ b/assets/css/recieve.css @@ -1,15 +1,19 @@ #code { - margin-top: 20vh; - transition-duration: 400ms; - text-align: center; - box-sizing: border-box; - width: 80vw; - height: 50vh; - margin-left: 10vw; - font-size: 30vmin; - border: 4px solid #ffffff; + margin-top: 20vh; + transition-duration: 400ms; + text-align: center; + box-sizing: border-box; + width: 80vw; + height: 50vh; + margin-left: 10vw; + font-size: 30vmin; + border: 4px solid #ffffff; } #result { - font-size: 10vmin; - text-align: center; -} \ No newline at end of file + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + width: 100vw; + font-size: 10vmin; + text-align: center; +} diff --git a/assets/css/title-bar.css b/assets/css/title-bar.css index 4ebd207..960c494 100644 --- a/assets/css/title-bar.css +++ b/assets/css/title-bar.css @@ -14,6 +14,7 @@ body { display: flex; width: 100%; height: 50px; + overflow: hidden; } .menu-button-container { diff --git a/src/clip.html b/src/clip.html index 22027e9..b1c5513 100644 --- a/src/clip.html +++ b/src/clip.html @@ -1,53 +1,53 @@ - - - + + Interclip for Desktop - - - - + + + + - - -
+ + +

Interclip Desktop

-
- +
- +
- - - +
- - - \ No newline at end of file + + diff --git a/src/clip.js b/src/clip.js index 3167b3b..63e749f 100644 --- a/src/clip.js +++ b/src/clip.js @@ -1,7 +1,12 @@ const electron = require("electron"); const path = require("path"); const Mousetrap = require("mousetrap"); -const { clipboard, remote, ipcRenderer, dialog } = require("electron"); +const { clipboard, remote, ipcRenderer, dialog, shell } = require("electron"); + +function openExtLink(url) { + shell.openExternal(url); + +} function isKeyPressed(event, expectedKey, expectedCode) { const code = event.which || event.keyCode; @@ -31,7 +36,7 @@ function sendURL(urlInput = document.getElementById("search-input").value) { ipcRenderer.on("asynchronous-reply", (event, code) => { if (code != "") { document.getElementById("code").innerHTML = - "code: " + code + ""; + "code: " + code + "
Open in browser"; } else { console.log("Code is not valid"); alert(code); diff --git a/src/get.html b/src/get.html index 431ac73..4bdf5c2 100644 --- a/src/get.html +++ b/src/get.html @@ -11,11 +11,14 @@
-