mirror of
https://github.com/S2-/gitlit
synced 2025-08-02 12:20:05 +02:00
style search
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user