mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-08 19:38:51 +01:00
cleaner styling
This commit is contained in:
parent
8c49ea4139
commit
e901ada9b7
@ -34,22 +34,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
.right-buttons:not(:empty) {
|
||||
.right-buttons,
|
||||
.additional-buttons {
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
padding-left: 5px;
|
||||
padding-left: 4px;
|
||||
border-left: 1px solid var(--modal-border-color);
|
||||
}
|
||||
|
||||
.right-buttons {
|
||||
gap: 5px;
|
||||
button {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
&.additional {
|
||||
gap: 2px;
|
||||
button {
|
||||
font-size: 10px;
|
||||
i {
|
||||
margin: auto 1px;
|
||||
}
|
||||
.additional-buttons {
|
||||
gap: 2px;
|
||||
button {
|
||||
font-size: 10px;
|
||||
i {
|
||||
margin: 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,11 +160,13 @@ const SearchComponent = ({
|
||||
{index + 1}/{numResults}
|
||||
</div>
|
||||
|
||||
<div className="right-buttons additional">
|
||||
{caseSensitiveDecl && <ToggleIconButton decl={caseSensitiveDecl} />}
|
||||
{wholeWordDecl && <ToggleIconButton decl={wholeWordDecl} />}
|
||||
{regexDecl && <ToggleIconButton decl={regexDecl} />}
|
||||
</div>
|
||||
{(caseSensitiveDecl || wholeWordDecl || regexDecl) && (
|
||||
<div className="additional-buttons">
|
||||
{caseSensitiveDecl && <ToggleIconButton decl={caseSensitiveDecl} />}
|
||||
{wholeWordDecl && <ToggleIconButton decl={wholeWordDecl} />}
|
||||
{regexDecl && <ToggleIconButton decl={regexDecl} />}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="right-buttons">
|
||||
<IconButton decl={prevDecl} />
|
||||
|
@ -825,15 +825,27 @@ const TerminalView = ({ blockId, model }: TerminalViewProps) => {
|
||||
model.termRef.current?.searchAddon.clearDecorations();
|
||||
return;
|
||||
}
|
||||
model.termRef.current?.searchAddon.findNext(searchText, searchOpts);
|
||||
try {
|
||||
model.termRef.current?.searchAddon.findNext(searchText, searchOpts);
|
||||
} catch (e) {
|
||||
console.warn("search error:", e);
|
||||
}
|
||||
},
|
||||
[searchOpts]
|
||||
);
|
||||
searchProps.onPrev = React.useCallback(() => {
|
||||
model.termRef.current?.searchAddon.findPrevious(searchVal, searchOpts);
|
||||
try {
|
||||
model.termRef.current?.searchAddon.findPrevious(searchVal, searchOpts);
|
||||
} catch (e) {
|
||||
console.warn("search error:", e);
|
||||
}
|
||||
}, [searchVal, searchOpts]);
|
||||
searchProps.onNext = React.useCallback(() => {
|
||||
model.termRef.current?.searchAddon.findNext(searchVal, searchOpts);
|
||||
try {
|
||||
model.termRef.current?.searchAddon.findNext(searchVal, searchOpts);
|
||||
} catch (e) {
|
||||
console.warn("search error:", e);
|
||||
}
|
||||
}, [searchVal, searchOpts]);
|
||||
|
||||
// rerun search when the searchOpts change
|
||||
|
Loading…
Reference in New Issue
Block a user