mirror of
https://github.com/S2-/gitlit
synced 2025-08-02 20:30:05 +02:00
style search
This commit is contained in:
@@ -1,3 +1,33 @@
|
|||||||
.js-container {
|
.js-container {
|
||||||
margin: 5px;
|
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 searchInPage = require('electron-in-page-search').default;
|
||||||
const remote = require('electron').remote;
|
const remote = require('electron').remote;
|
||||||
|
|
||||||
let inPageSearch = searchInPage();
|
const inPageSearch = searchInPage(remote.getCurrentWebContents());
|
||||||
|
|
||||||
|
|
||||||
//events
|
//events
|
||||||
@@ -70,7 +70,6 @@
|
|||||||
if (inPageSearch && inPageSearch.opened) {
|
if (inPageSearch && inPageSearch.opened) {
|
||||||
inPageSearch.closeSearchWindow();
|
inPageSearch.closeSearchWindow();
|
||||||
} else {
|
} else {
|
||||||
inPageSearch.searchTarget = remote.getCurrentWebContents();
|
|
||||||
inPageSearch.openSearchWindow();
|
inPageSearch.openSearchWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user