pull/2170/head
bunsenstraat 3 years ago
parent ea87f505f8
commit 5be7394711
  1. 2
      libs/remix-ui/search/src/lib/components/Exclude.tsx
  2. 4
      libs/remix-ui/search/src/lib/components/FindContainer.tsx
  3. 3
      libs/remix-ui/search/src/lib/components/Search.tsx
  4. 4
      libs/remix-ui/search/src/lib/components/results/ResultItem.tsx
  5. 2
      libs/remix-ui/search/src/lib/search.css

@ -18,7 +18,7 @@ export const Exclude = props => {
return ( return (
<> <>
<div className="search_plugin_find-part pl-3"> <div className="search_plugin_find-part pl-3">
<label className='mt-2'>files to exclude</label> <label className='mt-2'>Files to exclude</label>
<input <input
id='search_exclude' id='search_exclude'
placeholder="Exclude ie .git/**/*" placeholder="Exclude ie .git/**/*"

@ -1,6 +1,7 @@
import React, { useContext, useEffect, useState } from 'react' import React, { useContext, useEffect, useState } from 'react'
import { SearchContext } from '../context/context' import { SearchContext } from '../context/context'
import { Find } from './Find' import { Find } from './Find'
import { OverWriteCheck } from './OverWriteCheck'
import { Replace } from './Replace' import { Replace } from './Replace'
export const FindContainer = props => { export const FindContainer = props => {
@ -26,7 +27,8 @@ export const FindContainer = props => {
></div> ></div>
<div className="search_plugin_find_container_internal"> <div className="search_plugin_find_container_internal">
<Find></Find> <Find></Find>
{expanded ? <Replace></Replace> : null} {expanded ?
<><Replace></Replace><OverWriteCheck></OverWriteCheck></> : null}
</div> </div>
</div> </div>
) )

@ -16,12 +16,11 @@ const plugin = props.plugin
return ( return (
<> <>
<div className="search_plugin_search_tab pl-2 pr-2"> <div className="search_plugin_search_tab px-2">
<SearchProvider plugin={plugin}> <SearchProvider plugin={plugin}>
<FindContainer></FindContainer> <FindContainer></FindContainer>
<Include></Include> <Include></Include>
<Exclude></Exclude> <Exclude></Exclude>
<OverWriteCheck></OverWriteCheck>
<Undo></Undo> <Undo></Undo>
<Results></Results> <Results></Results>
</SearchProvider> </SearchProvider>

@ -103,8 +103,8 @@ export const ResultItem = (props: ResultItemProps) => {
</div> </div>
{loading ? <div className="loading">Loading...</div> : null} {loading ? <div className="loading">Loading...</div> : null}
{!toggleExpander && !loading ? ( {!toggleExpander && !loading ? (
<div className="p-1 search_plugin_wrap_summary"> <div className="search_plugin_wrap_summary">
{state.replaceEnabled? <div onClick={async() => replace()} className='btn btn-primary btn-block mb-2 btn-sm'>Replace all</div>:null} {state.replaceEnabled? <div onClick={async() => replace()} className='btn btn-secondary btn-block mb-2 btn-sm'>Replace all</div>:null}
{lines.map((line, index) => ( {lines.map((line, index) => (
index < state.maxLines ? index < state.maxLines ?
<ResultSummary <ResultSummary

@ -21,7 +21,7 @@
.search_plugin_find-part { .search_plugin_find-part {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 2px; padding-top: 5px;
} }
.search_plugin_controls { .search_plugin_controls {

Loading…
Cancel
Save