From 9b319699dae8ebfc28e12b191890387b2f414cb8 Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Wed, 20 Apr 2022 23:17:50 -0700 Subject: [PATCH] favorites placeholder --- resources/js/index.js | 9 ++++++++- resources/style/index.css | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/resources/js/index.js b/resources/js/index.js index 3b5eb8f..89520f6 100644 --- a/resources/js/index.js +++ b/resources/js/index.js @@ -151,7 +151,6 @@ async function setBackgroundImage() { } async function handleFavoriteInput() { - console.log('onchange') const ip = document.querySelector('#ip').value const ipArr = await getFavIps() @@ -179,6 +178,14 @@ async function handleFavoriteList() { document.createElement('ul') ) + if (ipArr.length < 1) { + const listItem = list.appendChild( + document.createElement('li') + ) + + listItem.innerHTML = 'No favorites set' + } + for (const ip of ipArr) { const elm = document.createElement('li') elm.innerHTML = ip diff --git a/resources/style/index.css b/resources/style/index.css index 7148948..4eb17aa 100644 --- a/resources/style/index.css +++ b/resources/style/index.css @@ -188,7 +188,7 @@ body { } #firstHalf { - border-right: 10px solid #141414; + border-right: 6px solid #141414; background-position: -340px; }