1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-02 12:20:05 +02:00

style search

This commit is contained in:
s2
2018-05-19 17:19:22 +02:00
parent e758481b6a
commit 9cfd76cb10
2 changed files with 31 additions and 2 deletions

View File

@@ -1,3 +1,33 @@
.js-container {
margin: 5px;
}
/*
* .electron-in-page-search-window is a class specified to default
* <webview> element for search window.
*/
.electron-in-page-search-window {
position: fixed;
top: 0;
right: 0;
border: solid grey 1px;
background-color: white;
width: 300px;
height: 36px;
}
/*
* .search-inactive is added to search window <webview> when the window
* is inactive.
*/
.search-inactive {
visibility: hidden;
}
/*
* .search-inactive is added to search window <webview> when the window
* is active.
*/
.search-active {
visibility: visible;
}

View File

@@ -3,7 +3,7 @@
const searchInPage = require('electron-in-page-search').default;
const remote = require('electron').remote;
let inPageSearch = searchInPage();
const inPageSearch = searchInPage(remote.getCurrentWebContents());
//events
@@ -70,7 +70,6 @@
if (inPageSearch && inPageSearch.opened) {
inPageSearch.closeSearchWindow();
} else {
inPageSearch.searchTarget = remote.getCurrentWebContents();
inPageSearch.openSearchWindow();
}
}