Skip to content

Commit

Permalink
fix z-index with settings webview
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Jullian committed Apr 7, 2018
1 parent 4be9ddc commit 31e9a9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ const settingsView = document.querySelector('#settings')
// get the browser window
const browser = remote.getCurrentWindow()

let iconGetter = "http://besticon.herokuapp.com"

let bookmarks = db.get('bookmarks').value()

// Manage bookmarks' id & makes possible to access a bookmark from its url
Expand Down Expand Up @@ -96,7 +98,7 @@ const shuttle = {
document.querySelector('.bookmarks-zone').innerHTML += `<a href="#" class="bubble-btn" id="id-${id}" onclick="shuttle.loadView('${url}', ${id})" oncontextmenu="shuttle.askToRemoveBookmark(${id}, '${url}')" onmouseover="shuttle.showControlBar('id-${id}', 'show')" style="background-image: url(../app/modules/${url.replace('mod:', '')}/icon.png);"></a>`
} else {

fetch(`http://besticon-demo.herokuapp.com/allicons.json?url=${url}`).then((resp) => resp.json()).then((data) => {
fetch(`${iconGetter}/allicons.json?url=${url}`).then((resp) => resp.json()).then((data) => {
document.querySelector('.bookmarks-zone').innerHTML += `<a href="#" class="bubble-btn" id="id-${id}" title="${url}" onclick="shuttle.loadView('${url}', ${id})" oncontextmenu="shuttle.askToRemoveBookmark(${id}, '${url}')" onmouseover="shuttle.showControlBar('id-${id}', 'show')" style="background-image: url(${data.icons[0].url});"></a>`
}).catch((error) => {
document.querySelector('.bookmarks-zone').innerHTML += `<a href="#" class="bubble-btn" id="id-${id}" title="${url}" onclick="shuttle.loadView('${url}', ${id})" oncontextmenu="shuttle.askToRemoveBookmark(${id}, '${url}')" onmouseover="shuttle.showControlBar('id-${id}', 'show')" style="background-image: url(../assets/img/no-icon.png);"></a>`
Expand Down
3 changes: 2 additions & 1 deletion assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ webview {
#settings {
visibility: hidden;
background-color: white;
z-index: 99999;
z-index: 15;
}

.btn-bar {
Expand Down Expand Up @@ -132,6 +132,7 @@ hr {
background-color: #F4F4F4;
text-align: center;
transition: 0.35s;
z-index: 20;
}
.control-bar i {
margin-top: 11px;
Expand Down

0 comments on commit 31e9a9b

Please sign in to comment.