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;
|
display: flex;
|
||||||
gap: 5px;
|
padding-left: 4px;
|
||||||
padding-left: 5px;
|
|
||||||
border-left: 1px solid var(--modal-border-color);
|
border-left: 1px solid var(--modal-border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-buttons {
|
||||||
|
gap: 5px;
|
||||||
button {
|
button {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.additional {
|
.additional-buttons {
|
||||||
gap: 2px;
|
gap: 2px;
|
||||||
button {
|
button {
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
i {
|
i {
|
||||||
margin: auto 1px;
|
margin: 1px;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -160,11 +160,13 @@ const SearchComponent = ({
|
|||||||
{index + 1}/{numResults}
|
{index + 1}/{numResults}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="right-buttons additional">
|
{(caseSensitiveDecl || wholeWordDecl || regexDecl) && (
|
||||||
{caseSensitiveDecl && <ToggleIconButton decl={caseSensitiveDecl} />}
|
<div className="additional-buttons">
|
||||||
{wholeWordDecl && <ToggleIconButton decl={wholeWordDecl} />}
|
{caseSensitiveDecl && <ToggleIconButton decl={caseSensitiveDecl} />}
|
||||||
{regexDecl && <ToggleIconButton decl={regexDecl} />}
|
{wholeWordDecl && <ToggleIconButton decl={wholeWordDecl} />}
|
||||||
</div>
|
{regexDecl && <ToggleIconButton decl={regexDecl} />}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<div className="right-buttons">
|
<div className="right-buttons">
|
||||||
<IconButton decl={prevDecl} />
|
<IconButton decl={prevDecl} />
|
||||||
|
@ -825,15 +825,27 @@ const TerminalView = ({ blockId, model }: TerminalViewProps) => {
|
|||||||
model.termRef.current?.searchAddon.clearDecorations();
|
model.termRef.current?.searchAddon.clearDecorations();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
model.termRef.current?.searchAddon.findNext(searchText, searchOpts);
|
try {
|
||||||
|
model.termRef.current?.searchAddon.findNext(searchText, searchOpts);
|
||||||
|
} catch (e) {
|
||||||
|
console.warn("search error:", e);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[searchOpts]
|
[searchOpts]
|
||||||
);
|
);
|
||||||
searchProps.onPrev = React.useCallback(() => {
|
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]);
|
}, [searchVal, searchOpts]);
|
||||||
searchProps.onNext = React.useCallback(() => {
|
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]);
|
}, [searchVal, searchOpts]);
|
||||||
|
|
||||||
// rerun search when the searchOpts change
|
// rerun search when the searchOpts change
|
||||||
|
Loading…
Reference in New Issue
Block a user