restore electron recent folders

desktopmerge
filip mertens 1 year ago
parent f544187d8c
commit 80282ace5e
  1. 2
      apps/remixdesktop/src/plugins/ripgrepPlugin.ts
  2. 1
      libs/remix-ui/search/src/lib/components/results/SearchHelper.ts
  3. 8
      libs/remix-ui/workspace/src/lib/components/file-explorer-menu.tsx
  4. 3
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -48,7 +48,6 @@ export class RipgrepPluginClient extends ElectronBasePluginClient {
async glob(path: string, pattern: string, options?: any) {
path = convertPathToPosix(this.fixPath(path))
console.log('path', path, this.workingDir)
return new Promise((c, e) => {
// replace packed app path with unpacked app path for release on windows
@ -62,7 +61,6 @@ export class RipgrepPluginClient extends ElectronBasePluginClient {
const stream = byline(rg.stdout.setEncoding('utf8'))
stream.on('data', (rgresult: string) => {
console.log('rgresult', rgresult)
let pathWithoutWorkingDir = rgresult.replace(
convertPathToPosix(this.workingDir),
''

@ -10,7 +10,6 @@ export const getDirectory = async (dir: string, plugin: any) => {
const files = await plugin.call('ripgrep', 'glob', dir, '**/*')
// only get path property of files
console.log(files)
result = files.map(x => x.path)
} else {

@ -1,11 +1,13 @@
import {CustomTooltip} from '@remix-ui/helper'
import React, {useState, useEffect} from 'react' //eslint-disable-line
import React, {useState, useEffect, useContext} from 'react' //eslint-disable-line
import {FormattedMessage} from 'react-intl'
import {Placement} from 'react-bootstrap/esm/Overlay'
import {FileExplorerMenuProps} from '../types'
import { FileSystemContext } from '../contexts'
const _paq = (window._paq = window._paq || [])
export const FileExplorerMenu = (props: FileExplorerMenuProps) => {
const global = useContext(FileSystemContext)
const [state, setState] = useState({
menuItems: [
{
@ -66,7 +68,9 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => {
}, [])
return (
(!global.fs.browser.isSuccessfulWorkspace ? null :
<>
<span data-id="spanContaining" className="pl-0 pb-1 w-50">
{state.menuItems.map(({action, title, icon, placement}, index) => {
if (action === 'uploadFile') {
@ -166,7 +170,7 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => {
}
})}
</span>
</>
</>)
)
}

@ -921,6 +921,7 @@ export function Workspace() {
</span>
</div>
<div className='mx-2'>
{!isElectron() ? (
<Dropdown id="workspacesSelect" data-id="workspacesSelect" onToggle={toggleDropdown} show={showDropdown}>
<Dropdown.Toggle
as={CustomToggle}
@ -987,10 +988,12 @@ export function Workspace() {
)}
</Dropdown.Menu>
</Dropdown>
):null}
</div>
</div>
</header>
</div>
<ElectronMenu></ElectronMenu>
<div
className="h-100 remixui_fileExplorerTree"
onFocus={() => {

Loading…
Cancel
Save